Reset a train's turn point on a new playback epoch

- A clock correction starts a new epoch, and playback may first draw its
  second report. The turn point now resets on a new epoch as well as on a
  break, so a standing train no longer turns around after a correction.
- recallDirection and earlierFixes are gone: comparing each earlier report
  with the newest turned a standing train on GPS jitter. A train bound when
  its line arrives late shows no direction until it has moved 15 m.
- Tests share reportDirections, iconOf and the playback helper.
- Comments and CURRENT-STATE match the code.
This commit is contained in:
German Khokhlov committed 2026-11-19 00:26:57 +04:00
1 parent 58afb169d1
commit e8ef4d1293
8 files changed
+108 -131

No files matched your search

+2 -1
View File
@@ -1134,7 +1134,8 @@ 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.
// Just let go of a hold (cockpitSubject.js): it played on, so keep
// its clock.
const playedOn = entry.releasedFromHold === true;
entry.releasedFromHold = false;
if (visible) state._visible.add(entry);