The Error Correction parameter on the ADS-B Decoder determines what happens when a received message fails the CRC-24 parity check. Because ADS-B uses a 24-bit CRC (polynomial 0xFFFA048 / generator 1 + x + x² + ... + x¹² + x¹⁴ + x²¹ + x²⁴), burst errors of a small number of contiguous bits can sometimes be identified and corrected from the CRC residual (syndrome).
Options
"None" (default)
No error correction is attempted. Only messages whose bits produce a CRC residual of zero are decoded and published on the decoded port. Messages that fail the CRC are silently discarded.
This is the lowest-CPU option and produces the fewest false decodes.
"Conservative"
Applies syndrome-based forward error correction for contiguous burst errors of 1 or 2 bits.
Use "Conservative" in noisy RF environments, such as when receiving aircraft at long range or with a low-gain antenna. It recovers a meaningful fraction of otherwise-discarded messages without a significant false-positive rate.
How it works:
At block initialisation, the decoder pre-computes a syndrome lookup table for all possible contiguous burst error patterns of length 1 and length 2 across both 56-bit and 112-bit payloads:
for burst in range(1, 3): # burst lengths 1 and 2
compute_crc_syndromes_for_contiguous_bursts(56, burst)
compute_crc_syndromes_for_contiguous_bursts(112, burst)
For each possible error position i and burst length b, a zero array of the payload length is constructed with b consecutive 1s at position i. The CRC of this error pattern (the syndrome) is computed and stored in a dictionary keyed by its integer value:
lut[crc_residual_decimal] = [i, i+1, ..., i+b-1]
When a message fails the initial CRC check, correct_burst_errors is called:
- The CRC-24 residual of the full payload (including the appended CRC field) is computed.
- The residual integer is looked up in the pre-computed syndrome table for the appropriate payload length.
- If a matching syndrome is found, the bits at the indicated positions are flipped.
- The CRC is recomputed. If the result is zero, error correction succeeded and the message is decoded normally. If not, the correction is rejected and the message is discarded.
"Brute Force"
Brute Force error correction is not yet implemented. Selecting this option causes the decoder to log a critical error message and return without decoding the message. Do not use this option in production flowgraphs.
Comparison
| Mode | CPU cost | False-positive risk | Recovery capability |
|---|
| None | Minimal | None | No recovery |
| Conservative | Low | Very low | Contiguous 1-bit and 2-bit bursts |
| Brute Force | N/A | N/A | Not implemented |
Syndrome collision safety
During pre-computation, the decoder checks for syndrome collisions — situations where two different error patterns produce the same CRC residual. If a collision is detected, the initialisation raises an error. The CRC-24 polynomial used by Mode S has sufficient Hamming distance that no collisions occur for the supported burst lengths of 1 and 2 bits.
Implementation reference
The relevant methods in decoder.py are:
compute_crc_syndromes_for_contiguous_bursts(payload_length, burst_length) — builds the syndrome lookup table at init time.
correct_burst_errors() — looks up and applies a correction at decode time.
correct_errors() — dispatches to the appropriate correction method based on self.error_corr.