uniba-swt / swtbahn-cli

A client-server command line interface for the SWTbahn.
GNU General Public License v3.0
7 stars 3 forks source link

Incorrect driving direction on reverser #121

Closed BLuedtke closed 1 year ago

BLuedtke commented 1 year ago

For automatic route driving, the driving direction is determined automatically.

When a train is on the reverser, this is not trivial. And there seems to be one scenario where we get the driving direction wrong.

Scenario where it works: Train is oriented/driving in a clockwise direction, on a route that has the destination signal 35a (on the reverser area). Train enters the reverser area from point 23. Is automatically stopped upon reaching the overlap at signal35a (T64). Now, selecting a new route from either signal35a or signal32 will result in the correct driving direction in automatic mode.

Scenario with the problem: Train is oriented/driving in a clockwise direction, on a route that has the destination signal 32 (on the reverser area). Train enters the reverser area coming from point 24. Is automatically stopped upon reaching the overlap at signal32 (T62). Now, selecting a new route from either signal35a or signal32 will result in the wrong (inversed) driving direction in automatic mode!
When the train reaches segment 62 (signal32), we can hear the click of the relais of the reverser.
If we drive the route to signal32 in manual mode and stop before reaching the overlap (and then manually release the route), the subsequent route direction is determined correctly.

So either this is...

Needs some more investigation on the implementation side.

eyip002 commented 1 year ago

Fixed in https://github.com/uniba-swt/libbidib/commit/c192a65474030e152f1e35aa1ed3c5bbfb4427d7