Skip to content

Commit 623773c

Browse files
committed
Automatic merge of T1.5.1-351-gc9abcd22b and 8 pull requests
- Pull request #570 at de7a14f: Experimental glTF 2.0 support with PBR lighting - Pull request #732 at 79e9c38: Improvements for air brakes - Pull request #751 at 00981a2: Web interface to control cab controls with external hardware - Pull request #767 at 82c5f1c: Refine sunrise and sunset - Pull request #799 at eb92d81: Consolidated wind simulation - Pull request #803 at 7157e08: Various adjustments to steam adhesion - Pull request #809 at f67822a: Some on-screen messages not suppressed, Bug #2008012 - Pull request #813 at 80789c6: Refactored garbage generators
10 parents 069164f + c9abcd2 + de7a14f + 79e9c38 + 00981a2 + 82c5f1c + eb92d81 + 7157e08 + f67822a + 80789c6 commit 623773c

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Source/Documentation/Manual/physics.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2930,6 +2930,7 @@ MaxAuxilaryChargingRate and EmergencyResChargingRate.
29302930
.. index::
29312931
single: BrakePipeVolume
29322932
single: ORTSEmergencyValveActuationRate
2933+
single: ORTSEmergencyDumpValveRate
29332934
single: ORTSMainResPipeAuxResCharging
29342935
single: ORTSMainResChargingRate
29352936
single: ORTSEngineBrakeReleaseRate
@@ -2958,6 +2959,8 @@ MaxAuxilaryChargingRate and EmergencyResChargingRate.
29582959
brake actuation of the triple valve. If the pressure in the brake pipe
29592960
decreases at a higher rate than specified, the triple valve will switch to
29602961
emergency mode.
2962+
- ``Wagon(ORTSEmergencyDumpValveRate)``-- Rate at which BP is locally discharged
2963+
at every wagon during an emergency brake application.
29612964
- ``Wagon(ORTSMainResPipeAuxResCharging`` -- Boolean value that indicates,
29622965
for twin pipe systems, if the main reservoir pipe is used for charging the auxiliary
29632966
reservoirs. If set to false, the main reservoir pipe will not be used

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public class AirSinglePipe : MSTSBrakeSystem
5151
protected float MaxAuxilaryChargingRatePSIpS = 1.684f;
5252
protected float BrakeInsensitivityPSIpS = 0;
5353
protected float EmergencyValveActuationRatePSIpS = 0;
54+
protected float EmergencyDumpValveRatePSIpS = 0;
5455
protected float EmergResChargingRatePSIpS = 1.684f;
5556
protected float EmergAuxVolumeRatio = 1.4f;
5657
protected string DebugType = string.Empty;
@@ -116,6 +117,7 @@ public override void InitializeFromCopy(BrakeSystem copy)
116117
MaxAuxilaryChargingRatePSIpS = thiscopy.MaxAuxilaryChargingRatePSIpS;
117118
BrakeInsensitivityPSIpS = thiscopy.BrakeInsensitivityPSIpS;
118119
EmergencyValveActuationRatePSIpS = thiscopy.EmergencyValveActuationRatePSIpS;
120+
EmergencyDumpValveRatePSIpS = thiscopy.EmergencyDumpValveRatePSIpS;
119121
EmergResChargingRatePSIpS = thiscopy.EmergResChargingRatePSIpS;
120122
EmergAuxVolumeRatio = thiscopy.EmergAuxVolumeRatio;
121123
TwoPipes = thiscopy.TwoPipes;
@@ -232,6 +234,7 @@ public override void Parse(string lowercasetoken, STFReader stf)
232234
case "wagon(brakepipevolume": BrakePipeVolumeM3 = Me3.FromFt3(stf.ReadFloatBlock(STFReader.UNITS.VolumeDefaultFT3, null)); break;
233235
case "wagon(ortsbrakeinsensitivity": BrakeInsensitivityPSIpS = stf.ReadFloatBlock(STFReader.UNITS.PressureRateDefaultPSIpS, null); break;
234236
case "wagon(ortsemergencyvalveactuationrate": EmergencyValveActuationRatePSIpS = stf.ReadFloatBlock(STFReader.UNITS.PressureRateDefaultPSIpS, 15f); break;
237+
case "wagon(ortsemergencydumpvalverate": EmergencyDumpValveRatePSIpS = stf.ReadFloatBlock(STFReader.UNITS.PressureRateDefaultPSIpS, 15f); break;
235238
case "wagon(ortsmainrespipeauxrescharging": MRPAuxResCharging = this is AirTwinPipe && stf.ReadBoolBlock(true); break;
236239
}
237240
}
@@ -307,7 +310,10 @@ public override void Initialize(bool handbrakeOn, float maxPressurePSI, float fu
307310
AutoCylPressurePSI = immediateRelease ? 0 : Math.Min((maxPressurePSI - BrakeLine1PressurePSI) * AuxCylVolumeRatio, MaxCylPressurePSI);
308311
AuxResPressurePSI = Math.Max(TwoPipes ? maxPressurePSI : maxPressurePSI - AutoCylPressurePSI / AuxCylVolumeRatio, BrakeLine1PressurePSI);
309312
if ((Car as MSTSWagon).EmergencyReservoirPresent)
313+
{
310314
EmergResPressurePSI = Math.Max(AuxResPressurePSI, maxPressurePSI);
315+
if (EmergencyValveActuationRatePSIpS == 0) EmergencyValveActuationRatePSIpS = 15;
316+
}
311317
TripleValveState = AutoCylPressurePSI < 1 ? ValveState.Release : ValveState.Lap;
312318
HoldingValve = ValveState.Release;
313319
HandbrakePercent = handbrakeOn & (Car as MSTSWagon).HandBrakePresent ? 100 : 0;
@@ -440,6 +446,12 @@ public override void Update(float elapsedClockSeconds)
440446
EmergResPressurePSI -= dp;
441447
AuxResPressurePSI += dp * EmergAuxVolumeRatio;
442448
}
449+
if (EmergencyDumpValveRatePSIpS > 0)
450+
{
451+
BrakeLine1PressurePSI -= elapsedClockSeconds * EmergencyDumpValveRatePSIpS;
452+
if (BrakeLine1PressurePSI < 0)
453+
BrakeLine1PressurePSI = 0;
454+
}
443455
}
444456
}
445457

0 commit comments

Comments
 (0)