mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-15 01:25:11 +01:00
Whether a train is at a passenger stop (IsAtPassengerStop) was checked against the final approach margins fMinProximityDist and fMaxProximityDist, which are themselves set from that flag: 10-15 m and 15-40 m at a stop, 8 m and 50 m otherwise. With the two sets different, the flag switched on and off on every other scan of the route on the way to a W4. Each time the train went from a final approach to a stop 50 m long to one 15 m long and back: braking in one scan, full power below the 10 km/h coasting speed in the next. Close to the stop the braking demand did not hold the train to a standstill, and below 1 km/h the stop counted as done, so an SN61 drove off without ever standing still (#290). The margins are now worked out in train_proximity_margins(), and the check of the stop uses the margins of a passenger stop whatever the flag is at the moment. A vehicle that is not a train keeps the present ones, as before.
387 KiB
387 KiB