Don't use DF0/4/16/20 altitudes when DF17/18 altitudes are available.

The DF17/18 values are generally more trustworthy as they have full
CRC coverage. Errors in the CRC bits of a DF0/4/16/20 message can
result in the contained altitude being attributed to the wrong aircraft.
This commit is contained in:
Oliver Jowett 2015-06-26 20:43:46 +01:00
parent 5c2ec7106e
commit 8d1df036ae
4 changed files with 25 additions and 3 deletions

View file

@ -151,6 +151,7 @@ void display_stats(struct stats *st) {
st->cpr_local_speed_checks,
st->cpr_filtered);
printf("%u non-ES altitude messages from ES-equipped aircraft ignored\n", st->suppressed_altitude_messages);
printf("%u unique aircraft tracks\n", st->unique_aircraft);
printf("%u aircraft tracks where only one message was seen\n", st->single_message_aircraft);
@ -325,6 +326,8 @@ void add_stats(const struct stats *st1, const struct stats *st2, struct stats *t
target->cpr_local_speed_checks = st1->cpr_local_speed_checks + st2->cpr_local_speed_checks;
target->cpr_filtered = st1->cpr_filtered + st2->cpr_filtered;
target->suppressed_altitude_messages = st1->suppressed_altitude_messages + st2->suppressed_altitude_messages;
// aircraft
target->unique_aircraft = st1->unique_aircraft + st2->unique_aircraft;
target->single_message_aircraft = st1->single_message_aircraft + st2->single_message_aircraft;