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

@ -959,6 +959,7 @@ static char * appendStatsJson(char *p,
",\"local_range\":%u"
",\"local_speed\":%u"
",\"filtered\":%u}"
",\"altitude_suppressed\":%u"
",\"cpu\":{\"demod\":%llu,\"reader\":%llu,\"background\":%llu}"
",\"tracks\":{\"all\":%u"
",\"single_message\":%u}"
@ -977,6 +978,7 @@ static char * appendStatsJson(char *p,
st->cpr_local_range_checks,
st->cpr_local_speed_checks,
st->cpr_filtered,
st->suppressed_altitude_messages,
(unsigned long long)demod_cpu_millis,
(unsigned long long)reader_cpu_millis,
(unsigned long long)background_cpu_millis,