@squawk
    Preparing search index...

    Function createBeastAircraftFeed

    • Creates a live aircraft feed backed by a persistent TCP connection to a Beast-format feed (dump1090-fa, readsb, or a real Mode-S Beast dongle). Node-only (raw TCP sockets have no browser API) - not exported from this package's /browser entry, same as createSbsAircraftFeed.

      Unlike the JSON and SBS sources, Beast carries raw, undecoded Mode-S/ADS-B messages - this decodes them via @squawk/beast/@squawk/mode-s and resolves CPR-encoded positions internally (see BeastFeedOptions.receiverPosition for what that needs). Reconnects automatically, after reconnectDelayMs, if the connection closes or errors, until stop() is called. Forwards @squawk/beast's own beast:connect/beast:disconnect signal into the returned feed's connection:connect/connection:disconnect events and getConnectionState().

      import { createBeastAircraftFeed } from '@squawk/adsb-feed';

      const feed = createBeastAircraftFeed({ host: '192.168.1.50' });
      feed.addEventListener('aircraft:update', (event) => {
      console.log((event as CustomEvent).detail.aircraft);
      });
      feed.start();

      Parameters

      • options: BeastFeedOptions

        Station host/port, receiver position, reconnect delay, and tracker configuration.

      Returns AircraftFeed

      An AircraftFeed ready to start().