Skip to content

Commit 80c1805

Browse files
authored
Merge pull request #662 from cesarBLG/fix-brake-application
Brake pipe pressure is reduced instantly to EQ pressure
2 parents ca359cd + 318e2a1 commit 80c1805

File tree

1 file changed

+2
-2
lines changed
  • Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,8 +767,8 @@ protected static void PropagateBrakeLinePressures(float elapsedClockSeconds, Tra
767767
else if (lead.BrakeSystem.BrakeLine1PressurePSI > train.EqualReservoirPressurePSIorInHg)
768768
{
769769
float serviceVariationFactor = Math.Min(trainPipeTimeVariationS / serviceTimeFactor, 0.95f);
770-
float pressureDiffPSI = serviceTimeFactor * lead.BrakeSystem.BrakeLine1PressurePSI;
771-
if (lead.BrakeSystem.BrakeLine1PressurePSI > train.EqualReservoirPressurePSIorInHg)
770+
float pressureDiffPSI = serviceVariationFactor * lead.BrakeSystem.BrakeLine1PressurePSI;
771+
if (lead.BrakeSystem.BrakeLine1PressurePSI - pressureDiffPSI < train.EqualReservoirPressurePSIorInHg)
772772
pressureDiffPSI = lead.BrakeSystem.BrakeLine1PressurePSI - train.EqualReservoirPressurePSIorInHg;
773773
lead.BrakeSystem.BrakeLine1PressurePSI -= pressureDiffPSI;
774774
}

0 commit comments

Comments
 (0)