1. Intro
I started this project with one question: how does an aircraft’s radio broadcast turn into a plane moving on a map? I built a receive-only tracker using an RTL-SDR Blog V4L, GNU Radio’s gr-adsb blocks, a small Python collector, and a browser dashboard.
It now works as a local 2D dashboard. I’ll walk through how each part contributes to that picture.
2. Demo dashboard
Before diving into the radio details, take the dashboard for a spin. It uses six fully synthetic aircraft, so feel free to click around. Select an aircraft from the list or map to open its details and received path; click empty map space to return to the overview.
Open the interactive demo in a new tab
3. Main concepts to know
ADS-B stands for Automatic Dependent Surveillance–Broadcast. In everyday terms, an aircraft figures out where it is using onboard navigation—usually GNSS—and broadcasts that position along with other details. Mode S is the broader transponder protocol: some messages answer interrogations, while Extended Squitter messages are broadcast on their own. My receiver listens for 1090 MHz Extended Squitter (1090ES), not the separate 978 MHz UAT link. The FAA overview explains the system.
1090ES uses pulse-position modulation (PPM) at 1 Mbit/s. Each message starts with an 8 μs preamble, followed by 56 or 112 data bits. A bit lasts 1 μs; a pulse in its first half means 1, and a pulse in its second half means 0. The DF17 messages I see are the 112-bit ADS-B Extended Squitter format. The ICAO technical description covers the format. Here’s the layout:
| Bit positions | Length | Field | Meaning |
|---|---|---|---|
| 1–5 | 5 | DF | Downlink Format; 17 identifies ADS-B Extended Squitter from a Mode S transponder. |
| 6–8 | 3 | CA | Transponder capability. |
| 9–32 | 24 | AA | Aircraft address, commonly called the ICAO address. |
| 33–88 | 56 | ME | Message field carrying the ADS-B data. |
| 33–37 | 5 | TC | Type Code, the first five bits of ME. It tells the decoder how to interpret the message. |
| 89–112 | 24 | Parity / CRC | Error-detection bits checked by the decoder. |
The Type Codes tell me what kind of update I’m looking at. These are the ones this project uses most:
| Type Code | Information |
|---|---|
| 1–4 | Aircraft identification, such as a callsign. |
| 9–18 | Airborne position and altitude. |
| 19 | Airborne velocity, such as speed, track, and vertical rate. |
Position has one extra wrinkle: latitude and longitude arrive in Compact Position Reporting (CPR) form, not as ordinary decimal coordinates. Each report is marked even or odd. For a global CPR position, the decoder combines a recent even and odd report from the same aircraft. Noise or overlapping transmissions can flip bits, so the decoder checks the CRC and rejects frames that fail. For more detail, see the ICAO description and Mode-S.org’s CPR reference.
4. Setup
I plugged the V4L into my MacBook Air M1 and assembled the dipole with its two elements extending in opposite directions from the base. For software, I used Radioconda and installed GNU Radio, RTL-SDR/OsmoSDR support, gr-adsb, and pyzmq in the same environment.
Before opening GNU Radio, I checked that the computer could see the dongle and stream samples. There’s a small rtl_test gotcha I’ll explain in the troubleshooting section.
rtl_test keeps running; silence after “Reading samples in async mode…” means it has not reported dropped samples. This checks the device and sample stream, not ADS-B decoding. The serial number is hidden.The editable flowgraph is adsb_rx_rtlsdr.grc; GNU Radio Companion generates adsb_rx.py from it.
5. Hardware and software: what each part does
Here’s how the aircraft broadcast travels through the receiver and dashboard.
| Part | Role |
|---|---|
| Dipole antenna | Picks up radio energy near 1090 MHz. |
| RTL-SDR Blog V4L | Tunes the signal and sends digital I/Q samples to the computer. It receives; it does not decode aircraft messages by itself. |
| GNU Radio / Companion | Moves samples through the flowgraph. Companion edits the graph and generates Python code. |
gr-adsb blocks | Find message bursts, demodulate the bits, check and decode supported Mode S / ADS-B messages. |
| ZeroMQ | Carries decoded messages from GNU Radio to the local Python subscriber. |
| Python subscriber | Groups reports by aircraft, keeps recent data, filters positions, and writes the JSON snapshot. |
| Browser dashboard | Fetches the snapshot and draws aircraft and received paths on a MapLibre map. |
6. Following the flowgraph
Now let’s follow one message from the antenna all the way to the map:
6.1 Osmocom Source: sample the tuned signal
First the source tunes to 1090 MHz and samples at 2 million samples per second (2 MS/s). The saved graph uses 40 dB manual RF gain, plus 20 dB each for IF and baseband gain. That gives two samples for every 1 μs ADS-B bit. I and Q are the signal’s two components; together they describe its changing amplitude and phase. The source also needs the device index or serial for the SDR connected to your computer.
6.2 Complex to Mag²: expose pulse energy
The source gives us complex I/Q samples. The Mag² block turns each one into a power-like value:
power = I² + Q²
That makes the short pulses easier to spot. There’s no FFT in this decoder: it reads the pulse pattern over time.
6.3 ADS-B Framer: find candidate bursts
The framer scans for energy above a threshold, then checks whether the pulse timing looks like the known preamble. If it matches, the framer marks a candidate burst for the demodulator. The threshold isn’t receiver gain: lowering it may reveal weaker bursts, but it can let more noise through too.
6.4 ADS-B Demod: recover the bits
Once the framer finds a likely burst, the demodulator compares the two halves of each 1 μs bit and decides where the pulse landed. Those decisions become the bit sequence passed to the decoder.
6.5 ADS-B Decoder: validate and interpret a message
This is where the bits turn into aircraft information. The decoder checks the CRC, reads fields such as the downlink format and aircraft address, and interprets the Type Code. My graph uses Extended Squitter with error correction set to None, so it doesn’t try to repair failed frames. A CRC-passed message can still lack a usable position: airborne coordinates are CPR-encoded, and the decoder needs compatible reports before it can produce latitude and longitude.
6.6 ZeroMQ and Python: pass only fresh positions
The decoded message then crosses from GNU Radio to my code over ZeroMQ at tcp://127.0.0.1:5001. aircraft_stream.py subscribes and groups reports by ICAO address. Because the decoder can carry an old latitude and longitude into a later callsign message, my subscriber checks the raw PDU bits and only accepts coordinates from airborne-position reports (DF17/18, TC 9–18):
frame_type = mode_s_df_and_type_code(pdu)
is_airborne_position = (
frame_type is not None
and frame_type[0] in {17, 18}
and frame_type[1] in range(9, 19)
)
lat = finite_number(metadata.get("latitude")) if is_airborne_position else None
lon = finite_number(metadata.get("longitude")) if is_airborne_position else None
That way a callsign update can refresh the aircraft details without pretending the plane’s position was just updated. The subscriber also rejects implausible short-interval jumps, keeps up to 500 track points per aircraft, and starts a separate visible segment after a gap over 120 seconds. These checks help keep wild lines off the map, though no filter can guarantee every coordinate is right.
The subscriber keeps state in memory and safely replaces aircraft_snapshot_live.json as updates arrive. The dashboard fetches that file every 1.5 seconds. I initially sketched a SQLite database and local API, but the current build doesn’t have either; persistent storage can come later.
6.7 Dashboard: map observations
The browser draws each aircraft as a small plane silhouette. With two recent positions, the icon points along the direction it’s moving; with only one, it can use the reported heading. Select a plane to see its details and path. Missing fields show N/A. I leave out model, origin, and destination because this decoder doesn’t provide them. The displayed distance and duration describe what my receiver observed, not the aircraft’s whole trip.
7. Problems I faced while building
Things that broke along the way (open for fixes)
“No E4000 tuner found” from rtl_test -t
The dongle was detected and reported a Rafael Micro tuner, but rtl_test -t complained that it couldn’t find an E4000. It turns out -t runs an E4000-specific benchmark. For a general streaming check, I ran rtl_test without the flag and stopped it with Control-C.
Flat graph, small bursts, and the detection threshold
My main time sink stayed near zero even though the Mag² graph showed little bursts of energy. The threshold started at 10m (0.01 in GNU Radio notation); I lowered it to 0.0002 while tuning. The saved flowgraph now defaults to 0.0005. Lowering the threshold doesn’t amplify anything—it just lets the framer consider weaker candidates—so I watched for decoded messages too.
PMT rejected a NumPy float; NumPy rejected np.NaN
The framer stopped on ValueError: can't convert <class 'numpy.float32'> type to pmt. It was passing a NumPy scalar where PMT expected a regular Python float. This conversion fixed that local package error:
pmt.to_pmt(("SOB", float(snr)))
Then the installed decoder hit another compatibility issue: NumPy 2 removed np.NaN. Changing it to np.nan fixed that one. Both edits live in my local Radioconda package; they aren’t tracked as project patches yet.
Companion froze and the terminal was hard to read
Running the generated adsb_rx.py from its own Terminal kept the logs visible. I set the decoder print level to None to quiet the debug flood, then added start_flight_tracker.command so I could start the subscriber, flowgraph, and web server together.
Implausible map jumps
I traced the huge jumps to a coordinate sanity check in gr-adsb that compared latitude twice and never checked longitude. There’s now a project patch for that. The subscriber also checks whether nearby points imply an impossible speed, and the dashboard breaks the line after long gaps.
8. What I learned
The biggest thing I learned is to check each stage separately. A visible dongle doesn’t mean a working receiver; signal energy doesn’t mean a valid frame; and a valid frame may not include a position.
GNU Radio gave me a way to learn from existing DSP and ADS-B blocks without writing a decoder from scratch. My code picks up after those blocks and turns their output into a tracker I can shape myself.
9. Running the project
To run it live, point FLIGHT_TRACKER_PYTHON in .flight-tracker.env at the Python executable in your GNU Radio environment, then launch:
cp .flight-tracker.env.example .flight-tracker.env
# Edit FLIGHT_TRACKER_PYTHON in .flight-tracker.env
./start_flight_tracker.command
The launcher starts the subscriber, flowgraph, and local web server, then opens the dashboard for you. Keep its Terminal window open; press Control-C there when you’re done. A live setup on another computer needs the SDR, GNU Radio, compatible gr-adsb blocks, and Python dependencies.