Skip to content

Commit f2cf530

Browse files
committed
Automatic merge of T1.5.1-1829-g5cb0ed0a4 and 12 pull requests
- Pull request #570 at 362e4e7: glTF 2.0 support with PBR lighting - Pull request #1062 at 9a76b26: Train Forces popup Window. - Pull request #1064 at 1be1fc4: Add Train Info tab to Help window (F1) - Pull request #1084 at 13454ed: Timetable: Calculate Delay While Stopped at a Station - Pull request #1074 at e9a66c1: Gradient - commit 2024-16-12 - 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 #1087 at 1f64f02: Improve warning message for signal location mismatch. - Pull request #1088 at 4b3fa4c: Preserve previous log file. - Pull request #1089 at d750bd1: Fix Superelevation on Rigid Frame Rolling Stock Again - Pull request #1082 at 5845a1a: Allow variable water level in glass gauge - Pull request #1081 at 689494b: Brake cuts power unification
14 parents 393773e + 5cb0ed0 + 362e4e7 + 9a76b26 + 1be1fc4 + 13454ed + e9a66c1 + 37e2817 + e10390b + 1f64f02 + 4b3fa4c + d750bd1 + 5845a1a + 689494b commit f2cf530

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

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

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2441,8 +2441,8 @@ protected virtual void UpdateControllers(float elapsedClockSeconds)
24412441
LocalDynamicBrakePercent = Math.Max(LocalDynamicBrakePercent, DynamicBrakeController.SavedValue * 100);
24422442
}
24432443

2444-
var throttleCurrentNotch = ThrottleController.CurrentNotch;
2445-
ThrottleController.Update(elapsedClockSeconds);
2444+
var throttleCurrentNotch = ThrottleController.CurrentNotch;
2445+
ThrottleController.Update(elapsedClockSeconds);
24462446
if (CruiseControl != null && CruiseControl.ThrottlePercent != null)
24472447
{
24482448
LocalThrottlePercent = CruiseControl.ThrottlePercent.Value;
@@ -2678,29 +2678,29 @@ protected virtual void UpdateTractiveForce(float elapsedClockSeconds)
26782678
// With Simple adhesion apart from correction for rail adhesion, there is no further variation to the motive force.
26792679
// With Advanced adhesion the raw motive force is fed into the advanced (axle) adhesion model, and is corrected for wheel slip and rail adhesion
26802680

2681-
// For the advanced adhesion model, a rudimentary form of slip control is incorporated by using the wheel speed to calculate tractive effort.
2682-
// As wheel speed is increased tractive effort is decreased. Hence wheel slip is "controlled" to a certain extent.
2683-
// This doesn't cover all types of locomotives, for example if DC traction motors and no slip control, then the tractive effort shouldn't be reduced.
2684-
// This won't eliminate slip, but limits its impact.
2685-
// More modern locomotive have a more sophisticated system that eliminates slip in the majority (if not all circumstances).
2686-
// Simple adhesion control does not have any slip control feature built into it.
2687-
// TODO - a full review of slip/no slip control.
2681+
// For the advanced adhesion model, a rudimentary form of slip control is incorporated by using the wheel speed to calculate tractive effort.
2682+
// As wheel speed is increased tractive effort is decreased. Hence wheel slip is "controlled" to a certain extent.
2683+
// This doesn't cover all types of locomotives, for example if DC traction motors and no slip control, then the tractive effort shouldn't be reduced.
2684+
// This won't eliminate slip, but limits its impact.
2685+
// More modern locomotive have a more sophisticated system that eliminates slip in the majority (if not all circumstances).
2686+
// Simple adhesion control does not have any slip control feature built into it.
2687+
// TODO - a full review of slip/no slip control.
26882688
PrevAbsTractionSpeedMpS = AbsTractionSpeedMpS;
2689-
if (TractionMotorType == TractionMotorTypes.AC)
2689+
if (TractionMotorType == TractionMotorTypes.AC)
2690+
{
2691+
AbsTractionSpeedMpS = AbsSpeedMpS;
2692+
}
2693+
else
2694+
{
2695+
if (WheelSlip && AdvancedAdhesionModel)
26902696
{
2691-
AbsTractionSpeedMpS = AbsSpeedMpS;
2697+
AbsTractionSpeedMpS = AbsWheelSpeedMpS;
26922698
}
26932699
else
26942700
{
2695-
if (WheelSlip && AdvancedAdhesionModel)
2696-
{
2697-
AbsTractionSpeedMpS = AbsWheelSpeedMpS;
2698-
}
2699-
else
2700-
{
2701-
AbsTractionSpeedMpS = AbsSpeedMpS;
2702-
}
2701+
AbsTractionSpeedMpS = AbsSpeedMpS;
27032702
}
2703+
}
27042704
UpdateTractionForce(elapsedClockSeconds);
27052705

27062706
if (MaxForceN > 0 && MaxContinuousForceN > 0 && PowerReduction < 1)
@@ -5456,7 +5456,7 @@ public virtual float GetDataOf(CabViewControl cvc)
54565456
data = 0.0f;
54575457
if (TractionForceN > 0)
54585458
{
5459-
data = TractiveForceN / MaxForceN * MaxCurrentA;
5459+
data = TractiveForceN / MaxForceN * MaxCurrentA;
54605460
data = Math.Abs(data);
54615461
}
54625462
if (DynamicBrakeForceN > 0)
@@ -5474,7 +5474,7 @@ public virtual float GetDataOf(CabViewControl cvc)
54745474
if (cvc is CVCGauge && ((CVCGauge)cvc).Orientation == 0)
54755475
direction = ((CVCGauge)cvc).Direction;
54765476
data = 0.0f;
5477-
data = TractiveForceN;
5477+
data = TractiveForceN;
54785478
if (DynamicBrakeForceN > 0)
54795479
{
54805480
data = DynamicBrakeForceN;
@@ -5490,7 +5490,7 @@ public virtual float GetDataOf(CabViewControl cvc)
54905490
if (TractionForceN > 0)
54915491
{
54925492
data = (data / MaxForceN) * MaxCurrentA;
5493-
}
5493+
}
54945494
if (DynamicBrakeForceN > 0)
54955495
{
54965496
data = (DynamicBrakeForceN / MaxDynamicBrakeForceN) * DynamicBrakeMaxCurrentA;
@@ -5519,7 +5519,7 @@ public virtual float GetDataOf(CabViewControl cvc)
55195519
if (cvc is CVCGauge && ((CVCGauge)cvc).Orientation == 0)
55205520
direction = ((CVCGauge)cvc).Direction;
55215521
data = 0.0f;
5522-
data = Math.Abs(TractiveForceN);
5522+
data = Math.Abs(TractiveForceN);
55235523
if (DynamicBrake && DynamicBrakePercent > 0)
55245524
{
55255525
data = -Math.Abs(DynamicBrakeForceN);

Source/RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2146,8 +2146,8 @@ public virtual int GetDrawIndex()
21462146
break;
21472147
case CABViewControlTypes.DYNAMIC_BRAKE:
21482148
if (Locomotive.DynamicBrakeController != null && !Locomotive.HasSmoothStruc)
2149-
index = Locomotive.DynamicBrakeController.CurrentNotch;
2150-
else
2149+
index = Locomotive.DynamicBrakeController.CurrentNotch;
2150+
else
21512151
index = PercentToIndex(data);
21522152
break;
21532153
case CABViewControlTypes.CPH_DISPLAY:

0 commit comments

Comments
 (0)