Skip to content

Commit 3705435

Browse files
committed
Automatic merge of T1.5.1-1887-g07be04456 and 8 pull requests
- Pull request #1072 at 1b0de3b: Content Creation Shortcuts & Advanced Wagon Shape Interactions - 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 b9b4843: Blended Braking Compatibility and Effectiveness Improvements - Pull request #1096 at 7a4f055: When the OR main form does not have the focus, hovering above the main OR form makes the mouse cursor disappear. - 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
10 parents 5626b7d + 07be044 + 1b0de3b + 37e2817 + e10390b + b9b4843 + 7a4f055 + 5845a1a + 689494b + b0c622b commit 3705435

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

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

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ public float OdometerM
420420
protected bool DynamicBrakeBlendingOverride; // true when DB lever >0% should always override the blending. When false, the bigger command is applied.
421421
protected bool DynamicBrakeBlendingForceMatch = true; // if true, dynamic brake blending tries to achieve the same braking force as the airbrake would have.
422422
public float DynamicBrakeBlendingRetainedPressurePSI { get; private set; } = -1.0f; // the amount of pressure that will always be retained in the brake cylinders during blended braking
423-
public float DynamicBrakeBlendingMinSpeedMpS { get; private set; } = 2.25f; // below this speed, blended braking is disabled
423+
public float DynamicBrakeBlendingMinSpeedMpS { get; private set; } = -1.0f; // below this speed, blended braking is disabled
424424
protected bool DynamicBrakeControllerSetupLock; // if true if dynamic brake lever will lock until dynamic brake is available
425425

426426
public float DynamicBrakeBlendingPercent { get; protected set; } = -1;
@@ -1908,6 +1908,21 @@ public override void Initialize()
19081908
DynamicBrakeEngineBrakeReplacementSpeed = DynamicBrakeSpeed2MpS;
19091909
}
19101910

1911+
// Define blending minimum speed if it was left undefined (use MSTS minimum dynamic brake speed)
1912+
if (DynamicBrakeBlendingMinSpeedMpS < 0)
1913+
{
1914+
DynamicBrakeBlendingMinSpeedMpS = DynamicBrakeSpeed1MpS;
1915+
}
1916+
1917+
// Define blending retained pressure if it was left undefined
1918+
if (DynamicBrakeBlendingRetainedPressurePSI < 0)
1919+
{
1920+
if (BrakeSystem is AirSinglePipe airSystem)
1921+
DynamicBrakeBlendingRetainedPressurePSI = 2.0f * airSystem.BrakeCylinderSpringPressurePSI;
1922+
else
1923+
DynamicBrakeBlendingRetainedPressurePSI = 0.0f;
1924+
}
1925+
19111926
// Initialise track sanding parameters
19121927
if (MaxTrackSandBoxCapacityM3 == 0)
19131928
{
@@ -2033,15 +2048,6 @@ protected void CorrectBrakingParams()
20332048
(MaxDynamicBrakeForceN / MaxContinuousForceN < 0.3f && MaxDynamicBrakeForceN == 20000))
20342049
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
20352050
}
2036-
2037-
// Define blending retained pressure if it was left undefined
2038-
if (DynamicBrakeBlendingRetainedPressurePSI < 0)
2039-
{
2040-
if (BrakeSystem is AirSinglePipe airSystem)
2041-
DynamicBrakeBlendingRetainedPressurePSI = 2.0f * airSystem.BrakeCylinderSpringPressurePSI;
2042-
else
2043-
DynamicBrakeBlendingRetainedPressurePSI = 0.0f;
2044-
}
20452051
}
20462052

20472053
/// <summary>

0 commit comments

Comments
 (0)