mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 01:32:19 +00:00
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:
1 parent
522f5b415d
commit
d6972f8b78
8 files changed
+126
-8
No files matched your search
@@ -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
|
||||
|
||||
@@ -217,6 +217,7 @@ export function createFlightSnapshotRenderer({
|
||||
{
|
||||
nullAltitude: meta.renderAltitudeInvented === true,
|
||||
track: meta.true_track,
|
||||
estimated: meta.estimated === true,
|
||||
},
|
||||
);
|
||||
} else {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user