Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit ef915eec authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

max. vehicle propulstion torque: avoid negative torque limits

parent 044308ad
No related branches found
No related tags found
No related merge requests found
......@@ -19,9 +19,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data
public NewtonMeter FullLoadDriveTorque(PerSecond angularVelocity)
{
var idx = FindIndex(angularVelocity);
return VectoMath.Interpolate(FullLoadEntries[idx - 1].MotorSpeed, FullLoadEntries[idx].MotorSpeed,
return VectoMath.Max(0.SI<NewtonMeter>(), VectoMath.Interpolate(FullLoadEntries[idx - 1].MotorSpeed, FullLoadEntries[idx].MotorSpeed,
FullLoadEntries[idx - 1].FullDriveTorque, FullLoadEntries[idx].FullDriveTorque,
angularVelocity);
angularVelocity));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment