Skip to content

Commit 5d1572f

Browse files
committed
Corect initialisation value
1 parent 0cf717c commit 5d1572f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ public float TenderFuelMassKG // Decreased by firing and increased
464464
float MSTSSteamGaugeGlassHeightM;
465465
float WaterGlassLengthM;
466466
float waterGlassFractionLevel; // Water glass level as a fraction
467-
// bool WaterGlassLevelGradientEnabled = false;
467+
468468
float MEPFactor = 0.7f; // Factor to determine the MEP
469469
float GrateAreaDesignFactor = 500.0f; // Design factor for determining Grate Area
470470
float EvapAreaDesignFactor = 10.0f; // Design factor for determining Evaporation Area
@@ -1565,11 +1565,10 @@ public override void Initialize()
15651565
WaterGlassMaxLevel = ((WaterGlassLengthM + BoilerCrownCoverageHeightM + BoilerCrownHeightM) + (BoilerDiameterM / 2.0f)) / BoilerDiameterM; // max height of water gauge as a fraction of boiler level
15661566
WaterGlassMinLevel = referenceBoilerLevelFraction; // min height of water gauge as a fraction of boiler level
15671567

1568-
BoilerWaterFractionAbs = (WaterMinLevel + WaterMaxLevel) / 2; // Initialise current boiler water level
1568+
BoilerWaterFractionAbs = (WaterGlassMinLevel + WaterGlassMaxLevel) / 2; // Initialise current boiler water level to halfway up glass
15691569

15701570
float MaxWaterFraction = BoilerWaterFractionAbs; // Initialise the max water fraction when the boiler starts
15711571

1572-
15731572
if (BoilerEvapRateLbspFt2 == 0) // If boiler evaporation rate is not in ENG file then set a default value
15741573
{
15751574
if (SteamLocomotiveFuelType == SteamLocomotiveFuelTypes.Wood)
@@ -7482,10 +7481,9 @@ private void UpdateFiring(float absSpeedMpS)
74827481

74837482
// var CurrentWaterGaugeFraction = GradientBoilerLevelFraction;
74847483

7485-
74867484
if (SteamLocomotiveFeedWaterType == SteamLocomotiveFeedWaterSystemTypes.MotionPump && !WaterIsExhausted)
74877485
{
7488-
7486+
74897487
if (CurrentWaterGaugeFraction > 0.55) // turn pumps off if water level in boiler greater then 0.55 water gauge, to stop cycling
74907488
{
74917489
WaterMotionPump1IsOn = false;

0 commit comments

Comments
 (0)