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

Correctly infer train orientation when stopping inside reversing loop #34

Closed eyip002 closed 2 years ago

eyip002 commented 3 years ago

The Kehrschleifenmodul actively reverses the block's orientation, but the reversal is dependent on whether train exits the block from where it entered. There is no reliable method to correctly infer the train's orientation when it stops in the reversing loop.

eyip002 commented 3 years ago

The state of the Kehrschleifenmodul can be read from CV number 51 of the GBM16T it is attached to. Flips between 0 and 1.

eyip002 commented 3 years ago

Kehrschleifenmodul can be controlled as a DCC accessory via BiDiB Wizard:

If a decoder address of 12 is used, then the RCN is 45 and DCC packet is 48. Open the DCC Accessory Controller under the menu item "Node". Enter the DCC address of 48 and select "direct". Click the "red" or "green" aspect to send a DCC accessory request.

eyip002 commented 3 years ago
  1. Determine if train has stopped inside the reversing loop
  2. Determine state of the reversing loop
  3. Compute the required driving orientation

See issue in libbidib: https://github.com/uniba-swt/libbidib/issues/8