Skip to content

Commit 3cad5f7

Browse files
committed
Automatic merge of T1.5.1-997-gb5992851e1 and 20 pull requests
- Pull request #799 at dfc715e: Consolidated wind simulation - Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder - Pull request #882 at bc27ad2: Blueprint/train car operations UI window - Pull request #885 at 56c17fb: feat: Add notifications to Menu - Pull request #891 at 9a1d6b2: Auto save - Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH - Pull request #896 at 5866028: First implementation of https://blueprints.launchpad.net/or/+spec/specific-sounds-for-ai-trains - Pull request #900 at c27f32d: DMI updates - Pull request #903 at 3e390b8: Downloading route content (Github, zip) - Pull request #912 at 359cfee: New Triple Valve Features Vol. 2 - Pull request #922 at abe2e52: Autopilot for timetable mode - Pull request #946 at 66f836c: Advanced track sounds - Pull request #949 at 5026de6: Oil Burning Locomotive - Pull request #950 at a98ff62: Ctrl-F5 showing yellow rectangles where mouse left button is active - Pull request #951 at 486081b: fix: Fix watchdog process state name - Pull request #952 at b2af1f5: Investigation - Pulsing graphics part 1 - Pull request #953 at 9b0ec01: Fix Lights Crash on Corrupt Shapes - Pull request #954 at 84c2f4b: Add Support for Multiple Track Profiles - Pull request #955 at 0c8e659: Copy dynamic brake speeds from other vehicles
22 parents 90a3e01 + b599285 + dfc715e + d00beb9 + f92de76 + bc27ad2 + 56c17fb + 9a1d6b2 + 1f5ba4c + 5866028 + c27f32d + 3e390b8 + 359cfee + abe2e52 + 66f836c + 5026de6 + a98ff62 + 486081b + b2af1f5 + 9b0ec01 + 84c2f4b + 0c8e659 commit 3cad5f7

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@ public class MSTSSteamLocomotive : MSTSLocomotive
303303
float OilSpecificGravity = 0.9659f; // Assume a mid range of API for this value, say API = 15 @ 20 Cdeg.
304304
float WaterSpecificGravity = 1.0f; // Water @ 20 degC.
305305

306+
bool FuelOilSteamHeatingReqd = false;
307+
306308
int NumberofTractiveForceValues = 36;
307309
float[,] TractiveForceAverageN = new float[5, 37];
308310
float AverageTractiveForceN;
@@ -925,6 +927,11 @@ public override void Parse(string lowercasetoken, STFReader stf)
925927
case "engine(steamfiremanmaxpossiblefiringrate": MaxFiringRateKGpS = stf.ReadFloatBlock(STFReader.UNITS.MassRateDefaultLBpH, null) / 2.2046f / 3600; break;
926928
case "engine(steamfiremanismechanicalstoker": Stoker = stf.ReadFloatBlock(STFReader.UNITS.None, null); break;
927929
case "engine(ortssteamfiremanmaxpossiblefiringrate": ORTSMaxFiringRateKGpS = stf.ReadFloatBlock(STFReader.UNITS.MassRateDefaultLBpH, null) / 2.2046f / 3600; break;
930+
case "engine(ortsfueloilheatingrequired":
931+
var heating = stf.ReadIntBlock(null);
932+
if (heating == 1)
933+
FuelOilSteamHeatingReqd = true;
934+
break;
928935
case "engine(ortsfueloilspecificgravity": OilSpecificGravity = stf.ReadFloatBlock(STFReader.UNITS.None, null); break;
929936
case "engine(enginecontrollers(cutoff": CutoffController.Parse(stf); break;
930937
case "engine(enginecontrollers(ortssmallejector": SmallEjectorController.Parse(stf); SmallEjectorControllerFitted = true; break;
@@ -1053,6 +1060,7 @@ public override void Copy(MSTSWagon copy)
10531060
MaxLocoTenderWaterMassKG = locoCopy.MaxLocoTenderWaterMassKG;
10541061
MaxFiringRateKGpS = locoCopy.MaxFiringRateKGpS;
10551062
Stoker = locoCopy.Stoker;
1063+
FuelOilSteamHeatingReqd = locoCopy.FuelOilSteamHeatingReqd;
10561064
ORTSMaxFiringRateKGpS = locoCopy.ORTSMaxFiringRateKGpS;
10571065
CutoffController = (MSTSNotchController)locoCopy.CutoffController.Clone();
10581066
Injector1Controller = (MSTSNotchController)locoCopy.Injector1Controller.Clone();
@@ -3584,7 +3592,7 @@ protected override void UpdateControllers(float elapsedClockSeconds)
35843592
private void UpdateTender(float elapsedClockSeconds)
35853593
{
35863594
// Calculate steam usage required to heat fuel oil in oil fired locomotive
3587-
if (SteamLocomotiveFuelType == SteamLocomotiveFuelTypes.Oil )
3595+
if (SteamLocomotiveFuelType == SteamLocomotiveFuelTypes.Oil && FuelOilSteamHeatingReqd )
35883596
{
35893597
// The following calculations are based upon the interpretation of information in
35903598
// https://www.spiraxsarco.com/learn-about-steam/steam-engineering-principles-and-heat-transfer/heating-with-coils-and-jackets#article-top
@@ -6856,7 +6864,7 @@ private void UpdateAuxiliaries(float elapsedClockSeconds, float absSpeedMpS)
68566864
GeneratorSteamUsageLBpS = 0.0f; // No generator fitted to locomotive
68576865
}
68586866

6859-
if (StokerIsMechanical && SteamLocomotiveFuelType == SteamLocomotiveFuelTypes.Coal)
6867+
if (StokerIsMechanical && SteamLocomotiveFuelType != SteamLocomotiveFuelTypes.Oil)
68606868
{
68616869
StokerSteamUsageLBpS = pS.FrompH(MaxBoilerOutputLBpH) * (StokerMinUsage + (StokerMaxUsage - StokerMinUsage) * FuelFeedRateKGpS / MaxFiringRateKGpS); // Caluculate current steam usage based on fuel feed rates
68626870
BoilerMassLB -= elapsedClockSeconds * StokerSteamUsageLBpS; // Reduce boiler mass to reflect steam usage by mechanical stoker

0 commit comments

Comments
 (0)