This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
usage:nodes:atc_controller [2019-07-02 10:30] 82.67.173.193 changed bold to monospace |
usage:nodes:atc_controller [2022-06-27 02:32] (current) blockhead [Speed commands] grammar |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== ATC controller ====== | ====== ATC controller ====== | ||
- | {{ http:// | + | {{ :usage: |
//Unleash the full power of Advtrains by sending Automatic Train Control commands.// | //Unleash the full power of Advtrains by sending Automatic Train Control commands.// | ||
- | //Note: this page has been written for Advtrains 2.0.1 TSS and Minetest 5.1.0. Examples and practices described in this page don't take advantage of improvements introduced in later releases.// | + | //Note: this page has been written for Advtrains 2.1.0 and Minetest 5.1.0. Examples and practices described in this page don't take advantage of improvements introduced in later releases.// |
===== Properties ===== | ===== Properties ===== | ||
Mod: '' | Mod: '' | ||
- | Node name: **advtrains: | + | Node name: '' |
Other names: | Other names: | ||
* '' | * '' | ||
Line 35: | Line 35: | ||
In ATC commands, spaces are ignored and can be inserted as needed. | In ATC commands, spaces are ignored and can be inserted as needed. | ||
- | ==== Simple directives | + | ==== Speed commands |
=== S< | === S< | ||
- | Sets the target speed of driving train to ''< | + | Sets the target speed of driving train to ''< |
''< | ''< | ||
- | * a number constituted only of digits. This represents | + | * a number constituted only of digits. This represents |
- | * the special value **M**, which represents the maximal speed of the train as defined by the entity definition passed to [[reference:advtrains: | + | * the special value **M**, which represents the maximal speed of the train as defined by the entity definition passed to [[dev:core:funref: |
Execution of the ATC command continues **immediately**. | Execution of the ATC command continues **immediately**. | ||
Line 50: | Line 50: | ||
Brakes until the train speed reaches ''< | Brakes until the train speed reaches ''< | ||
- | ''< | + | ''< |
+ | |||
+ | Execution of the ATC command continues **immediately**. | ||
+ | |||
+ | === BB === | ||
+ | |||
+ | Activates the emergency brake. In this mode, the deceleration is higher than with standard brake (i.e. '' | ||
Execution of the ATC command continues **immediately**. | Execution of the ATC command continues **immediately**. | ||
Line 63: | Line 69: | ||
Reverses movement direction of train. Has only effect while the train is standing. | Reverses movement direction of train. Has only effect while the train is standing. | ||
+ | |||
+ | ==== Door commands ==== | ||
=== OL, OR === | === OL, OR === | ||
Line 75: | Line 83: | ||
Close doors previously opened by '' | Close doors previously opened by '' | ||
+ | |||
+ | === K === | ||
+ | |||
+ | Kicks all passengers (except drivers) out of the train. Door must be opened to do this. Useful at terminal stations. | ||
+ | |||
+ | ==== Other Commands ==== | ||
+ | |||
+ | === Cpl === | ||
+ | |||
+ | Temporarily switch the train to " | ||
+ | |||
+ | This command makes the train continue at its current speed until it hits another standing wagon or train. Then, it couples to this train and ATC command execution continues. | ||
+ | |||
+ | After coupling, the train retains its current target speed. If you do not include a '' | ||
+ | |||
+ | **Note to LuaATC users:** When using this command, the train running the ATC command is guaranteed to retain its Train ID. The Train ID of the standing train that it is coupled to becomes invalid. | ||
+ | |||
+ | //Note: This command is unique in that its command code is a 3-letter code. Future ATC extensions should also introduce multi-letter codes to avoid exhaustion of letter space for single-letter codes.// | ||
==== Conditional statements ==== | ==== Conditional statements ==== | ||
Line 98: | Line 124: | ||
=== <, <=, >, >= === | === <, <=, >, >= === | ||
- | Compares the current train speed to the given speed. That speed should be a number constituted only of digits, | + | Compares the current train speed to the given speed. That speed should be a number constituted only of digits, |
It is not currently possible to test directly the speed for equality or inequality. | It is not currently possible to test directly the speed for equality or inequality. | ||
- | ==== Examples ==== | + | Although there is no direct command, it is possible to use nested conditional commands to test for equality or inequality: |
- | === S, B === | + | < |
+ | I<8 | ||
+ | Not equal to 8 | ||
+ | E | ||
+ | | ||
+ | Not equal to 8 | ||
+ | E | ||
+ | Equal to 8 | ||
+ | ;; | ||
+ | </ | ||
+ | |||
+ | Unfortunately the command < | ||
+ | |||
+ | ==== Specific commands ==== | ||
+ | |||
+ | === A< | ||
+ | Either enables ('' | ||
+ | When disabled, the train will not trigger automatic route setting on signals based on ARS. | ||
+ | |||
+ | **This command is available only in the '' | ||
+ | |||
+ | ===== Examples | ||
+ | |||
+ | ==== S, B ==== | ||
* '' | * '' | ||
Line 111: | Line 160: | ||
* '' | * '' | ||
- | === W, R === | + | ==== W, R ==== |
* '' | * '' | ||
Line 117: | Line 166: | ||
* '' | * '' | ||
- | === OL, OR, OC === | + | ==== Cpl ==== |
+ | |||
+ | * '' | ||
+ | |||
+ | ==== OL, OR, OC ==== | ||
* '' | * '' | ||
* '' | * '' | ||
- | === I, +/-, </< | + | ==== I, +/-, </< |
- | * '' | + | * '' |
- | * '' | + | * '' |
- | * '' | + | * '' |
===== Trivia ===== | ===== Trivia ===== |