mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
fix(military): don't treat adsb.lol's position-less rows as a partial snapshot
readsb omits lat/lon for a contact heard without a current position; about a third of every /v2/mil response is such rows. They made every military snapshot partial, so a contact that left the feed was retained at full opacity for five minutes instead of fading and leaving on the missed-poll limits. A row with a hex and no lat/lon now leaves the snapshot complete and is listed in retainIds, as OpenSky's null-position rows already are.
This commit is contained in:
1 parent
15de9d738c
commit
60dad0c35e
7 files changed
+151
-37
No files matched your search
@@ -187,9 +187,12 @@ export class MilitaryFlightRecords {
|
||||
fixEpochMs: aircraft.positionTimeMs ?? observedAtMs,
|
||||
};
|
||||
}
|
||||
absence(id, { complete, likelyLanded }) {
|
||||
absence(id, { complete, retainIds, likelyLanded }) {
|
||||
// Partial admissions and position-less rows do not prove absence, but
|
||||
// retention remains bounded; a likely-landed position-less contact
|
||||
// still takes the landed limit.
|
||||
if (
|
||||
!complete &&
|
||||
(!complete || (retainIds?.has(id) && !likelyLanded)) &&
|
||||
Date.now() - (this.data.get(id)?.observedReceiptMs ?? 0) < 300000
|
||||
)
|
||||
return 'retain';
|
||||
|
||||
Reference in new issue
Block a user