Open Rails

STFReader.UNITS Enumeration

[This is preliminary documentation and subject to change.]

Enumeration specifying which units are valid when parsing a numeric constant.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

[Flags]
public enum UNITS

Members

Member Name Description Value
NoneNo unit parsing is done on the {constant_item} - which is obviously fastest 0
CompulsoryCombined using an | with other UNITS if the unit is compulsory (compulsory units will slow parsing) 1
MassValid Units: kg, t, lb

Scaled to kilograms.

2
DistanceValid Units: m, cm, mm, km, ft, ', in, "

Scaled to meters.

4
AreaDefaultFT2Valid Units: *(ft^2)

Scaled to square meters.

8
Volume Valid Units: gal, l

Scaled to litres.

16
VolumeDefaultFT3Valid Units: *(ft^3)

Scaled to cubic feet.

32
Time Valid Units: s, m, h

Scaled to secs.

64
TimeDefaultM Valid Units: s, m, h

Scaled to secs.

128
TimeDefaultH Valid Units: s, m, h

Scaled to secs.

256
Current Valid Units: a, amps

Scaled to amps.

512
Voltage Valid Units: v, kv

Scaled to v.

1024
MassRateDefaultLBpHValid Units: lb/h

Scaled to pounds per hour.

2048
SpeedValid Units: m/s, mph, kph, kmh, km/h

Scaled to meters/second. See also SpeedMPH

4096
SpeedDefaultMPHValid Units: m/s, mph, kph, kmh, km/h

Scaled to miles/hour.

Similar to UNITS.Speed except default unit is mph.
8192
Frequency Valid Units: Hz, rps, rpm

Scaled to Hz.

16384
ForceValid Units: n, kn, lbf

Scaled to newtons.

32768
PowerValid Units: w, kw, hp

Scaled to watts.

65536
StiffnessValid Units: n/m

Scaled to newtons/metre.

131072
ResistanceValid Units: n/m/s (+ '/m/s' in case the newtons is missed), lbf/mph

Scaled to newtons/speed(m/s)

262144
PressureDefaultPSIValid Units: psi, bar, inhg, kpa

Scaled to pounds per square inch.

524288
PressureDefaultInHgValid Units: psi, bar, inhg, kpa

Scaled to pounds per square inch.

Similar to UNITS.Pressure except default unit is inHg.
1048576
PressureRateDefaultPSIpS Valid Units: psi/s, bar/s, inhg/s, kpa/s

Scaled to psi/s.

2097152
PressureRateDefaultInHgpS Valid Units: psi/s, bar/s, inhg/s, kpa/s

Scaled to psi/s.

Similar to UNITS.PressureRate except default unit is inHg/s.
4194304
EnergyDensityValid Units: kj/kg, j/g, btu/lb

Scaled to kj/kg.

8388608
TemperatureDifference Valid Units: degc, degf

Scaled to Deg Celsius

16777216
RotationalInertia Valid Units: kgm^2

Scaled to kgm^2.

33554432
ResistanceDavisC Valid Units: Nm/s^2, lbf/mph^2

Scaled to N/m/s^2.

67108864
Any -2

Requirements

Namespace: Orts.Parsers.Msts

Assembly: Orts.Parsers.Msts (in Orts.Parsers.Msts.dll)

See Also

Orts.Parsers.Msts Namespace