Skip to content

Commit c0fe786

Browse files
committed
Automatic merge of T1.5.1-794-g4cad06780 and 14 pull requests
- Pull request #570 at 3539862: Experimental glTF 2.0 support with PBR lighting - 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 a055bca: Blueprint/train car operations UI window - Pull request #885 at 06b8a9e: feat: Add notifications to Menu - Pull request #886 at 6c0785b: Scene viewer extension to TrackViewer - 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 #897 at 0a9d939: feat: Improved system information collection - Pull request #899 at 2985bc1: Duplex steam engines - Booster Engine addition - Pull request #903 at 7353625: Downloading route content (Github, zip) - Pull request #906 at 5850660: Bug fix for https://bugs.launchpad.net/or/+bug/2047299 Crash loading a 3Dcab-only loco - Pull request #907 at 9b0b04f: Bug fix for https://bugs.launchpad.net/or/+bug/2047300 Dynamic tracks disappear after long tunnel - Pull request #908 at 4b4afe3: feat: supports switching adhesion precisions
16 parents 22bb8b9 + 4cad067 + 3539862 + d00beb9 + f92de76 + a055bca + 06b8a9e + 6c0785b + 1f5ba4c + 5866028 + 0a9d939 + 2985bc1 + 7353625 + 5850660 + 9b0b04f + 4b4afe3 commit c0fe786

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

Source/Orts.Formats.Msts/CabViewFile.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ public enum CABViewControlTypes
133133
STEAM_BOOSTER_AIR,
134134
STEAM_BOOSTER_IDLE,
135135
STEAM_BOOSTER_LATCH,
136+
STEAM_BOOSTER_PRESSURE,
136137
WATER_INJECTOR1,
137138
WATER_INJECTOR2,
138139
SMALL_EJECTOR,

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ public class MSTSSteamLocomotive : MSTSLocomotive
134134
public bool SteamBoosterIdleMode = false;
135135
public bool BoosterGearsEngaged = false;
136136
public bool SteamBoosterLatchedLocked = false;
137+
public float SteamBoosterPressurePSI;
137138
float BoosterGearEngageTimeS;
138139
float BoosterIdleHeatingTimerS;
139140
float BoosterIdleHeatingTimePeriodS = 120; // This is the time period that the Booster needs to be idled to heat it up
@@ -143,6 +144,8 @@ public class MSTSSteamLocomotive : MSTSLocomotive
143144
public float HuDBoosterSteamConsumptionLbpS;
144145
public float BoosterSteamConsumptionLbpS;
145146
float BoosterIdleChokeSizeIn;
147+
float BoosterPressureFactor = 0;
148+
float BoosterMaxIdleChokeSizeIn = 0.625f;
146149

147150
/// <summary>
148151
/// Grate limit of locomotive exceedeed?
@@ -1317,22 +1320,27 @@ public override void Initialize()
13171320
if (MaxBoilerPressurePSI > 300)
13181321
{
13191322
BoosterIdleChokeSizeIn = 0.375f;
1323+
BoosterPressureFactor = BoosterIdleChokeSizeIn / BoosterMaxIdleChokeSizeIn;
13201324
}
13211325
else if (MaxBoilerPressurePSI > 275 && MaxBoilerPressurePSI <= 300)
13221326
{
13231327
BoosterIdleChokeSizeIn = 0.4375f;
1328+
BoosterPressureFactor = BoosterIdleChokeSizeIn / BoosterMaxIdleChokeSizeIn;
13241329
}
13251330
else if (MaxBoilerPressurePSI > 250 && MaxBoilerPressurePSI <= 275)
13261331
{
13271332
BoosterIdleChokeSizeIn = 0.5f;
1333+
BoosterPressureFactor = BoosterIdleChokeSizeIn / BoosterMaxIdleChokeSizeIn;
13281334
}
13291335
else if (MaxBoilerPressurePSI > 200 && MaxBoilerPressurePSI <= 250)
13301336
{
13311337
BoosterIdleChokeSizeIn = 0.5625f;
1338+
BoosterPressureFactor = BoosterIdleChokeSizeIn / BoosterMaxIdleChokeSizeIn;
13321339
}
13331340
else
13341341
{
13351342
BoosterIdleChokeSizeIn = 0.625f;
1343+
BoosterPressureFactor = BoosterIdleChokeSizeIn / BoosterMaxIdleChokeSizeIn;
13361344
}
13371345

13381346
// Set crank angle between different sides of the locomotive
@@ -2343,15 +2351,16 @@ public override void Update(float elapsedClockSeconds)
23432351
{
23442352
// In Idle mode steam consumption will be calculated by steam through an orifice.
23452353
// Steam Flow (lb/hr) = 24.24 x Press(BoilerPressure + Atmosphere(psi)) x ChokeDia^2 (in) - this needs to be multiplied by Num Cyls
2346-
var BoosterPressurePSI = BoilerPressurePSI + OneAtmospherePSI;
2347-
SteamEngines[i].CylinderSteamUsageLBpS = pS.FrompH(SteamEngines[i].NumberCylinders * (24.24f * (BoosterPressurePSI) * BoosterIdleChokeSizeIn * BoosterIdleChokeSizeIn));
2354+
SteamBoosterPressurePSI = (BoilerPressurePSI + OneAtmospherePSI) * BoosterPressureFactor;
2355+
SteamEngines[i].CylinderSteamUsageLBpS = pS.FrompH(SteamEngines[i].NumberCylinders * (24.24f * (SteamBoosterPressurePSI) * BoosterIdleChokeSizeIn * BoosterIdleChokeSizeIn));
23482356
HuDBoosterSteamConsumptionLbpS = SteamEngines[i].CylinderSteamUsageLBpS;
23492357

23502358
}
23512359
else
23522360
{
23532361
// In run mode steam consumption calculated by cylinder model
23542362
HuDBoosterSteamConsumptionLbpS = SteamEngines[i].CylinderSteamUsageLBpS;
2363+
SteamBoosterPressurePSI = (throttle * InitialPressureDropRatioRpMtoX[pS.TopM(DrvWheelRevRpS)] * BoilerPressurePSI); // equivalent to steam chest pressure
23552364
}
23562365

23572366

@@ -6671,6 +6680,9 @@ public override float GetDataOf(CabViewControl cvc)
66716680
case CABViewControlTypes.STEAMHEAT_PRESSURE:
66726681
data = ConvertFromPSI(cvc, CurrentSteamHeatPressurePSI);
66736682
break;
6683+
case CABViewControlTypes.STEAM_BOOSTER_PRESSURE:
6684+
data = ConvertFromPSI(cvc, SteamChestPressurePSI);
6685+
break;
66746686
case CABViewControlTypes.CUTOFF:
66756687
case CABViewControlTypes.REVERSER_PLATE:
66766688
data = Train.MUReverserPercent / 100f;

Source/Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,11 @@ public virtual void LoadFromWagFile(string wagFilePath)
525525
if (MSTSWagonNumWheels == 0 && InitWagonNumAxles == 0 )
526526
{
527527
DerailmentCoefficientEnabled = false;
528+
529+
if (Simulator.Settings.VerboseConfigurationMessages)
530+
{
531+
Trace.TraceInformation("Derailment Coefficient set to false for Wagon {0}", WagFilePath);
532+
}
528533
}
529534

530535
// Ensure Drive Axles is set to a default if no OR value added to WAG file
@@ -541,7 +546,7 @@ public virtual void LoadFromWagFile(string wagFilePath)
541546

542547
if (Simulator.Settings.VerboseConfigurationMessages)
543548
{
544-
Trace.TraceInformation("Number of Wagon Axles set to default value of {0}", WagonNumAxles);
549+
Trace.TraceInformation("Number of Wagon Axles set to default value of {0} on Wagon {1}", WagonNumAxles, WagFilePath);
545550
}
546551
}
547552
else

0 commit comments

Comments
 (0)