Skip to content

Commit 792a661

Browse files
committed
Automatic merge of T1.5.1-684-gc6e0de1c4 and 8 pull requests
- Pull request #570 at c59c788: Experimental glTF 2.0 support with PBR lighting - Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #865 at a1318b5: Dispatcher window improvements - Pull request #874 at f8dbeab: Dynamic brake controller refactoring - Pull request #875 at 43bf33e: Bug fix for https://bugs.launchpad.net/or/+bug/2036346 Player train switching doesn't work with 3D cabs - Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder - Pull request #878 at 4213063: Implement Polach Adhesion - Pull request #883 at aac4d3f: SwitchPanel disconnect/connect handling
10 parents 13af019 + c6e0de1 + c59c788 + d00beb9 + a1318b5 + f8dbeab + 43bf33e + f92de76 + 4213063 + aac4d3f commit 792a661

File tree

1 file changed

+6
-4
lines changed
  • Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions

1 file changed

+6
-4
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ void Integrate(float elapsedClockSeconds)
924924
NumOfSubstepsPS -= 5;
925925
waitBeforeSpeedingUp = 5;
926926
}
927-
else if (Math.Abs(integratorError) < 0.005)
927+
else if (Math.Abs(integratorError) < 0.000277)
928928
{
929929
NumOfSubstepsPS -= 2;
930930
waitBeforeSpeedingUp = 5;
@@ -945,6 +945,7 @@ void Integrate(float elapsedClockSeconds)
945945
for (int i = 0; i < NumOfSubstepsPS; i++)
946946
{
947947
var k1 = GetAxleMotionVariation(AxleSpeedMpS, dt);
948+
/*
948949
if (i == 0)
949950
{
950951
if (k1.Item1 * dt > Math.Max((Math.Abs(SlipSpeedMpS) - 1) * 10, 1) / 100)
@@ -955,6 +956,7 @@ void Integrate(float elapsedClockSeconds)
955956
hdt = dt / 2;
956957
}
957958
}
959+
*/
958960
var k2 = GetAxleMotionVariation(AxleSpeedMpS + k1.Item1 * hdt, hdt);
959961
var k3 = GetAxleMotionVariation(AxleSpeedMpS + k2.Item1 * hdt, hdt);
960962
var k4 = GetAxleMotionVariation(AxleSpeedMpS + k3.Item1 * dt, dt);
@@ -1033,17 +1035,17 @@ public virtual void Update(float timeSpan)
10331035
if (Math.Abs(SlipSpeedMpS) > WheelSlipThresholdMpS)
10341036
{
10351037
// Wait some time before indicating wheelslip to avoid false triggers
1036-
if (WheelSlipTimeS > 0.75f)
1038+
if (WheelSlipTimeS > 1)
10371039
{
10381040
IsWheelSlip = IsWheelSlipWarning = true;
1039-
Trace.TraceInformation("Wheel Slip Triggered");
1041+
// Trace.TraceInformation("Wheel Slip Triggered");
10401042
}
10411043
WheelSlipTimeS += timeSpan;
10421044
}
10431045
else if (Math.Abs(SlipSpeedPercent) > SlipWarningTresholdPercent)
10441046
{
10451047
// Wait some time before indicating wheelslip to avoid false triggers
1046-
if (WheelSlipWarningTimeS > 0.75f) IsWheelSlipWarning = true;
1048+
if (WheelSlipWarningTimeS > 1) IsWheelSlipWarning = true;
10471049
IsWheelSlip = false;
10481050
WheelSlipWarningTimeS += timeSpan;
10491051
}

0 commit comments

Comments
 (0)