mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 02:02:21 +00:00
Keep a standing train's direction through jitter and missing bearings
- GPS jitter under 15 m at a standing train no longer turns it, in reports and in playback; a reversal needs at least 15 m of movement. - A standing train keeps its operator's last bearing through reports that leave it out. - Playback resets its turn point at a break, so a jump to a corrected position is not a reversal. - A train bound while its line is still loading takes its direction from the movement it already made. - A vehicle in view that leaves a Transit hold goes on from its own clock instead of rewinding. - Tests cover the 15 m boundary, the late line, the hold release and the icon after Transit is turned back on; duplicate jitter tests are merged. - FOLLOW_MIN_MOVE_M is gone; comments and CURRENT-STATE match the code.
This commit is contained in:
1 parent
df4d76384c
commit
58afb169d1
10 files changed
+291
-127
No files matched your search
@@ -1134,13 +1134,17 @@ export function createRendering({ state, services, parts }) {
|
||||
visibility.noSample = noSample;
|
||||
const wasShown = entry.marker.show;
|
||||
const wasVisible = state._visible.has(entry);
|
||||
// Let go of a hold, it played on (cockpitSubject.js): its clock stands.
|
||||
const playedOn = entry.releasedFromHold === true;
|
||||
entry.releasedFromHold = false;
|
||||
if (visible) state._visible.add(entry);
|
||||
else state._visible.delete(entry);
|
||||
// Turned afresh once back in view: the camera may have moved while it
|
||||
// was out, after the pass that would have turned it.
|
||||
if (visible && !wasVisible) entry.rotationCourse = undefined;
|
||||
if (visible && entry.track?.count) {
|
||||
if (!wasVisible && !entry.qaFixture) syncPlayback(entry, now);
|
||||
if (!wasVisible && !playedOn && !entry.qaFixture)
|
||||
syncPlayback(entry, now);
|
||||
// Re-entry can advance into an unprepared corridor; loaded tiles can
|
||||
// also resolve a cold path without a poll or a render-loop wakeup.
|
||||
if (!wasVisible || entry.surfaceReady === false || entry.heightPending)
|
||||
|
||||
Reference in new issue
Block a user