@@ -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