Skip to main content
gr-adsb ships two example flowgraphs:
  • examples/adsb_rx.grc — Live reception from an SDR source
  • examples/adsb_playback.grc — Offline playback from a SQLite database

Signal processing chain

The live reception flowgraph (adsb_rx.grc) connects blocks in the following order:
SDR Source (OsmoSDR)
  → Complex to Mag^2
  → ADS-B Framer
  → ADS-B Demod
  → ADS-B Decoder
In addition to the stream path, message ports carry decoded data downstream:
ADS-B Demod  [demodulated] ──► ADS-B Decoder  [demodulated]
ADS-B Decoder  [decoded]   ──► ZeroMQ Pub Sink
The ZeroMQ Pub Sink block must be enabled (not bypassed) for the webserver to receive decoded plane data. See Running the webserver for details.

Opening the flowgraph

1

Launch GNU Radio Companion

Open a terminal and run:
gnuradio-companion
2

Open the example flowgraph

In GRC, go to File → Open and navigate to gr-adsb/examples/adsb_rx.grc. For SQLite playback, open gr-adsb/examples/adsb_playback.grc instead.
3

Configure the SDR source

Select the OsmoSDR Source block and set:
ParameterValue
Center Freq1090e6 (1090 MHz — the ADS-B broadcast frequency)
Sample Rate2e6 minimum; must be an integer multiple of 2 Msps (e.g., 2e6, 4e6, 6e6)
Adjust the gain settings to suit your hardware and antenna environment.
4

Configure the ADS-B Framer

Select the ADS-B Framer block. The key parameter is:
ParameterDefaultDescription
Detection Threshold0.01Minimum power threshold for preamble detection. Lower values increase sensitivity but also false detections.
The Framer emits a stream tag named burst at each detected preamble. The tag value is a tuple of ("SOB", snr), carrying the start-of-burst marker and the computed SNR in dB. The ADS-B Demod block reads this tag to locate and demodulate each burst.
5

Configure the ADS-B Decoder

Select the ADS-B Decoder block and choose your options:Message Filter
OptionBehavior
Extended Squitter OnlyDecodes DF 17, 18, and 19 messages only (default)
All MessagesDecodes all supported Downlink Formats (DF 0–21)
Print Level
OptionBehavior
NoneNo stdout output
BriefCurses-based live table of all tracked aircraft
VerboseFull per-message field dump with field names and values
Error Correction
OptionBehavior
NoneNo error correction applied (default)
ConservativeAttempts single-burst error correction using CRC syndromes
Brute ForceReserved; not yet implemented
6

Enable ZeroMQ (optional)

If you intend to use the built-in webserver, make sure the ZeroMQ Pub Sink block in the flowgraph is enabled. The block should publish to tcp://127.0.0.1:5001 to match the webserver’s default ZMQ subscriber address.
7

Run the flowgraph

Click the Execute button (or press F6) to start the flowgraph. Decoded messages will appear in the terminal according to the Print Level you selected.

Block connections reference

The table below summarises how the three gr-adsb blocks connect to each other.
Source blockPort / domainDestination blockPort / domain
ADS-B Framerout (float stream)ADS-B Demodin (float stream)
ADS-B Demoddemodulated (msg)ADS-B Decoderdemodulated (msg)
ADS-B Decoderdecoded (msg)ZeroMQ Pub Sinkmessage input
The Framer also propagates the burst stream tag (containing SOB and the computed SNR) through the float sample stream so the Demod block knows exactly where each burst starts.

Sample rate requirement

The sample rate passed to both the ADS-B Framer and ADS-B Demod must be an exact integer multiple of the ADS-B symbol rate (1 Msym/s). Internally both blocks assert:
assert fs % SYMBOL_RATE == 0
Valid values include 2e6, 4e6, 6e6, and so on. Setting any other rate will raise an AssertionError at flowgraph startup.

Build docs developers (and LLMs) love