An estimated aircraft position stands in on the trail only until the next received one (#1817)

* An estimated aircraft position stands in on the trail only until the next received one

* Changelog fragment for #1817
This commit is contained in:
Sameh Khamis authored and GitHub committed 2026-11-18 14:05:39 -08:00
1 parent 522f5b415d
commit d6972f8b78
8 files changed
+126 -8

No files matched your search

+3
View File
@@ -336,6 +336,9 @@ export class FlightRecords {
geoAltitudeM,
renderAltitudeM,
renderAltitudeInvented,
// The feed estimated this position: it places the aircraft, and stands
// in on the tracked trail only until the next received report.
estimated: observation.estimated === true,
groundM: Number.isFinite(groundM) ? groundM : null,
onGround,
// Round 7: sticky airborne history — the landed fast-cull only
+1
View File
@@ -217,6 +217,7 @@ export function createFlightSnapshotRenderer({
{
nullAltitude: meta.renderAltitudeInvented === true,
track: meta.true_track,
estimated: meta.estimated === true,
},
);
} else {
+6 -4
View File
@@ -336,15 +336,17 @@ export function createTracking({
* @param {{x: number, y: number, z: number}} position - The report's ECEF position.
* @param {number} [epochMs] - The report's time; defaults to the tracked
* aircraft's newest position-history fix, which every caller has just pushed.
* @param {{nullAltitude?: boolean, track?: number}} [options] - `nullAltitude`:
* @param {{nullAltitude?: boolean, track?: number, estimated?: boolean}} [options] - `nullAltitude`:
* the report had no altitude, so its position is not kept and the line
* breaks there; `track`: its reported track, which the line leaves it along.
* breaks there; `track`: its reported track, which the line leaves it along;
* `estimated`: the feed estimated it, so it stands in only until the next
* received report.
*/
function _appendTrailFix(
position,
epochMs,
{ nullAltitude = false, track = undefined } = {},
{ nullAltitude = false, track = undefined, estimated = false } = {},
) {
const history = flightState._positionHistory.get(flightState._trackedIcao);
const timeMs = Number.isFinite(epochMs)
@@ -355,7 +357,7 @@ export function createTracking({
position,
timeMs,
TRAIL_MAX_POINTS,
{ nullAltitude, track },
{ nullAltitude, track, estimated },
);
_refreshTrailDisplay();
}