Require more fields to be populated in BDS5,0/BDS6,0 before we'll accept them at all.
Before: 7090 GICB_CAPS 10667 AMBIGUOUS 19173 EMPTY_RESPONSE 62527 UNKNOWN 76469 AIRCRAFT_IDENT 127603 ACAS_RA 210286 HEADING_SPEED 223068 DATALINK_CAPS 232824 TRACK_TURN 271598 VERTICAL_INTENT 2517 "suspicious" After: 575 AMBIGUOUS 7090 GICB_CAPS 19173 EMPTY_RESPONSE 71686 UNKNOWN 76469 AIRCRAFT_IDENT 127603 ACAS_RA 212887 HEADING_SPEED 223068 DATALINK_CAPS 230008 TRACK_TURN 272746 VERTICAL_INTENT 861 "suspicious"
This commit is contained in:
parent
c9bea6a21c
commit
d5741bf8c8
4
comm_b.c
4
comm_b.c
|
@ -459,7 +459,7 @@ static int decodeBDS50(struct modesMessage *mm, bool store)
|
||||||
unsigned tas_valid = getbit(msg, 46);
|
unsigned tas_valid = getbit(msg, 46);
|
||||||
unsigned tas_raw = getbits(msg, 47, 56);
|
unsigned tas_raw = getbits(msg, 47, 56);
|
||||||
|
|
||||||
if (!roll_valid && !track_valid && !gs_valid && !track_rate_valid && !tas_valid) {
|
if (!roll_valid || !track_valid || !gs_valid || !tas_valid) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -621,7 +621,7 @@ static int decodeBDS60(struct modesMessage *mm, bool store)
|
||||||
unsigned inertial_rate_sign = getbit(msg, 47);
|
unsigned inertial_rate_sign = getbit(msg, 47);
|
||||||
unsigned inertial_rate_raw = getbits(msg, 48, 56);
|
unsigned inertial_rate_raw = getbits(msg, 48, 56);
|
||||||
|
|
||||||
if (!heading_valid && !ias_valid && !mach_valid && !baro_rate_valid && !inertial_rate_valid) {
|
if (!heading_valid || !ias_valid || !mach_valid || (!baro_rate_valid && !inertial_rate_valid)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue