@squawk
    Preparing search index...

    Function createSbsAircraftFeed

    • Creates a live aircraft feed backed by a persistent TCP connection to dump1090-fa's SBS/BaseStation output. Node-only (raw TCP sockets have no browser API) - not exported from this package's /browser entry.

      Reconnects automatically, after reconnectDelayMs, if the connection closes or errors, until stop() is called. Exposes the socket's own connect/close lifecycle as the returned feed's connection:connect/connection:disconnect events and getConnectionState().

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

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

      Parameters

      • options: SbsFeedOptions

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

      Returns AircraftFeed

      An AircraftFeed ready to start().