Skip to content
Yanis André
FRRésumé ↓
← Back to home

Project · ENSEIRB-MATMECA

Decoding ADS-B messages from radio recordings

Recovering, from raw recordings of a software-defined radio, the messages that aircraft broadcast in the clear on 1,090 MHz: 26 aircraft heard, 23 placed on a map, and the 93 messages of the reference decoder supplied by the teacher found one by one. No live reception.

Period
September to October 2025, taken up again in 2026
Role
Pair project, left unfinished, then taken up and finished afterwards outside the pair, and ported to Python
Skills
  • End-to-end signal processing chain
  • Digital communications
  • Verified MATLAB to Python port
Tools
MATLAB · Python · NumPy · Signal processing · CRC · CPR decoding
26 aircraft
heard in 9 recordings of 0.5 s; 23 have a position on the map
171 messages
decoded and checked by the CRC, 163 of them distinct frames
93 of 93
of the teacher’s chain’s messages found again, in the same recordings, to within one sample and with the same bits
1.31 dB
more signal than the ideal-case theory needs for 1 wrong bit in 1,000 (simulation)

Context

Every airliner broadcasts its identity, position, altitude and speed in the clear, on 1,090 MHz. This is ADS-B, and any receiver can listen to it. A software-defined radio digitises the raw signal; everything else is computation.

I do not start from an antenna but from recordings: 9 of 0.5 s each, at 4 million samples per second, so 4.5 s of signal. They were recorded by the software-defined radio used by the course and are supplied with the assignment, in its public repository.

The school project was done in a pair. It stayed unfinished: no message had yet been drawn from the recordings, and we had not managed to connect to the school’s radio for the real-time part. I took it up and finished it afterwards, working from the recordings only, then ported it to Python and checked it block by block.

Method

The chain starts from the signal and ends on a map.

  1. Find the frames. Each 112-bit message begins with a preamble. At every instant I measure how much it resembles the signal. Where it exceeds the threshold of 0.75 and forms a peak, a frame may start; the CRC decides. The threshold is supplied with the assignment; the theory shows it is well placed.
  2. Read the bits. With PPM, it is enough to compare the first and the second half of each slot.
  3. Check. The last 24 bits are a CRC. A message whose remainder is not zero is thrown away rather than misread.
  4. Read the fields. Identity, altitude, position (CPR) and speed.
  5. Place. Each position becomes a point on the map, tied to its aircraft.

The tool takes a real frame and follows these steps. Its slider adds simulated noise to the same frame: you see at which noise level the CRC starts rejecting it. Eb/N0, on the slider, is the energy of one bit divided by the noise density.

Decode a frame, step by step

A real frame, taken from the school radio’s recordings. Follow the steps: from a burst of radio pulses to an aircraft’s identity, position or velocity. Demodulation, the integrity check and field decoding run again in your browser.

Frame
Signal
8 dB

Eb/N0 compares the energy of one bit with that of the noise: the lower it is, the stronger the noise. Moving the slider switches to the simulation.

The signal shown is the real recording. Move the slider to replay the same frame with simulated noise.

1. Received signal

Position frame from RYR968E (4CA706), recording 5, 334.6 ms after its start.

  • recorded signal (magnitude of I and Q)
  • preamble
0200400600020406080100120time from the start of the window (µs)amplitude (radio units)preamble112 data bits

This is recording 5 from the school radio, 334.6 ms after its start: 140 µs of signal, at 4 million samples per second. The frame stands out clearly: its amplitude rises to 408, while the background noise before it stays around 16.

The radio gives two numbers per sample (I and Q channels, 4 million samples per second); the curve is their magnitude, sqrt(I² + Q²), which does not depend on the phase of the received wave.

position frame, step 1 of 6: Received signal. No wrong bit, frame intact.

Results

The 9 recordings give 171 valid messages, 163 of them distinct frames (8 are repeats received in another recording). I hear 26 aircraft in them. 75 messages carry a position; 5 of them, all from aircraft 3444C3, are of type 18: an airborne position whose accuracy is not guaranteed. The map draws them dashed, among the 70 others. 23 aircraft have at least one position.

The aircraft around Bordeaux

The positions decoded in the 9 recordings, aircraft by aircraft. The slider replays the recordings one by one.

Area
9 of 9, ≈ 106 s

The recordings carry no timestamp: the seconds are an estimate, derived from the speeds the aircraft announce.

  • successive positions; the arrow shows the announced heading
  • aircraft seen in a single frame
  • positions of unguaranteed quality (type 18)
  • school antenna (ENSEIRB-MATMECA)
  • town
  • airport (“Around Bordeaux” view)
44° N44.5° N45° N45.5° N46° N1° W0.5° W0°0.5° E1° E1.5° E2° E2.5° E3° EAntenna (school)Bordeaux34608336,000 ft4CA35836,000 ftAFR35YC5,225 ft394C0F475 ft40563534,000 ft0200AE37,975 ft34354334,000 ft34538E30,000 ft4CA53236,000 ft3444C341,000 ftRYR968E36,000 ft3420CA35,000 ftVLG80PL34,025 ft394C1432,975 ft39CEA537,975 ftBAW37432,025 ftGOACJ35,025 ft4074B322,500 ft4CA2AD36,000 ft39D702 (1 frame)29,750 ft3CC15837,000 ft471F7D (1 frame)36,975 ft4CA9DF36,000 ftLibourneBriveAngoulêmeArcachonBergeracAgenCahorsPérigueux50 kmN

Up to recording 9, about 106 s after the first, 23 aircraft have given at least one position, out of 26 heard. Between the first and the last recording, an airliner at cruise covers 23 to 27 km.

3 aircraft heard have no position: AIB03KD (38011A), its identification and one status message; 398446, one velocity frame with no content; 405636, one velocity frame.

Positions decoded from the recordings; no live reception. Basemap: OpenStreetMap data. The 9 recordings last 0.5 s each, 4.5 s of signal in all, but they are not consecutive: from the announced speeds, about 1 min 38 s to 1 min 54 s elapse between the first and the last (106 s by least squares). This is an estimate: the file contains no timestamp.

The 26 aircraft as a table
The aircraft heard: frames, positions, altitude, speed, recordings, and whether the teacher’s chain also finds them
AircraftFramesPositionsAltitudeSpeed, headingRecordingsTeacher’s chain
0200AE2137,975 ft419 kt, 23°8yes
3420CA3234,975 – 35,000 ft486 kt, 213°8, 9yes
3435436134,000 ft407 kt, 25°2, 3, 4, 5, 7yes
3444C3115 (type 18)41,000 ft437 kt, 172°1, 2, 3, 4, 5, 6, 7no
VLG80PL 34504218534,000 – 34,025 ft457 kt, 352°1, 2, 3, 4, 5, 6, 7, 9yes
34538E12630,000 ft434 kt, 26°1, 3, 4, 5, 6, 7, 8yes
34608317636,000 ft432 kt, 20°1, 2, 3, 4, 5, 6, 7, 8, 9yes
AIB03KD 38011A20——1, 2yes
AFR35YC 3944E8415,225 ft252 kt, 352°1, 2, 4yes
394C0F64475 – 2,050 ft153 kt, 226°1, 3, 8, 9yes
394C146332,975 ft484 kt, 213°3, 6yes
398446 (single frame)a single frame (velocity, FTC 19) whose velocity fields are all 0 (information not available); no other frame from this address, even with the threshold lowered to 0.510——9no
39CEA56237,975 – 38,000 ft435 kt, 353°2, 3, 5, 7yes
39D702 (single frame)1129,750 ft—4yes
3CC1582137,000 ft414 kt, 181°1, 2yes
4056354434,000 – 34,025 ft—1, 5, 6, 9yes
405636 (single frame)a single frame above the threshold (velocity, FTC 19: 351 kt, heading 168°, descending at 1,536 ft/min), backed by a position read just below the threshold (buffer 5, correlation 0.623, CRC good) at 22,825 ft, consistent with the announced descent10—351 kt, 168°7no
BAW374 406AE317732,025 – 32,900 ft430 kt, 168°1, 2, 3, 4, 5, 6, 7, 8, 9yes
GOACJ 4070795235,000 – 35,025 ft476 kt, 211°3, 4, 5, 6, 7yes
4074B33122,500 ft374 kt, 167°2, 4, 6yes
471F7D (single frame)1136,975 ft—5yes
4CA2AD16736,000 ft477 kt, 337°1, 2, 3, 4, 5, 6, 7, 8, 9yes
4CA3585335,975 – 36,000 ft424 kt, 23°4, 7, 9yes
4CA5324335,975 – 36,000 ft421 kt, 22°1, 2, 5yes
RYR968E 4CA70614636,000 ft462 kt, 336°1, 2, 3, 4, 5, 6, 7, 8, 9yes
4CA9DF4336,000 ft523 kt, 276°1, 2, 5, 6yes

Up to recording 9, about 106 s after the first, 23 aircraft have given at least one position, out of 26 heard. Between the first and the last recording, an airliner at cruise covers 23 to 27 km.

I then compare with the teacher’s chain, supplied in protected form. Its 93 valid messages are all found again. On these recordings, it returns only three message types (identification and two position types); my chain keeps every ADS-B message whose CRC is good, velocities and type 18 included, and so finds 3 more aircraft.

Comparison with the teacher’s chain

The assignment provides a reference chain, in protected form (the teacher’s .p files). Both chains decoded the same 9 recordings.

Messages, frames, positions and aircraft found by the teacher’s chain and by ours
QuantityTeacher’s chainOur chain
Valid messages returned93, including 17 duplicates171 receptions
Distinct frames76163 (8 frames received again in another recording)
Positions87, 70 of them distinct75, 70 of them plotted
Aircraft2326 (extra: 3444C3, 398446 and 405636)
Teacher’s messages found—93/93
By message type
QuantityTeacher’s chainOur chain
Identification (type 4)66
Airborne position (type 11)83, including 17 duplicates66
Airborne position (type 12)44
Position, quality not guaranteed (type 18)not decoded5
Velocity (type 19)not decoded76
Aircraft status (types 28, 29, 31)not decoded14
Total93171

The teacher’s chain returns 93 valid messages, including 17 duplicates (the same frame counted twice, one sample apart): 76 distinct frames, 23 aircraft. Ours returns 171 receptions, 163 distinct frames, 26 aircraft. All 93 of the teacher’s messages are found (93/93), in the same recording, to within one sample and with the same 112 bits; the 95 extra receptions are of types the teacher’s chain does not decode.

The 8 frames received again are genuine transmissions at different times (status messages and velocities unchanged from one recording to the next): they are kept, as the radio received them.

Four aircraft are seen on a single message only. I keep them, but I do not rely on them.

What was taken up afterwards

The blocks of the school project were written, but several had defects.

  • Fixed. Some blocks crashed on certain inputs, the CRC and a position-decoding (CPR) function among them. The decision rule compared energies and made about twice as many errors as it should in simulation; on the recordings, it gave the same bits. A power spectral density (how the signal’s power is spread over frequency) had the wrong scale.
  • Finished. The processing of the recordings, from frame detection to the list of aircraft, without the teacher’s protected files.
  • Checked. Each block was compared with the teacher’s version on fixed inputs, then with the theory in simulation.
  • Ported. The Python chain gives the same 171 messages again, at the same positions, with the same bits.

The chain against noise, in simulation

Before the recordings, three points were checked in simulation against theory: error rate, effect of an unknown delay, shape of the spectrum.

Error rate, synchronised signal (task 1)

  • theory, 0.5·erfc(√(Eb/2N0))
  • measured, MATLAB
  • measured, Python port
  • old rule (comparing energies), MATLAB
10⁻⁴10⁻³10⁻²10⁻¹1012345678910Eb/N0 (dB)bit error rate

At 10 dB, the measured error rate is 7.7·10⁻⁴ (MATLAB) and 7.9·10⁻⁴ (Python), against 7.8·10⁻⁴ in theory. The old rule, which compared the energies of the two halves instead of their amplitudes, made 1.5·10⁻³, 2.0 times more.

At least 200 errors counted per point. Simulated real-valued noise added to every sample; 20 samples per bit.

Unknown delay, frequency and phase (task 4)

  • theory, synchronised receiver (task 1)
  • theory, phase-insensitive decision, 0.5·exp(−Eb/2N0)
  • measured, delay estimated from the preamble
  • measured, true delay given
  • hollow: fewer than 100 errors counted
10⁻⁶10⁻⁵10⁻⁴10⁻³10⁻²10⁻¹102468101214Eb/N0 (dB)bit error rateloss 1.31 dB9.80 dB11.11 dB

An error rate of 10⁻³ is reached at 11.11 dB instead of 9.80 dB in theory for the synchronised receiver of task 1: a 1.31 dB loss. Most of it, 1.18 dB (1.14 dB in theory), comes from the phase-insensitive decision the assignment requires; synchronising on the preamble only costs 0.13 dB. The Python port, with other random draws, finds 1.30 dB.

MATLAB measurements: at least 3,000 frames and 300 errors per point, at most 30,000 frames. Delay drawn between 0 and 100 samples, frequency offset within ±1 kHz, any phase.

Spectrum of the transmitted signal (task 2)

  • estimated (Welch, 2,000 FFTs of 256 points)
  • theoretical, sampled
  • theoretical, continuous formula
  • ¼·δ(f) line
−120−100−80−60−10−50510frequency (MHz)power spectral density (dB/Hz)¼·δ(f) line

The estimate (2,000 FFTs of 256 points) differs on average by 0.19 dB from the sampled theory, and by 0.48 dB from the continuous formula up to 5 MHz; higher up, the continuous formula falls below the estimate, an aliasing effect. The line at 0 equals ¼·δ(f) to a ratio of 1.001, and the measured power is 0.50.

Simulated signal (Fs = 20 MHz, 20 samples per bit), not the recordings. The zeros of the PSD (−∞ dB) are cut at the bottom of the plot.

Limits

  • No live reception. I have never received an aircraft with a radio. Everything comes from the recordings supplied with the assignment: 4.5 s of signal.
  • Estimated duration. The recordings carry no date and are not consecutive. I count between 1 min 38 s and 1 min 54 s from the first to the last, estimated from the announced speeds. It is an estimate, not a measurement.
  • No external check. I did not compare the positions with a tracking site.
  • Simulated noise. The noise curves come from a model, not from the radio’s real noise.

What I take from it

An integrity check changes the nature of the result: a damaged frame is rejected, not placed wrongly on the map. Comparing two chains message by message, to within one sample, teaches more than a vague “it roughly works”. Taking up an unfinished project also forced me to write down plainly what works and what does not exist.

Data and references

Recordings: the assignment’s public repository, github.com/rtajan/TS229, recorded by the software-defined radio used by the course. ADS-B messages are broadcast in the clear. Basemap: OpenStreetMap data (© OpenStreetMap contributors), shown with Leaflet; without JavaScript, a diagram in kilometres around the school stands in for it.

Code access

Public repository

Links

Next projectBA-Prestige Auto: car imports and online vehicle registration