Skip to content

Commit

Permalink
Set default value for brake insensitivity
Browse files Browse the repository at this point in the history
A non-zero value is required in order to release brakes after an overcharge.
  • Loading branch information
cesarBLG committed May 3, 2023
1 parent 5f75977 commit 4c064d2
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -49,7 +49,7 @@ public class AirSinglePipe : MSTSBrakeSystem
protected float MaxReleaseRatePSIpS = 1.86f;
protected float MaxApplicationRatePSIpS = .9f;
protected float MaxAuxilaryChargingRatePSIpS = 1.684f;
protected float BrakeInsensitivityPSIpS = 0;
protected float BrakeInsensitivityPSIpS = 0.07f;
protected float EmergencyValveActuationRatePSIpS = 0;
protected float EmergResChargingRatePSIpS = 1.684f;
protected float EmergAuxVolumeRatio = 1.4f;
Expand Down Expand Up @@ -230,7 +230,7 @@ public override void Parse(string lowercasetoken, STFReader stf)

// OpenRails specific parameters
case "wagon(brakepipevolume": BrakePipeVolumeM3 = Me3.FromFt3(stf.ReadFloatBlock(STFReader.UNITS.VolumeDefaultFT3, null)); break;
case "wagon(ortsbrakeinsensitivity": BrakeInsensitivityPSIpS = stf.ReadFloatBlock(STFReader.UNITS.PressureRateDefaultPSIpS, null); break;
case "wagon(ortsbrakeinsensitivity": BrakeInsensitivityPSIpS = stf.ReadFloatBlock(STFReader.UNITS.PressureRateDefaultPSIpS, 0.07f); break;
case "wagon(ortsemergencyvalveactuationrate": EmergencyValveActuationRatePSIpS = stf.ReadFloatBlock(STFReader.UNITS.PressureRateDefaultPSIpS, 15f); break;
case "wagon(ortsmainrespipeauxrescharging": MRPAuxResCharging = this is AirTwinPipe && stf.ReadBoolBlock(true); break;
}
Expand Down Expand Up @@ -481,7 +481,7 @@ public override void Update(float elapsedClockSeconds)
{
ControlResPressurePSI = BrakeLine1PressurePSI;
}
else if (ControlResPressurePSI > BrakeLine1PressurePSI) // Overcharge elimination
else if (ControlResPressurePSI > BrakeLine1PressurePSI && ControlResPressurePSI < BrakeLine1PressurePSI + 1) // Overcharge elimination
{
float dp = elapsedClockSeconds * BrakeInsensitivityPSIpS;
ControlResPressurePSI = Math.Max(ControlResPressurePSI - dp, BrakeLine1PressurePSI);
Expand Down

0 comments on commit 4c064d2

Please sign in to comment.