mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 01:02:23 +00:00
fix(flights): panels show the reported ground speed while a placement waits
A host-supplied placement's speed is how fast the marker is drawn. While it waits for its fixes to catch up it stands still at 0, so tracked-aircraft panels and the cockpit readout showed 0 m/s for an aircraft in flight. displayedKinematics now takes derivedFromPlacement: when the drawn speed is a placement's, the reported ground speed is shown, and the placement's only when nothing is reported. The placement speed still drives motion and dead reckoning. Civil and military tracked descriptors pass it from the new _drSpeedPlaced scratch, which placeLiveAircraft sets.
This commit is contained in:
1 parent
953af60e1d
commit
d79494ac89
8 files changed
+98
-6
No files matched your search
@@ -109,6 +109,7 @@ export function createQueries({
|
||||
derivedSpeedMps: flightState._drSpeedMps,
|
||||
derivedTrackDeg: flightState._drCourseDeg,
|
||||
reportedSpeedMps: info?.speedMps,
|
||||
derivedFromPlacement: flightState._drSpeedPlaced === true,
|
||||
reportedTrackDeg: info?.track,
|
||||
});
|
||||
const carto = toLonLatH(basePos);
|
||||
|
||||
@@ -230,6 +230,12 @@ export function createFlightState({ source, services }) {
|
||||
|
||||
flightState._drSpeedMps = null;
|
||||
|
||||
/** Sibling scratch: whether `_drSpeedMps` is a host-supplied placement's,
|
||||
* the speed it is drawn at (0 while it waits for its fixes), for motion
|
||||
* only; panels show the reported ground speed (`displayedKinematics`). */
|
||||
|
||||
flightState._drSpeedPlaced = false;
|
||||
|
||||
flightState._drCourseHold = false;
|
||||
|
||||
/** Set by `_deadReckon`: following the clock, the time drawn is well
|
||||
|
||||
Reference in new issue
Block a user