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:
parent
38845c2447
commit
bfe2cb0336
6 changed files with 164 additions and 42 deletions
12
stats.c
12
stats.c
|
|
@ -124,15 +124,23 @@ void display_stats(struct stats *st) {
|
|||
|
||||
printf("%u global CPR attempts with valid positions\n"
|
||||
"%u global CPR attempts with bad data\n"
|
||||
" %u global CPR attempts that failed the range check\n"
|
||||
" %u global CPR attempts that failed the speed check\n"
|
||||
"%u global CPR attempts with insufficient data\n"
|
||||
"%u local CPR attempts with valid positions\n"
|
||||
"%u local CPR attempts with insufficient data\n"
|
||||
" %u local CPR attempts that failed the range check\n"
|
||||
" %u local CPR attempts that failed the speed check\n"
|
||||
"%u CPR messages that look like transponder failures filtered\n",
|
||||
st->cpr_global_ok,
|
||||
st->cpr_global_bad,
|
||||
st->cpr_global_range_checks,
|
||||
st->cpr_global_speed_checks,
|
||||
st->cpr_global_skipped,
|
||||
st->cpr_local_ok,
|
||||
st->cpr_local_skipped,
|
||||
st->cpr_local_range_checks,
|
||||
st->cpr_local_speed_checks,
|
||||
st->cpr_filtered);
|
||||
|
||||
printf("%u unique aircraft tracks\n", st->unique_aircraft);
|
||||
|
|
@ -228,8 +236,12 @@ void add_stats(const struct stats *st1, const struct stats *st2, struct stats *t
|
|||
target->cpr_global_ok = st1->cpr_global_ok + st2->cpr_global_ok;
|
||||
target->cpr_global_bad = st1->cpr_global_bad + st2->cpr_global_bad;
|
||||
target->cpr_global_skipped = st1->cpr_global_skipped + st2->cpr_global_skipped;
|
||||
target->cpr_global_range_checks = st1->cpr_global_range_checks + st2->cpr_global_range_checks;
|
||||
target->cpr_global_speed_checks = st1->cpr_global_speed_checks + st2->cpr_global_speed_checks;
|
||||
target->cpr_local_ok = st1->cpr_local_ok + st2->cpr_local_ok;
|
||||
target->cpr_local_skipped = st1->cpr_local_skipped + st2->cpr_local_skipped;
|
||||
target->cpr_local_range_checks = st1->cpr_local_range_checks + st2->cpr_local_range_checks;
|
||||
target->cpr_local_speed_checks = st1->cpr_local_speed_checks + st2->cpr_local_speed_checks;
|
||||
target->cpr_filtered = st1->cpr_filtered + st2->cpr_filtered;
|
||||
|
||||
// aircraft
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue