Skip to content

Commit

Permalink
make tracks statistics consistent across various settings
Browse files Browse the repository at this point in the history
aircraft not seen for 5 min: new track when seen again
  • Loading branch information
wiedehopf committed Jan 21, 2025
1 parent c373053 commit d3aa118
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion aircraft.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ struct aircraft *aircraftCreate(uint32_t addr) {

// initialize data validity ages
//adjustExpire(a, 58);
Modes.stats_current.unique_aircraft++;

updateTypeReg(a);

Expand Down
3 changes: 3 additions & 0 deletions track.c
Original file line number Diff line number Diff line change
Expand Up @@ -1943,6 +1943,9 @@ struct aircraft *trackUpdateFromMessage(struct modesMessage *mm) {

// only count the aircraft as "seen" for reliable messages with CRC
if (mm->address_reliable) {
if (now - a->seen > 300 * SECONDS) {
Modes.stats_current.unique_aircraft++;
}
a->seen = now;
}

Expand Down

0 comments on commit d3aa118

Please sign in to comment.