NUCp tracking and CPR position sanity checks.

Track NUCp when we compute positions.

Do speed checks when we have an updated position with the same or worse NUCp
before accepting the new position. Don't do speed checks on new postions if
they improve NUCp - assume that the new position is better.

Include NUCp in aircraft.json

Gather stats on reasons for rejecting CPR data due to range/speed check failures.

Expire old positions if we have had no updates for 60 seconds.

Closes #16, closes #17.
This commit is contained in:
Oliver Jowett 2015-02-18 00:12:35 +00:00
parent 38845c2447
commit bfe2cb0336
6 changed files with 164 additions and 42 deletions

View file

@ -102,8 +102,12 @@ struct stats {
unsigned int cpr_global_ok;
unsigned int cpr_global_bad;
unsigned int cpr_global_skipped;
unsigned int cpr_global_range_checks;
unsigned int cpr_global_speed_checks;
unsigned int cpr_local_ok;
unsigned int cpr_local_skipped;
unsigned int cpr_local_range_checks;
unsigned int cpr_local_speed_checks;
unsigned int cpr_filtered;
// aircraft: