The followed aircraft's trail runs to where the aircraft is drawn

When an application places live contacts itself, the tracked trail was cut at the layer's own delayed clock, which can run minutes behind the placed aircraft: the trail ended far behind the aircraft, and its head was dropped while that clock warmed up. The trail now reads the aircraft's time off its own reports at the point where it is drawn, for Flights and Military Flights.
This commit is contained in:
Sameh Khamis committed 2026-11-17 17:36:36 -08:00
1 parent 2f0c01eaa7
commit 914b28822a
10 files changed
+374 -15

No files matched your search

+13
View File
@@ -349,6 +349,8 @@ export function createMotion({
const sameTrack =
flightState._drReconcileValid && flightState._drReconcileIcao === icao24;
const raw = _deadReckon(icao24, flightState._scratchDrRaw);
flightState._cachedDRPlaced =
Boolean(raw) && flightState._drSpeedPlaced === true;
flightState._cachedDRCourse = flightState._drCourseDeg;
flightState._cachedDRSpeedMps = flightState._drSpeedMps;
flightState._cachedDRHold = flightState._drCourseHold;
@@ -475,6 +477,16 @@ export function createMotion({
* later in the frame, so recomputing _trackedDisplayPosition there jitters the label against the
* now-stable plane. Null when no valid fix (callers fall back to the icon position). */
/** Whether a host-supplied placement placed the tracked aircraft where
* `_trackedDisplayCached` holds it this frame, rather than this layer's
* own motion at its display delay. */
function _trackedPlaced() {
return (
_trackedDisplayCached() !== null && flightState._cachedDRPlaced === true
);
}
function _trackedDisplayCached() {
return flightState._drReconcileValid &&
flightState._drReconcileIcao === flightState._trackedIcao
@@ -697,6 +709,7 @@ export function createMotion({
_trackedFocusSizePx,
_trackedDisplayPosition,
_trackedDisplayCached,
_trackedPlaced,
_trackedVisualCached,
_trackedModelCenterWorld,
_trackedModelEnvelopeM,