You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Automatic merge of T1.5.1-1885-g12b1a74d5 and 7 pull requests
- Pull request #570 at 362e4e7: glTF 2.0 support with PBR lighting
- Pull request #1085 at 37e2817: updates key commands for Train Operations window and also Daylight Offset
- Pull request #1086 at e10390b: Add Settings Exporter tool (copy settings to INI, etc)
- Pull request #1094 at e6e95f1: Blended Braking Compatibility and Effectiveness Improvements
- Pull request #1082 at 5845a1a: Allow variable water level in glass gauge
- Pull request #1081 at 689494b: Brake cuts power unification
- Pull request #1091 at b0c622b: Automatic speed control
Copy file name to clipboardExpand all lines: Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs
+43-9Lines changed: 43 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -419,6 +419,8 @@ public float OdometerM
419
419
publicdouble?DynamicBrakeCommandStartTime;
420
420
protectedboolDynamicBrakeBlendingOverride;// true when DB lever >0% should always override the blending. When false, the bigger command is applied.
421
421
protectedboolDynamicBrakeBlendingForceMatch=true;// if true, dynamic brake blending tries to achieve the same braking force as the airbrake would have.
422
+
publicfloatDynamicBrakeBlendingRetainedPressurePSI{get;privateset;}=-1.0f;// the amount of pressure that will always be retained in the brake cylinders during blended braking
423
+
publicfloatDynamicBrakeBlendingMinSpeedMpS{get;privateset;}=2.25f;// below this speed, blended braking is disabled
422
424
protectedboolDynamicBrakeControllerSetupLock;// if true if dynamic brake lever will lock until dynamic brake is available
case"engine(numwheels":MSTSLocoNumDrvWheels=stf.ReadFloatBlock(STFReader.UNITS.None,4.0f);if(MSTSLocoNumDrvWheels<1)STFException.TraceWarning(stf,"Engine:NumWheels is less than 1, parts of the simulation may not function correctly");break;
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
2017
2023
}
2024
+
2025
+
// Define blending retained pressure if it was left undefined
if(demandedPressurePSI>CylPressurePSI&&demandedPressurePSI<CylPressurePSI+4)// Allow some margin for unnecessary air brake application
1774
1771
{
1775
1772
demandedPressurePSI=CylPressurePSI;
1776
1773
}
1777
1774
demandedPressurePSI/=RelayValveRatio;
1775
+
1776
+
if(demandedPressurePSI>AutoCylPressurePSI)
1777
+
demandedPressurePSI=AutoCylPressurePSI;
1778
1778
}
1779
1779
}
1780
1780
elseif(loco.DynamicBrakeAutoBailOff)
@@ -1938,7 +1938,7 @@ public override void Update(float elapsedClockSeconds)
1938
1938
}
1939
1939
1940
1940
}
1941
-
1941
+
1942
1942
if(CarisMSTSLocomotive)UpdateTractionCutoff();
1943
1943
1944
1944
// Record HUD display values for brake cylinders depending upon whether they are wagons or locomotives/tenders (which are subject to their own engine brakes)
0 commit comments