Skip to content

Commit 86b454d

Browse files
committed
Automatic merge of T1.5.1-997-gb5992851e and 17 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 b3f83ed: 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 9305062: 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 1985cbe: 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
19 parents 26fc99f + b599285 + dfc715e + d00beb9 + f92de76 + b3f83ed + 56c17fb + 9a1d6b2 + 1f5ba4c + 5866028 + c27f32d + 3e390b8 + 9305062 + abe2e52 + 66f836c + 1985cbe + a98ff62 + 486081b + b2af1f5 commit 86b454d

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

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

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,9 @@ public class MSTSSteamLocomotive : MSTSLocomotive
294294
SmoothedData FuelRateStoker = new SmoothedData(15); // Stoker is more responsive and only takes x seconds to fully react to changing needs.
295295
SmoothedData FuelRateCoal = new SmoothedData(45); // Automatic fireman takes x seconds to fully react to changing needs for coal firing.
296296
SmoothedData CoalBurnRateSmoothKGpS = new SmoothedData(150); // Changes in BurnRate take x seconds to fully react to changing needs - models increase and decrease in heat.
297-
SmoothedData OilBurnRateSmoothKGpS = new SmoothedData(3); // Changes in Oil BurnRate take x seconds to fully react to changing needs - models increase and decrease in heat. Oil faster then steam
297+
SmoothedData OilBurnRateSmoothKGpS = new SmoothedData(6); // Changes in Oil BurnRate take x seconds to fully react to changing needs - models increase and decrease in heat. Oil faster then steam
298+
SmoothedData OilBurnRateReductionSmoothKGpS = new SmoothedData(0.25f); // When in reduction we would expect the heat to drop off rapidly for an oil fire
299+
298300
float FuelFeedRateSmoothedKGpS = 0.0f; // Smoothed Fuel feedd Rate
299301
public float FuelBurnRateSmoothedKGpS; // Smoothed fuel burning rate
300302
float OilSpecificGravity = 0.9659f; // Assume a mid range of API for this value, say API = 15 @ 20 Cdeg.
@@ -488,6 +490,7 @@ public float TenderCoalMassKG // Decreased by firing and increased
488490
float TimeFuelBoostOnS = 300.0f; // Time to allow fuel boosting to go on for
489491
float TimeFuelBoostResetS = 1200.0f;// Time to wait before next fuel boost
490492
float throttle;
493+
float previousThrottle;
491494
float SpeedEquivMpS = 27.0f; // Equvalent speed of 60mph in mps (27m/s) - used for damper control
492495

493496
// Cylinder related parameters
@@ -3742,12 +3745,6 @@ private void UpdateFirebox(float elapsedClockSeconds, float absSpeedMpS)
37423745
else // *********** AI Fireman *****************
37433746
{
37443747

3745-
// if (SteamLocomotiveFuelType == SteamLocomotiveFuelTypes.Oil)
3746-
// {
3747-
// BurnRateRawKGpS = (W.ToKW(W.FromBTUpS(PreviousBoilerHeatOutBTUpS - BoilerHeatExceptionsBtupS)) / FuelCalorificKJpKG);
3748-
// }
3749-
// else
3750-
{
37513748
if (PreviousTotalSteamUsageLBpS > TheoreticalMaxSteamOutputLBpS)
37523749
{
37533750
FiringSteamUsageRateLBpS = TheoreticalMaxSteamOutputLBpS; // hold usage rate if steam usage rate exceeds boiler max output
@@ -3821,7 +3818,6 @@ private void UpdateFirebox(float elapsedClockSeconds, float absSpeedMpS)
38213818
BurnRateRawKGpS = 0.9f * pS.FrompH(Kg.FromLb(NewBurnRateSteamToCoalLbspH[pS.TopH(TheoreticalMaxSteamOutputLBpS)])); // AI fire on goes to approx 100% of fire needed to maintain full boiler steam generation
38223819
}
38233820
}
3824-
}
38253821

38263822
float MinimumBurnRateKGpS = 0.0012626f; // Set minimum burn rate @ 10lb/hr
38273823
BurnRateRawKGpS = MathHelper.Clamp(BurnRateRawKGpS, MinimumBurnRateKGpS, BurnRateRawKGpS); // ensure burnrate never goes to zero, unless the fire drops to an unacceptable level, or a fusible plug blows
@@ -3887,10 +3883,23 @@ private void UpdateFirebox(float elapsedClockSeconds, float absSpeedMpS)
38873883
oilburnrate = MaxFiringRateKGpS; // burning rate can never be more then the max firing rate
38883884
}
38893885

3890-
// OilBurnRateSmoothKGpS.ForceSmoothValue(oilburnrate);
3891-
3886+
OilBurnRateReductionSmoothKGpS.Update(elapsedClockSeconds, oilburnrate);
38923887
OilBurnRateSmoothKGpS.Update(elapsedClockSeconds, oilburnrate);
3893-
FuelBurnRateSmoothedKGpS = OilBurnRateSmoothKGpS.SmoothedValue;
3888+
3889+
if (previousThrottle < throttle)
3890+
{
3891+
// Fire combustion drops rapidly if throttle closed (assume fuel feed is reduced rapidly)
3892+
FuelBurnRateSmoothedKGpS = OilBurnRateReductionSmoothKGpS.SmoothedValue;
3893+
OilBurnRateSmoothKGpS.ForceSmoothValue(oilburnrate);
3894+
}
3895+
else
3896+
{
3897+
// Fire combustion is normal
3898+
FuelBurnRateSmoothedKGpS = OilBurnRateSmoothKGpS.SmoothedValue;
3899+
}
3900+
3901+
previousThrottle = throttle;
3902+
38943903
}
38953904
else
38963905
{

0 commit comments

Comments
 (0)