Skip to content

Commit

Permalink
Automatic merge of T1.5.1-658-g66411058c and 6 pull requests
Browse files Browse the repository at this point in the history
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters
- Pull request #865 at 776d6df: Dispatcher window improvements
- Pull request #874 at 86d58ff: Dynamic brake controller refactoring
- Pull request #875 at 43bf33e: Bug fix for https://bugs.launchpad.net/or/+bug/2036346 Player train switching doesn't work with 3D cabs
- Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder
- Pull request #877 at a0bd9ec: Initail build of duplex steam
  • Loading branch information
openrails-bot committed Sep 25, 2023
8 parents e1d5355 + 6641105 + d00beb9 + 776d6df + 86d58ff + 43bf33e + f92de76 + a0bd9ec commit 9311b6d
Showing 1 changed file with 8 additions and 8 deletions.
Expand Up @@ -1401,16 +1401,16 @@ protected static void PropagateBrakeLinePressures(float elapsedClockSeconds, Tra

// Equalize main reservoir with MR pipe for every locomotive
if (car.BrakeSystem.TwoPipes)
{
float volumeRatio = loco.BrakeSystem.BrakePipeVolumeM3 / loco.MainResVolumeM3;
float dp = Math.Min((loco.MainResPressurePSI - loco.BrakeSystem.BrakeLine2PressurePSI) / (1 + volumeRatio), loco.MaximumMainReservoirPipePressurePSI - loco.BrakeSystem.BrakeLine2PressurePSI);
loco.MainResPressurePSI -= dp * volumeRatio;
loco.BrakeSystem.BrakeLine2PressurePSI += dp;
if (loco.MainResPressurePSI < 0) loco.MainResPressurePSI = 0;
if (loco.BrakeSystem.BrakeLine2PressurePSI < 0) loco.BrakeSystem.BrakeLine2PressurePSI = 0;
{
float volumeRatio = loco.BrakeSystem.BrakePipeVolumeM3 / loco.MainResVolumeM3;
float dp = Math.Min((loco.MainResPressurePSI - loco.BrakeSystem.BrakeLine2PressurePSI) / (1 + volumeRatio), loco.MaximumMainReservoirPipePressurePSI - loco.BrakeSystem.BrakeLine2PressurePSI);
loco.MainResPressurePSI -= dp * volumeRatio;
loco.BrakeSystem.BrakeLine2PressurePSI += dp;
if (loco.MainResPressurePSI < 0) loco.MainResPressurePSI = 0;
if (loco.BrakeSystem.BrakeLine2PressurePSI < 0) loco.BrakeSystem.BrakeLine2PressurePSI = 0;
}
}
}
}

// Propagate engine brake pipe (3) data
for (int i = 0; i < train.Cars.Count; i++)
Expand Down

0 comments on commit 9311b6d

Please sign in to comment.