mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 17:22:19 +00:00
Rail cockpit rides: no height on an unknown floor, a standing train keeps its direction
- railHeightM is null while the train is drawn on the ellipsoid (floor quality 0) instead of -1.5 m, so a view waits for the surface. - An arc step between two reports tells which way a train runs only above 15 m, the layer's parked-train jitter (FOLLOW_MIN_MOVE_M). GPS jitter of a standing train no longer flips the direction through the playback segments, which turned a ride 180 degrees every poll. - drawDirection, a copy of direction, becomes a directionPlayed flag.
This commit is contained in:
1 parent
134138931f
commit
a7d966ae7e
4 files changed
+105
-17
No files matched your search
@@ -205,7 +205,10 @@ export function createRailCockpitSubject({
|
||||
finiteOrNull(drawn?.lat) ?? finiteOrNull(sample?.lat) ?? record.lat;
|
||||
position.longitude =
|
||||
finiteOrNull(drawn?.lon) ?? finiteOrNull(sample?.lon) ?? record.lon;
|
||||
position.railHeightM = Number.isFinite(drawn?.h) ? drawn.h - liftM : null;
|
||||
// Quality 0 is the ellipsoid a train is drawn on while no floor is
|
||||
// known: no height, so a view waits for the surface.
|
||||
position.railHeightM =
|
||||
Number.isFinite(drawn?.h) && drawn.q > 0 ? drawn.h - liftM : null;
|
||||
position.heightQuality = Number.isFinite(drawn?.q) ? drawn.q : 0;
|
||||
position.atMs = finiteOrNull(drawn?.at);
|
||||
|
||||
|
||||
Reference in new issue
Block a user