RF signal characteristics
| Parameter | Value |
|---|---|
| Center frequency | 1090 MHz |
| Modulation | Pulse Position Modulation (PPM) |
| Symbol rate | 1 Msym/s (SYMBOL_RATE = 1e6) |
| Minimum sample rate | 2 Msps (2 samples per symbol) |
| Short message duration | ~64 µs (56 bits) |
| Long message duration | ~120 µs (112 bits) |
Preamble detection (Framer block)
Before any data bits can be demodulated, the Framer must locate the start of each ADS-B burst within the continuous sample stream.Preamble structure
Every ADS-B message is preceded by an 8-symbol (16 half-symbol pulse) preamble. At 1 Msym/s, the preamble occupies 8 µs. The expected preamble pattern in half-symbol units is:1 indicates a pulse above half the amplitude of the first detected pulse; a 0 indicates noise or silence.
Detection algorithm
Threshold detection
The input power samples (float32, representing I² + Q²) are compared against a user-configurable threshold. Samples above the threshold are marked
1; samples below are marked 0, producing a binary pulse array.Edge detection
Subtracting the pulse array from a one-sample-delayed copy yields transition indicators:
+1 for rising edges and -1 for falling edges.Pulse center calculation
The center index of each detected pulse is computed as the mean of the corresponding rising and falling edge indices.
Preamble correlation
For each candidate pulse center, the amplitudes at each half-symbol offset are sampled and compared against half the amplitude of the candidate pulse. The resulting binary pattern is compared against the expected preamble. A burst is declared only when all 16 half-symbol positions match exactly.
SNR estimation and stream tagging
Once a preamble is confirmed, the burst SNR is estimated and the start of the burst is tagged on the sample stream. The SNR uses the detected pulse amplitude as signal power and the median of the preceding 100 samples as noise power. A +1.6 dB correction accounts for the fact that the median of a Rayleigh-distributed variable is 1.6 dB below its mean.The tag is written to the sample stream with key
"burst" and value ("SOB", snr) at the burst start offset.To avoid redundant preamble searches within an active burst, the Framer tracks the expected end-of-burst index (
prev_eob_idx) and skips any pulse candidate that falls within an ongoing packet.Bit demodulation (Demod block)
The Demod block reads the stream tags produced by the Framer and extracts the bit values from each burst using PPM decoding.PPM decoding principle
In Pulse Position Modulation, each symbol period is divided into two equal half-periods:- A pulse in the first half = bit
1 - A pulse in the second half = bit
0
Bit extraction
After skipping the 8-symbol preamble, the Demod block samples the amplitude at the expected bit-1 and bit-0 positions for all 112 bit slots, then assigns each bit based on which half had the higher amplitude:Bit confidence metric
A log-likelihood ratio is computed for each bit position. Values near zero indicate ambiguous bits; large positive values indicate confident1s; large negative values indicate confident 0s. This metric is stored internally but is not currently forwarded to the Decoder.
PDU output
Each decoded burst is emitted as a GNU Radio PDU (Protocol Data Unit) on thedemodulated message port:
timestamp (UTC seconds since epoch, derived from the sample offset) and snr (dB, from the Framer tag).
CRC verification (Decoder block)
The Decoder receives PDUs from the Demod block and first checks whether the message’s parity field is valid before attempting to decode the contents.CRC polynomial
The CRC-24 polynomial used is0xFFFA048, represented as a coefficient array:
CRC computation
The CRC is computed using standard binary polynomial long division over GF(2). The data bits (excluding the final 24 parity bits) are shifted by 24 positions and then XOR’d with the polynomial at each1 bit:
Parity check rules by DF
- DF 17, 18, 19 (ES)
- DF 11
- DF 0, 4, 5 (56-bit)
- DF 16, 20, 21 (112-bit)
The PI (Parity/Interrogator ID) field at bits 88–111 must equal the CRC computed over bits 0–87:This is a self-contained check; no prior knowledge of the aircraft is required.
Error correction
When a message fails its initial CRC check, gr-adsb can optionally attempt to correct it. Three modes are available, selected at block construction time via theerror_corr parameter.
None (default)
None (default)
No correction is attempted. Only messages that pass the CRC check unmodified are forwarded to the decode stage.
Conservative — burst error correction
Conservative — burst error correction
Attempts to correct contiguous burst errors of 1 or 2 bits using a pre-computed CRC syndrome lookup table. At startup, the Decoder precomputes the syndrome for every possible single- and double-bit contiguous burst error position across both 56-bit and 112-bit message lengths.At decode time, the CRC residual of the failed message is used as a lookup key. If a matching syndrome is found, the corresponding bit positions are flipped and the CRC is re-checked:
Brute Force — not yet implemented
Brute Force — not yet implemented
Intended to try a wider range of error patterns beyond contiguous bursts. The mode is recognized by the Decoder but currently logs a critical message and returns without any correction: