CRC reimplementation to be byte-at-a-time table-driven.
Also be smarter about error correction, avoiding ambiguous cases when --aggressive is specified.
This commit is contained in:
parent
0d3fcfff2e
commit
270a22e06a
8 changed files with 438 additions and 237 deletions
6
mode_s.c
6
mode_s.c
|
@ -333,7 +333,11 @@ void decodeModesMessage(struct modesMessage *mm, unsigned char *msg) {
|
|||
// using the results. Perhaps check the ICAO against known aircraft, and check
|
||||
// IID against known good IID's. That's a TODO.
|
||||
//
|
||||
mm->correctedbits = fixBitErrors(msg, mm->msgbits, Modes.nfix_crc, mm->corrected);
|
||||
struct errorinfo *ei = modesChecksumDiagnose(mm->crc, mm->msgbits);
|
||||
if (ei != NULL && ei->errors <= Modes.nfix_crc) {
|
||||
modesChecksumFix(msg, ei);
|
||||
mm->correctedbits = ei->errors;
|
||||
}
|
||||
|
||||
// If we correct, validate ICAO addr to help filter birthday paradox solutions.
|
||||
if (mm->correctedbits) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue