Skip to content

Commit 1dd9be8

Browse files
committed
Disable train pipe leak when correct questionable braking parameters is on, and other tweaks to correct questionable braking parameters
1 parent 1bdb4bd commit 1dd9be8

File tree

2 files changed

+24
-17
lines changed

2 files changed

+24
-17
lines changed

Source/Documentation/Manual/options.rst

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -863,21 +863,23 @@ are a problem for OR, which has a more sophisticated braking model. The
863863
problem usually is that the train brakes require a long time to release,
864864
and in some times do not release at all.
865865

866-
.. index::
867-
single: AirBrakesAirCompressorPowerRating
868-
869866
The following checks and corrections are performed if the option is
870-
checked (only for single-pipe brake system):
867+
checked:
871868

872869
- if the compressor restart pressure is smaller or very near to the max
873870
system pressure, the compressor restart pressure and if necessary the max
874-
main reservoir pressure are increased;
871+
main reservoir pressure are increased (single pipe air brakes only)
875872
- if the main reservoir volume is smaller than 0.3 m\ :sup:`3` and the
876873
engine mass is higher than 20 tons, the reservoir volume is raised to 0.78
877-
m\ :sup:`3`;
878-
- the charging rate of the reservoir is derived from the .eng parameter
879-
``AirBrakesAirCompressorPowerRating`` (if this generates a value greater
880-
than 0.5 psi/s) instead of using a default value.
874+
m\ :sup:`3`
875+
- the maximum brake cylinder pressure will be reduced to the maximum pressure
876+
possible from a full service train brake application if it was set above this
877+
amount
878+
- any brake pipe leakage specified by ``TrainPipeLeakRate`` is disabled
879+
- the dynamic brake delay on electric locomotives is reduced to 2 seconds
880+
if it was defined to be above 4 seconds
881+
- dynamic brake force left at the default value of 20kN will be increased to
882+
half the locomotive's continuous force, or 150kN, whichever is lower
881883

882884
For a full list of parameters, see :ref:`Developing ORTS Content - Parameters and Tokens<parameters_and_tokens>`
883885

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

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ public float OdometerM
389389
public float CompressorRestartPressurePSI = 110;
390390
public float CompressorChargingRateM3pS = 0.075f;
391391
public bool CompressorIsMUControlled = false;
392-
public float MainResChargingRatePSIpS = 0.4f;
392+
public float MainResChargingRatePSIpS = -1.0f;
393393
public float EngineBrakeReleaseRatePSIpS = 12.5f;
394394
public float EngineBrakeApplyRatePSIpS = 12.5f;
395395
public float BrakePipeTimeFactorS = 0.0015f;
@@ -1990,16 +1990,18 @@ protected void CorrectBrakingParams()
19901990
// correct questionable MaxCylPressurePSI
19911991
BrakeSystem.CorrectMaxCylPressurePSI(this);
19921992
}
1993-
if (MainResChargingRatePSIpS <= 0)
1994-
{
1995-
MainResChargingRatePSIpS = Math.Max(0.5f, (CompressorChargingRateM3pS * Bar.ToPSI(1)) / MainResVolumeM3);
1996-
}
1993+
// Disable brake pipe leak to prevent stuck brakes
1994+
if (TrainBrakePipeLeakPSIorInHgpS > 0)
1995+
TrainBrakePipeLeakPSIorInHgpS = 0;
1996+
}
1997+
// No OR compressor speed defined, use MSTS compressor speed or 0.025 m^3/s (whichever is higher)
1998+
if (MainResChargingRatePSIpS < 0)
1999+
{
2000+
MainResChargingRatePSIpS = Math.Max(0.025f, CompressorChargingRateM3pS) * OneAtmospherePSI / MainResVolumeM3;
19972001
}
1998-
else if (MainResChargingRatePSIpS <= 0) MainResChargingRatePSIpS = 0.4f;
19992002

20002003
// Corrections for dynamic braking parameters
20012004

2002-
if (this is MSTSElectricLocomotive && DynamicBrakeDelayS > 4) DynamicBrakeDelayS = 2; // Electric locomotives have short engaging delays
20032005
if (DynamicBrakeSpeed2MpS > 0 && DynamicBrakeSpeed3MpS > 0 && DynamicBrakeSpeed2MpS > DynamicBrakeSpeed3MpS)
20042006
{
20052007
// also exchanging DynamicBrakesMaximumEffectiveSpeed with DynamicBrakesFadingSpeed is a frequent error that upsets operation of
@@ -2010,8 +2012,11 @@ protected void CorrectBrakingParams()
20102012
}
20112013
if (Simulator.Settings.CorrectQuestionableBrakingParams)
20122014
{
2015+
if (this is MSTSElectricLocomotive && DynamicBrakeDelayS > 4)
2016+
DynamicBrakeDelayS = 2; // Electric locomotives have short engaging delays
2017+
20132018
if (MaxDynamicBrakeForceN > 0 && MaxContinuousForceN > 0 &&
2014-
(MaxDynamicBrakeForceN / MaxContinuousForceN < 0.3f && MaxDynamicBrakeForceN == 20000))
2019+
(MaxDynamicBrakeForceN / MaxContinuousForceN < 0.3f && MaxDynamicBrakeForceN == 20000))
20152020
MaxDynamicBrakeForceN = Math.Min (MaxContinuousForceN * 0.5f, 150000); // 20000 is suggested as standard value in the MSTS documentation, but in general it is a too low value
20162021
}
20172022
}

0 commit comments

Comments
 (0)