Skip to content

Commit 2fe7819

Browse files
committed
Automatic merge of T1.5.1-866-gbae4730e2 and 17 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 9c456aa: Blueprint/train car operations UI window - Pull request #885 at 8f94333: 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 42f1dd9: feat: Improved system information collection - Pull request #903 at 0d6d045: Downloading route content (Github, zip) - 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 ad3362c: feat: supports switching adhesion precisions - Pull request #911 at 6834af0: docs: Add refactoring as a special type of PR - Pull request #912 at 659396e: New Triple Valve Features Vol. 2 - Pull request #914 at e236654: Adjustments to Duplex steam - Pull request #915 at 6d911d7: Correct calculation error with curve friction - Pull request #916 at 11ac52c: Distributed Power Air Brake Synchronization
19 parents e0e47f2 + bae4730 + 3539862 + d00beb9 + f92de76 + 9c456aa + 8f94333 + 6c0785b + 1f5ba4c + 5866028 + 42f1dd9 + 0d6d045 + 9b0b04f + ad3362c + 6834af0 + 659396e + e236654 + 6d911d7 + 11ac52c commit 2fe7819

File tree

3 files changed

+49
-13
lines changed

3 files changed

+49
-13
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ public float CurrentLocomotiveSteamHeatBoilerWaterCapacityL
204204
public float BoilerPressurePSI; // Steam Gauge pressure - what the engineer sees.
205205
public float MaxBoilerPressurePSI = 180f; // maximum boiler pressure, safety valve setting
206206

207+
public float SandingSteamUsageLBpS; // Sanding Steam Usage
208+
207209
// Vacuum Reservoir and Exhauster Settings
208210

209211
// Steam heating Flags
@@ -248,12 +250,14 @@ public enum SlipControlType
248250
float DebugSpeed = 1; // Used for debugging adhesion coefficient
249251

250252
// parameters for Track Sander based upon compressor air and abrasive table for 1/2" sand blasting nozzle @ 50psi
251-
public float MaxTrackSandBoxCapacityM3 = Me3.FromFt3(40.0f); // Capacity of sandbox - assume 40.0 cu ft
253+
public float MaxTrackSandBoxCapacityM3; // Capacity of sandbox
252254
public float CurrentTrackSandBoxCapacityM3;
253-
public float TrackSanderAirComsumptionM3pS = Me3.FromFt3(195.0f) / 60.0f; // Default value - cubic feet per min (CFM) 195 ft3/m
254-
public float TrackSanderAirPressurePSI = 50.0f;
255-
public float TrackSanderSandConsumptionM3pS = Me3.FromFt3(11.6f) / 3600.0f; // Default value - 11.6 ft3/h
255+
public float TrackSanderAirComsumptionM3pS;
256+
public float TrackSanderSandConsumptionM3pS;
256257
public float SandWeightKgpM3 = 1600; // One cubic metre of sand weighs about 1.54-1.78 tonnes.
258+
public float TrackSanderSteamConsumptionForwardLbpS;
259+
public float TrackSanderSteamConsumptionReverseLbpS;
260+
257261

258262
// Vacuum Braking parameters
259263
readonly static float OneAtmospherePSI = Bar.ToPSI(1);
@@ -1763,6 +1767,33 @@ public override void Initialize()
17631767
}
17641768
}
17651769

1770+
// Initialise track sanding parameters
1771+
if (MaxTrackSandBoxCapacityM3 == 0)
1772+
{
1773+
MaxTrackSandBoxCapacityM3 = Me3.FromFt3(40.0f); // Capacity of sandbox - assume 40.0 cu ft
1774+
}
1775+
1776+
if (TrackSanderAirComsumptionM3pS == 0)
1777+
{
1778+
TrackSanderAirComsumptionM3pS = Me3.FromFt3(195.0f) / 60.0f; // Default value - cubic feet per min (CFM) 195 ft3/m
1779+
}
1780+
1781+
if (TrackSanderSandConsumptionM3pS == 0)
1782+
{
1783+
TrackSanderSandConsumptionM3pS = Me3.FromFt3(11.6f) / 3600.0f; // Default value - 11.6 ft3/h
1784+
}
1785+
1786+
if (TrackSanderSteamConsumptionForwardLbpS == 0 && SandingSystemType == SandingSystemTypes.Steam)
1787+
{
1788+
TrackSanderSteamConsumptionForwardLbpS = 300f / 3600f; // Default value - 300lbs/hr
1789+
}
1790+
1791+
if (TrackSanderSteamConsumptionReverseLbpS == 0 && SandingSystemType == SandingSystemTypes.Steam)
1792+
{
1793+
TrackSanderSteamConsumptionReverseLbpS = 300f / 3600f; // Default value - 300lbs/hr
1794+
}
1795+
1796+
17661797
base.Initialize();
17671798
if (DynamicBrakeBlendingEnabled) airPipeSystem = BrakeSystem as AirSinglePipe;
17681799

@@ -3245,6 +3276,7 @@ public void UpdateTrackSander(float elapsedClockSeconds)
32453276

32463277
if (Sander && AbsSpeedMpS < SanderSpeedOfMpS) // If sander switch is on, and not blocked by speed, adjust parameters
32473278
{
3279+
// Calculate sand consumption for sander
32483280
if (CurrentTrackSandBoxCapacityM3 > 0.0) // if sand still in sandbox then sanding is available
32493281
{
32503282
// Calculate consumption of sand, and drop in sand box level
@@ -3257,9 +3289,17 @@ public void UpdateTrackSander(float elapsedClockSeconds)
32573289
}
32583290
}
32593291

3292+
// Calculate steam, air or gravity consumption for different sander modes
32603293
if (SandingSystemType == SandingSystemTypes.Steam)
32613294
{
3262-
3295+
if (Direction == Direction.Reverse)
3296+
{
3297+
SandingSteamUsageLBpS = TrackSanderSteamConsumptionReverseLbpS;
3298+
}
3299+
else
3300+
{
3301+
SandingSteamUsageLBpS = TrackSanderSteamConsumptionForwardLbpS;
3302+
}
32633303

32643304
}
32653305
else

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,6 @@ public float TenderCoalMassKG // Decreased by firing and increased
411411
float BoilerHeatTransferCoeffWpM2K = 45.0f; // Heat Transfer of locomotive boiler 45 Wm2K
412412
float TotalSteamUsageLBpS; // Running total for complete current steam usage
413413
float GeneratorSteamUsageLBpS = 1.0f; // Generator Steam Usage
414-
float SandingSteamUsageLBpS; // Sanding Steam Usage
415414
float RadiationSteamLossLBpS = 2.5f; // Steam loss due to radiation losses
416415
float BlowerBurnEffect; // Effect of Blower on burning rate
417416
float FlueTempDiffK; // Current difference in flue temp at current firing and steam usage rates.
@@ -691,8 +690,6 @@ public float TenderCoalMassKG // Decreased by firing and increased
691690
public float SanderSteamExhaustVelocityMpS;
692691
public float SanderSteamExhaustParticleDurationS;
693692

694-
float SanderSteamConsumptionLbpS = 17; // Assume 1000lbs/hr steam consumption for the sander
695-
696693
public float Cylinders2_11SteamVolumeM3pS;
697694
public float Cylinders2_12SteamVolumeM3pS;
698695
public float Cylinders2_21SteamVolumeM3pS;
@@ -6631,11 +6628,10 @@ private void UpdateAuxiliaries(float elapsedClockSeconds, float absSpeedMpS)
66316628
CylCockSteamUsageDisplayLBpS = 0.0f;
66326629
}
66336630

6634-
// Calculate sanding steam Usage if turned on
6631+
// Calculate sanding steam Usage if a steam based system and turned on
66356632
// Assume steam sanding usage is 1000lbs/hr
6636-
if (Sander && SandingSystemType == SandingSystemTypes.Steam)
6633+
if (Sander && SandingSystemType == SandingSystemTypes.Steam)
66376634
{
6638-
SandingSteamUsageLBpS = SanderSteamConsumptionLbpS;
66396635
BoilerMassLB -= elapsedClockSeconds * SandingSteamUsageLBpS; // Reduce boiler mass to reflect steam usage by generator
66406636
BoilerHeatBTU -= elapsedClockSeconds * SandingSteamUsageLBpS * (BoilerSteamHeatBTUpLB - BoilerWaterHeatBTUpLB); // Reduce boiler Heat to reflect steam usage by generator
66416637
BoilerHeatOutBTUpS += SandingSteamUsageLBpS * (BoilerSteamHeatBTUpLB - BoilerWaterHeatBTUpLB); // Reduce boiler Heat to reflect steam usage by generator

Source/Orts.Simulation/Simulation/RollingStocks/TrainCar.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,7 @@ public Direction Direction
648648
public int LocoNumDrvAxles; // Number of drive axles on locomotive
649649
protected float MSTSLocoNumDrvWheels; // Number of drive axles on locomotive - used to read MSTS value as default
650650
public float DriverWheelRadiusM = Me.FromIn(30.0f); // Drive wheel radius of locomotive wheels - Wheel radius of loco drive wheels can be anywhere from about 10" to 40".
651-
652-
public enum SteamEngineTypes
651+
public enum SteamEngineTypes
653652
{
654653
Unknown,
655654
Simple,
@@ -664,6 +663,7 @@ public enum SandingSystemTypes
664663
Unknown,
665664
Air,
666665
Steam,
666+
Gravity,
667667
}
668668

669669
public SandingSystemTypes SandingSystemType;

0 commit comments

Comments
 (0)