Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

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
Branches
Tags
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.
Please register or to comment