fix(flights): a trail does not join its track history across a landing or take-off that was not seen

This commit is contained in:
Sameh Khamis committed 2026-11-13 12:53:18 -08:00
1 parent 693faae44e
commit 7e45d4d989
7 files changed
+215 -12

No files matched your search

+8 -1
View File
@@ -550,7 +550,7 @@ export function createTracking({
clone(fix.position),
historyFixEpochMs(fix),
TRAIL_MAX_POINTS,
{ nullAltitude: fix.inventedHeight === true },
{ nullAltitude: fix.inventedHeight === true, onGround: fix.onGround },
);
}
if (!flightState._trail && flightState._viewer) {
@@ -677,10 +677,17 @@ export function createTracking({
};
}),
);
// A history that ends in the air does not join an aircraft now on the
// ground (or the reverse) across a landing or take-off nobody saw.
flightState._trailFixes = joinTrailBackfill(
backfill,
flightState._trailFixes,
TRAIL_MAX_POINTS,
{
backfillEndsOnGround: parsed[parsed.length - 1].onGround,
onGroundNow: flightState.records.data.get(icao24)?.onGround,
nowMs: flightState.now(),
},
);
_refreshTrailDisplay();
}