Skip to content

Commit 47963c4

Browse files
committed
Automatic merge of T1.5.1-1321-g597ce24c42 and 16 pull requests
- Pull request #961 at 89854d3: Improvements for Power Supplies - Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #891 at 9a1d6b2: Auto save - Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH - Pull request #953 at a519452: Fix Lights Crash on Corrupt Shapes - Pull request #972 at e90a2aa: On Map window color changed switch or signal is not changed - Pull request #981 at 10d297f: Multiple type trainset lightglows - Pull request #984 at 0f8122e: Player train switching for timetable mode - Pull request #988 at f1d4d18: Conditional sound, blueprint https://blueprints.launchpad.net/or/+spec/conditional-sound - Pull request #989 at 32a9961: Fix: TrainCarOperations-crashes-locales - Pull request #990 at 37d8ea6: Fix TrainDrivingInfo, some texts are misaligned. - Pull request #991 at 220b61e: Fix TrainCarOperations no interacts AltPgDn AltPgUp. - Pull request #994 at 1de8de6: 2 fixes in the OR manual - Pull request #900 at c27f32d: DMI updates - Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder - Pull request #995 at 992191c: Fix: TrainCarOperations and TrainOperationsViewer windows overlap.
18 parents 43e0da1 + 597ce24 + 89854d3 + d00beb9 + 9a1d6b2 + 1f5ba4c + a519452 + e90a2aa + 10d297f + 0f8122e + f1d4d18 + 32a9961 + 37d8ea6 + 220b61e + 1de8de6 + c27f32d + f92de76 + 992191c commit 47963c4

File tree

79 files changed

+5323
-3508
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+5323
-3508
lines changed
Binary file not shown.

Source/Documentation/Manual/appendices.rst

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,12 @@ Volumetric Flow m^3/s air flow m^3/s
6464
\ L/min
6565
\ L/s
6666
Speed m/s other m/s m/s meter per second
67-
\ cm/s centimeters per second
68-
\ mm/s millimeters per second
6967
\ km/h
7068
\ kph kph kilometer per hour
71-
\ kmh kmh, misspelling accepted by MSTS
72-
kmph
73-
\ mph dynamic mph mph miles per hour,
74-
brake legacy dynamic brake parameters use mph default
75-
\ ft/s feet per second
76-
\ in/s inches per second
69+
\ kmh kmh misspelling accepted by MSTS
70+
\ kmph
71+
\ mph dynamic mph mph miles per hour
72+
brake
7773
Frequency Hz Hz Hertz
7874
\ rps revolutions per second
7975
\ rpm

Source/Documentation/Manual/cabs.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,24 @@ The following controls are available for the cabview:
166166
- ``ORTS_ELECTRIC_TRAIN_SUPPLY_COMMAND_SWITCH`` can be used to control the electric train supply switch
167167
- ``ORTS_ELECTRIC_TRAIN_SUPPLY_ON`` can be used to indicate that the electric train supply line is powered on
168168

169+
.. _cabs-voltmeters:
170+
171+
Voltmeters
172+
----------
173+
174+
.. index::
175+
single: LINE_VOLTAGE
176+
single: ORTS_PANTOGRAPH_VOLTAGE_AC
177+
single: ORTS_PANTOGRAPH_VOLTAGE_DC
178+
single: ORTS_BATTERY_VOLTAGE
179+
180+
The following voltmeters are available for the cabview:
181+
182+
- ``LINE_VOLTAGE`` indicates the line voltage
183+
- ``ORTS_PANTOGRAPH_VOLTAGE_AC`` indicates the line voltage when operating on AC lines
184+
- ``ORTS_PANTOGRAPH_VOLTAGE_DC`` indicates the line voltage when operating on DC lines
185+
- ``ORTS_BATTERY_VOLTAGE`` indicates the vehicle's battery voltage
186+
169187
.. _cabs-dieselenginesonoff:
170188

171189
Controls to switch on and off diesel engines

Source/Documentation/Manual/features-rollingstock.rst

Lines changed: 90 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1918,6 +1918,9 @@ Scripts will run if referenced by OR-specific fields in the .eng file.
19181918
single: ORTSEngineBrakeController
19191919
single: ORTSCircuitBreaker
19201920
single: ORTSTractionCutOffRelay
1921+
single: ORTSPantographSelector
1922+
single: ORTSVoltageSelector
1923+
single: ORTSPowerLimitationSelector
19211924
single: ORTSPowerSupply
19221925
single: ORTSTrainControlSystem
19231926

@@ -1949,6 +1952,15 @@ Scripts will run if referenced by OR-specific fields in the .eng file.
19491952
* - Passenger car power supply
19501953
- ``ORTS.Scripting.Api.PassengerCarPowerSupply``
19511954
- ``Wagon ( ORTSPowerSupply ( "DemoPower.cs" ) )``
1955+
* - Pantograph selector
1956+
- ``ORTS.Scripting.Api.PantographSelector``
1957+
- ``Engine ( ORTSPantographSelector ( Script ( "DemoPantographSelector.cs" ) ) )``
1958+
* - Voltage selector
1959+
- ``ORTS.Scripting.Api.VoltageSelector``
1960+
- ``Engine ( ORTSVoltageSelector ( Script ( "DemoVoltageSelector.cs" ) ) )``
1961+
* - Power limitation selector
1962+
- ``ORTS.Scripting.Api.PowerLimitationSelector``
1963+
- ``Engine ( ORTSPantographSelector ( Script ( "DemoPowerLimitator.cs" ) ) )``
19521964
* - Train Control System
19531965
- ``ORTS.Scripting.Api.TrainControlSystem``
19541966
- ``Engine ( ORTSTrainControlSystem ( "DemoTCS.cs" ) )``
@@ -2131,14 +2143,66 @@ Use the following .eng parameter to load a traction cut-off relay script::
21312143
)
21322144

21332145
``ORTSTractionCutOffRelay`` refers to the traction cut-off relay script in the engine's ``Script``
2134-
subfolder. For this field, the .cs extension is optional. "Automatic" and "Manual" load the generic OR
2135-
traction cut-off relay implementation, so do `not` use these names for your own script.
2146+
subfolder. For this field, the .cs extension is optional. Alternatively, there are several
2147+
built-in OR traction cut-off relay implementations:
2148+
2149+
- "Automatic": no driver intervention required, circuit breaker is closed when conditions are met.
2150+
- "Manual": a traction cut-off switch with open and closed positions.
2151+
- "PushButtons": a traction cut-off relay with dedicated open and close buttons.
2152+
2153+
Please do `not` use these names for your own script, since the generic implementation will
2154+
be loaded instead.
21362155

21372156
``ORTSTractionCutOffRelayClosingDelay`` refers to the delay between the closing command of the traction cut-off relay
21382157
and the effective closing of the relay.
21392158

2159+
.. _features-scripting-powerselectors
2160+
2161+
Pantograph, voltage and power limitation selectors
2162+
--------------------------------------------------
2163+
2164+
Available for electric locomotives only. The scripts control
2165+
the behavior of the locomotive's
2166+
:ref:`pantograph selector <physics-pantograph-selector>`,
2167+
:ref:`voltage selector <physics-voltage-selector>` and
2168+
:ref:`power limitation selector <physics-power-limitation-selector>` respectively.
2169+
2170+
.. index::
2171+
single: ORTSPantographSelector
2172+
single: ORTSVoltageSelector
2173+
single: ORTSPowerLimitationSelector
2174+
2175+
Use the following .eng parameters to load power selector scripts::
2176+
2177+
Engine (
2178+
ORTSPantographSelector (
2179+
Script ( "YourPSScript.cs" )
2180+
SelectorPositions ( ... )
2181+
)
2182+
ORTSVoltageSelector (
2183+
Script ( "YourVSScript.cs" )
2184+
SelectorPositions ( ... )
2185+
)
2186+
ORTSPowerLimitationSelector (
2187+
Script ( "YourPLSScript.cs" )
2188+
SelectorPositions ( ... )
2189+
)
2190+
)
2191+
2192+
``Script`` refers to the circuit breaker script in the engine's ``Script``
2193+
subfolder. For this field, the .cs extension is optional. Alternatively, there are several
2194+
built-in OR selector implementations which can be used if custom features such as interlocking
2195+
with other devices are not required:
2196+
2197+
- "Default": a selector with sequential positions.
2198+
- "Circular": same as above, but the first position follows again after the last one.
2199+
2200+
Please do `not` use these names for your own script, since the generic implementation will
2201+
be loaded instead.
2202+
21402203
.. _features-scripting-powersupply:
21412204

2205+
21422206
Diesel and electric power supply
21432207
--------------------------------
21442208

@@ -2158,6 +2222,7 @@ Use the following .eng parameter to load a power supply script::
21582222

21592223
Engine (
21602224
ORTSPowerSupply ( "YourEPS.cs" )
2225+
ORTSPowerSupplyParameters ( "YourEPS.ini" )
21612226
ORTSPowerOnDelay ( 5s )
21622227
ORTSAuxPowerOnDelay ( 10s )
21632228
)
@@ -2166,6 +2231,12 @@ Use the following .eng parameter to load a power supply script::
21662231
subfolder. For this field, the .cs extension is optional. "Default" will load the generic OR power supply
21672232
implementation, so do `not` use this name for your own script.
21682233

2234+
``ORTSPowerSupplyParameters``, an optional field, refers to an .ini file,
2235+
also in the ``Script`` subfolder, whose parameters will be made available to the
2236+
power supply script through the ``GetBoolParameter()``, ``GetIntParameter()``,
2237+
``GetFloatParameter()``, and ``GetStringParameter()`` methods. This .ini file provides for easy customization of
2238+
the behavior of the power supply script by end users.
2239+
21692240
``ORTSPowerOnDelay`` refers to the delay between the closing of the circuit breaker or the traction cut-off relay
21702241
and the availability of the power for traction.
21712242

@@ -2547,6 +2618,23 @@ which may be used this way within the script:
25472618
25482619
so that, instead of ORTS_TCSnn the related mnemonic string is displayed.
25492620

2621+
Generic cabview controls are also available for the Power Supply subsystem. They are named ORTS_POWER_SUPPLY1, ORTS_POWER_SUPPLY2
2622+
and so on in the cabview file. Their usage is the same as for the TCS controls.
2623+
2624+
Events related to power supply controls are made available to power supply scripts via ``TCSEvent.GenericTCSButtonPressed``,
2625+
``TCSEvent.GenericTCSButtonReleased``, ``TCSEvent.GenericTCSSwitchOff`` and ``TCSEvent.GenericTCSSwitchOn`` events,
2626+
received asynchronously by script through the method:
2627+
2628+
.. code-block:: csharp
2629+
2630+
public override void HandleEvent(PowerSupplyEvent evt, string message)
2631+
2632+
As for the TCS buttons, message is a string representing the control number with zero-base indexing
2633+
(e.g. "5" corresponds to ORTS_POWER_SUPPLY6).
2634+
2635+
SetCabDisplayControl and SetCustomizedCabviewControlName methods, which work in the same
2636+
way as their TCS counterparts, are accessible from all power supply scripts.
2637+
25502638
Helper classes
25512639
--------------
25522640
3 helper classes are available in the ``Orts.Scripting.Api`` namespace:

Source/Documentation/Manual/features-route.rst

Lines changed: 9 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -858,126 +858,24 @@ Defining Curve Superelevation
858858

859859
.. index::
860860
single: ORTSTrackSuperElevation
861-
single: ORTSSuperElevation
862-
single: MaxFreightUnderbalance
863-
single: MaxPassengerUnderbalance
864-
single: MinimumCant
865-
single: MaximumCant
866-
single: Precision
867-
single: MaxRunOffSlope
868-
single: MaxRunOffSpeed
869-
single: MinimumSpeed
870-
single: MaximumSpeed
871861

872862
This feature allows curves within the route to be assigned a value for superelevation. It
873863
is inserted either in the route's root .trk file or in the "Include" .trk file.
874864

875-
The superelevation standard defined here will control the simulated level of superelevation on
876-
each track section on the entire route and, if enabled in the options, the amount of visual
877-
superelevation generated by the dynamic track system.
878-
879-
To define a superelevation standard, add a ``ORTSSuperElevation`` block to the route's .trk
880-
file and add some (or all) of the following parameters inside the ``ORTSSuperElevation`` block:
881-
882-
- ``MaxFreightUnderbalance`` -- The maximum amount (using units of length) of cant deficiency/underbalance
883-
that should be allowed for trains travelling at the freight speed limit. Larger allowed underbalance
884-
results in less extreme superelevation. (Default 100 mm for metric routes, 2 in for imperial routes.)
885-
- ``MaxPassengerUnderbalance`` -- The maximum amount (using units of length) of cant deficiency/underbalance
886-
that should be allowed for trains travelling at the passenger speed limit. (Default 150 mm / 3 in.)
887-
For comfort reasons, the underbalance values should be equal to or less than the
888-
``ORTSUnbalancedSuperElevation`` value used by the rolling stock on the route. If the superelevation
889-
required to achieve the max passenger underbalance is different from that required for freight, the
890-
curve will use whichever superelevation is larger (the actual amount of underbalance may be lower).
891-
- ``MinimumCant`` -- If a curve needs superelevation, the amount of superelevation will be no lower than
892-
this value (given in units of length). (Default 10 mm / 0.5 in.)
893-
- ``MaximumCant`` -- Sets the maximum amount of superelevation (units of length) that any curve is allowed
894-
to have, regardless of other factors. Usually curves should be designed to avoid reaching this limit, as
895-
exceeding the limit could result in excessive curve force or even trains toppling over at low speeds.
896-
(Default 180 mm / 6 in.)
897-
- ``Precision`` -- Determines the accuracy (in length) to which the superelevation is maintained. If
898-
the superelevation required by a curve is not a nice number, it will be rounded up to the nearest
899-
multiple of ``Precision``. (Default 5 mm / 0.25 in.)
900-
- ``MaxRunOffSlope`` -- Sets a limit on the amount of change in superelevation per unit length along a curve
901-
(quantity is unitless). This allows for smooth transition between flat and superelevated track at low speeds.
902-
(Default 0.003.)
903-
- ``MaxRunOffSpeed`` -- Sets a limit on the amount of change in superelevation per second (units of speed) when
904-
travelling at the max speed for the curve. This allows for smooth transition between flat and superelevated
905-
track at high speeds. (Default 55 mm/sec / 1.5 in/sec.)
906-
- ``MinimumSpeed`` -- The minimum speed limit required for superelevation to be added to a curve. Useful for
907-
preventing superelevation from being generated in yards. (Default 25 kmh / 15 mph.)
908-
- ``MaximumSpeed`` -- The maximum speed limit allowed for superelevation to be added to a curve. This
909-
is only useful if a route needs multiple sets of superelevation settings. See section below for a
910-
description on use of multiple superelevation standards. (Default unlimited.)
911-
912-
Any parameters not specified will use the default values, which are suitable for most medium-speed routes.
913-
Upon route loading, the given parameters will be used to calculate the appropriate amount of superelevation
914-
for each curve based on the curve radius and speed limits. An example ``ORTSSuperElevation`` block which
915-
defines the superelevation standard used by Union Pacific is given below::
916-
917-
ORTSSuperElevation(
918-
MaxFreightUnderbalance ( 1in )
919-
MaxPassengerUnderbalance ( 3in )
920-
MinimumCant ( 0.25in )
921-
MaximumCant ( 5in )
922-
Precision ( 0.25in )
923-
MaxRunOffSlope ( 0.0019 )
924-
MaxRunOffSpeed ( 1.25in/s )
925-
MinimumSpeed ( 15mph )
926-
)
865+
It should be noted that currently this information only applies to physics calculations
866+
for superelevation. The visual movement of the train due to superelevation is set within
867+
the option menu.
927868

928-
More than one ``ORTSSuperElevation`` block can be added to the .trk file to facilitate routes that require
929-
different superelevation standards for different track speeds (for example, a route with both standard speed
930-
160 kmh tracks and dedicated 300 kmh high speed tracks). If a track has a speed limit below ``MinimumSpeed``
931-
or above ``MaximumSpeed``, the track will skip the superelevation standard defined and check the next standard in
932-
the .trk file to see if the speed limit is in between the min and max of that standard. Only if the track
933-
speed is out of bounds for every superelevation standard will no superelevation be applied at all. For
934-
example, to have 3 different types of superelevation on one route, one from 25-60 kmh, another from 60-160 kmh,
935-
and a third standard for 160 kph and up, the required Minimum/MaximumSpeed settings would look like this::
936-
937-
ORTSSuperElevation(
938-
...
939-
MinimumSpeed ( 25km/h )
940-
MaximumSpeed ( 60km/h )
941-
)
942-
ORTSSuperElevation(
943-
...
944-
MinimumSpeed ( 60km/h )
945-
MaximumSpeed ( 160km/h )
946-
)
947-
ORTSSuperElevation(
948-
...
949-
MinimumSpeed ( 160km/h )
950-
)
869+
The values are assigned by inserting the following parameter::
951870

952-
Note that the order of the ``ORTSSuperElevation`` blocks is important; they are read from top down
953-
so the slowest superelevation standard should be on top of all faster superelevation standards.
954-
955-
Open Rails also supports a simpler way to define superelevation based on curve radius only, resulting
956-
in the same superelevation regardless of track speed. If a railroad uses this simplified method, they
957-
would provide a table of track curve radii and the superelevation used at that radius (usually also
958-
including a maximum speed for the curve). This table can then be provided to OR using the
959-
``ORTSTrackSuperElevation`` parameter in the .trk file::
960-
961-
ORTSTrackSuperElevation (
962-
x1 y1
963-
x2 y2
964-
........
965-
)
871+
ORTSTrackSuperElevation ( x y .......... )
966872
967-
Where x and y are a series of paired parameters specifying the curve radius (default meters)
968-
(x value), and the amount of superelevation (default meters) (y value). The statement will take
969-
as many paired values as desired, as long as the radius values are in increasing order.
970-
Each paired set of values must have an x and y value present. If it is desired
873+
where x and y are a series of paired parameters specifying the curve radius in metres (x value),
874+
and the amount of superelevation in metres (y value). The statement will take as many paired
875+
values as desired. Each paired set of values must have an x and y value present. If it is desired
971876
to 'hold' a certain value of SuperElevation for a number of different radii curves, then the same
972877
y value needs to be used for succeeding values of curve radius. Where the y value changes between
973-
curve radii, then Open Rails will interpolate the y value between the two points.
974-
975-
Superelevation calculated using ``ORTSSuperElevation`` will generally override any values
976-
entered in ``ORTSTrackSuperElevation`` unless the ``ORTSSuperElevation`` block did not specify
977-
a value for ``MaxFreightUnderbalance`` or ``MaxPassengerUnderbalance``. If neither is given,
978-
superelevation will be replaced with the value given by ``ORTSTrackSuperElevation``, but will
979-
be adjusted to match the given values of minimum and maximum cant, precision, and runoff. This
980-
way, it is possible to represent a wide variety of superelevation configurations.
878+
curve radii, then Open Rails will extrapolate the y value between the two points.
981879

982880

983881
Overhead (catenary) wire

Source/Documentation/Manual/news.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ What's been improved
3939
- controls for electric locos
4040
- air brake features for both European and American brake systems
4141
- accurate friction simulation for 4 types of brake shoes
42-
- superelevation system rewritten to be smoother and more configurable
4342

4443

4544
Other changes

0 commit comments

Comments
 (0)