diff --git a/aircraft.c b/aircraft.c index 828723ae..733149bb 100644 --- a/aircraft.c +++ b/aircraft.c @@ -160,7 +160,6 @@ struct aircraft *aircraftCreate(uint32_t addr) { // initialize data validity ages //adjustExpire(a, 58); - Modes.stats_current.unique_aircraft++; updateTypeReg(a); diff --git a/track.c b/track.c index 74e29ea7..0b075f53 100644 --- a/track.c +++ b/track.c @@ -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; }