16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 07:39:19 +02:00

Fix for wheel flat calculation when going backwards

This commit is contained in:
Królik Uszasty
2019-09-15 21:48:03 +02:00
parent b55275d8fc
commit 6d66bfeaed

View File

@@ -4387,7 +4387,7 @@ void TMoverParameters::ComputeTotalForce(double dt) {
Fb *= factor; Fb *= factor;
FTrain *= factor; FTrain *= factor;
} }
if (nrot < 0.1) if (std::abs(nrot < 0.1))
{ {
WheelFlat = sqrt(square(WheelFlat) + abs(Fwheels) / NAxles*Vel*0.000002); WheelFlat = sqrt(square(WheelFlat) + abs(Fwheels) / NAxles*Vel*0.000002);
} }