Skip to content

Commit ab93d15

Browse files
committed
Automatic merge of T1.6-108-g8fb3285d6 and 13 pull requests
- Pull request #1156 at f46d5f2: Fix incorrectly disabled options in train operations window - Pull request #1091 at 492795a: Automatic speed control - Pull request #1120 at ba3c47f: Automatically Calculate Friction Values if Missing - Pull request #1121 at 91d2d26: Manually Override Articulation - Pull request #1124 at e241a0d: Built-in PBL2 brake controller - Pull request #1157 at 39cd994: Dynamic brake authorization by TCS - Pull request #1159 at 48c9a63: Skip OR warnings about TSRE-specific token Ruler - Pull request #1162 at 2516cce: specifies precedence of DDS over ACE - Pull request #1163 at 2f9e292: Fix: Crash when using Camera 8 and F9. - Pull request #1164 at 1ad9889: Fix: F9 crashes with a front coupled single steam locomotive by Csantucci. - Pull request #1082 at 625c917: Allow variable water level in glass gauge - Pull request #1128 at 086d502: Particle Emitter Overhaul - Pull request #1160 at 9dc6b3b: Route Based TTrack Sounds
15 parents a12254e + 8fb3285 + f46d5f2 + 492795a + ba3c47f + 91d2d26 + e241a0d + 39cd994 + 48c9a63 + 2516cce + 2f9e292 + 1ad9889 + 625c917 + 086d502 + 9dc6b3b commit ab93d15

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,6 @@ public override void Initialize()
14951495
Trace.TraceWarning("Boiler Volume not found in ENG file, or doesn't appear to be a valid figure, and has been set to {0} Ft^3", BoilerVolumeFT3);
14961496
}
14971497

1498-
14991498
// Set up boiler water defaults
15001499

15011500
// Water Gauge Length - always use OR entered value as first preference
@@ -7065,13 +7064,12 @@ private void UpdateWaterGauge()
70657064
WaterGlassLevelIN = waterGlassFractionLevel * Me.ToIn(WaterGlassLengthM);
70667065
WaterGlassLevelIN = MathHelper.Clamp(WaterGlassLevelIN, 0, Me.ToIn(WaterGlassLengthM));
70677066

7068-
70697067
// Calculate water glass level when on gradient
70707068

70717069
var boilerangleRad = Math.Atan(CurrentElevationPercent / 100);
70727070

7073-
// water variation is calculated as the side of a triangle with half the boiler length as the hypotenuse
7074-
var waterVariationLevelM = (float)Math.Sin(boilerangleRad) * BoilerLengthM / 2.0f;
7071+
// water variation is calculated as the opposite side of a triangle with half the boiler length as the reference length (Adjacent side)
7072+
var waterVariationLevelM = (float)Math.Tan(boilerangleRad) * (BoilerLengthM / 2.0f);
70757073

70767074
float glassLevelGradientM = 0;
70777075

0 commit comments

Comments
 (0)