Skip to content

Commit 1079783

Browse files
committed
Straight air engine brakes for tenders
1 parent 83002d7 commit 1079783

File tree

1 file changed

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

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -981,15 +981,14 @@ protected static void PropagateBrakeLinePressures(float elapsedClockSeconds, Tra
981981
if (dp < 0) dp = 0;
982982
loco.MainResPressurePSI -= dp * volumeRatio;
983983
}
984-
else // Otherwise, drain from train pipe
984+
else // Otherwise, drain from locomotive engine brake pipe
985985
{
986-
float volumeRatio = brakeSystem.GetCylVolumeM3() / brakeSystem.BrakePipeVolumeM3;
987-
if (brakeSystem.BrakeLine2PressurePSI - dp * volumeRatio < p + dp)
986+
if (lead.BrakeSystem.BrakeLine3PressurePSI - dp < p + dp)
988987
{
989-
dp = (brakeSystem.BrakeLine2PressurePSI - p) / (1 + volumeRatio);
988+
dp = (lead.BrakeSystem.BrakeLine3PressurePSI - p) / 2;
990989
}
991990
if (dp < 0) dp = 0;
992-
brakeSystem.BrakeLine2PressurePSI -= dp * volumeRatio;
991+
lead.BrakeSystem.BrakeLine3PressurePSI -= dp;
993992
}
994993
p += dp;
995994
lead.EngineBrakeState = ValveState.Apply;

0 commit comments

Comments
 (0)