Skip to content

Commit

Permalink
Adding liters per minute as a cabview unit
Browse files Browse the repository at this point in the history
  • Loading branch information
SteelFill committed Aug 17, 2023
1 parent 076c77a commit cb3f1c0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions Source/Documentation/Manual/appendices.rst
Expand Up @@ -61,6 +61,7 @@ Mass Flow g/h
Volumetric Flow m^3/s air flow m^3/s
meters
\ ft^3/min
\ L/min
\ L/s
Speed m/s other m/s m/s meter per second
\ km/h
Expand Down
2 changes: 1 addition & 1 deletion Source/Documentation/Manual/cabs.rst
Expand Up @@ -706,7 +706,7 @@ Here is an example implementation of ORTS_AIR_FLOW_METER as an analog dial::
DirIncrease ( 0 )
)

Applicable user-defined units are CUBIC_FT_MIN, LITRES_S, and CUBIC_M_S. Cubic meters per
Applicable user-defined units are CUBIC_FT_MIN, LITERS_S, LITERS_MIN, and CUBIC_M_S. Cubic meters per
second will be used if no units are specified.


Expand Down
1 change: 1 addition & 0 deletions Source/ORTS.Common/Conversions.cs
Expand Up @@ -550,6 +550,7 @@ public static class FormatStrings
public static string inhg = Catalog.GetString("inHg");
public static string kgfpcm2 = Catalog.GetString("kgf/cm²");
public static string lps = Catalog.GetString("L/s");
public static string lpm = Catalog.GetString("L/min");
public static string cfm = Catalog.GetString("cfm");
public static string kg = Catalog.GetString("kg");
public static string t = Catalog.GetString("t");
Expand Down
3 changes: 3 additions & 0 deletions Source/Orts.Formats.Msts/CabViewFile.cs
Expand Up @@ -321,6 +321,7 @@ public enum CABViewControlUnits
KILO_LBS,
METRES_PER_SEC,
LITRES,
LITERS,
GALLONS,
INCHES_OF_MERCURY,
MILI_AMPS,
Expand All @@ -334,6 +335,8 @@ public enum CABViewControlUnits
YARDS,

CUBIC_FT_MIN,
LITRES_MIN,
LITERS_MIN,
LITRES_S,
LITERS_S,
CUBIC_M_S
Expand Down
Expand Up @@ -5429,6 +5429,11 @@ public virtual float GetDataOf(CabViewControl cvc)
data = this.FilteredBrakePipeFlowM3pS * 1000.0f;
break;

case CABViewControlUnits.LITRES_MIN:
case CABViewControlUnits.LITERS_MIN:
data = this.FilteredBrakePipeFlowM3pS * 1000.0f * 60.0f;
break;

case CABViewControlUnits.CUBIC_M_S:
default:
data = this.FilteredBrakePipeFlowM3pS;
Expand Down

0 comments on commit cb3f1c0

Please sign in to comment.