When considering whether to suppress altitude messages, ignore mlat DF17s.
This commit is contained in:
parent
f1f76cb8e3
commit
de4e233969
6
track.c
6
track.c
|
@ -508,12 +508,12 @@ struct aircraft *trackUpdateFromMessage(struct modesMessage *mm)
|
||||||
a->modeACflags &= ~MODEAC_MSG_MODEC_HIT;
|
a->modeACflags &= ~MODEAC_MSG_MODEC_HIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we received an altitude in a DF17/18 squitter recently, ignore
|
// If we received an altitude in a (non-mlat) DF17/18 squitter recently, ignore
|
||||||
// DF0/4/16/20 altitudes as single-bit errors can attribute them to the wrong
|
// DF0/4/16/20 altitudes as single-bit errors can attribute them to the wrong
|
||||||
// aircraft
|
// aircraft
|
||||||
if ((a->bFlags & MODES_ACFLAGS_ALTITUDE_VALID) &&
|
if ((a->bFlags & ~a->mlatFlags & MODES_ACFLAGS_ALTITUDE_VALID) &&
|
||||||
(now - a->seenAltitude) < 15000 &&
|
(now - a->seenAltitude) < 15000 &&
|
||||||
(a->bFlags & MODES_ACFLAGS_LATLON_VALID) &&
|
(a->bFlags & ~a->mlatFlags & MODES_ACFLAGS_LATLON_VALID) &&
|
||||||
(now - a->seenLatLon) < 15000 &&
|
(now - a->seenLatLon) < 15000 &&
|
||||||
mm->msgtype != 17 &&
|
mm->msgtype != 17 &&
|
||||||
mm->msgtype != 18) {
|
mm->msgtype != 18) {
|
||||||
|
|
Loading…
Reference in a new issue