Skip to content

Commit dc2a907

Browse files
committed
Another usage of axle speed
1 parent de4bf82 commit dc2a907

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4891,7 +4891,7 @@ private void UpdateSuperHeat()
48914891
private void UpdateCylinders(float elapsedClockSeconds, float throttle, float cutoff, float absSpeedMpS, int numberofengine)
48924892
{
48934893
// Calculate speed of locomotive in wheel rpm - used to determine changes in performance based upon speed.
4894-
SteamEngines[numberofengine].DriveWheelRevRpS = absSpeedMpS / (2.0f * MathHelper.Pi * SteamEngines[numberofengine].AttachedAxle.WheelRadiusM);
4894+
SteamEngines[numberofengine].DriveWheelRevRpS = (float)Math.Abs(SteamEngines[numberofengine].AttachedAxle.AxleSpeedMpS) / (2.0f * MathHelper.Pi * SteamEngines[numberofengine].AttachedAxle.WheelRadiusM);
48954895

48964896
DrvWheelRevRpS = SteamEngines[0].DriveWheelRevRpS; // set as one of the main engines
48974897

0 commit comments

Comments
 (0)