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

Skip to content
Snippets Groups Projects
Commit 605846ae authored by Michael KRISPER's avatar Michael KRISPER
Browse files

EngineAuxiliary: Fixed Bug at Start of Run (MeasuredSpeed) when v=0 and gear=0

parent 438128c8
No related branches found
No related tags found
No related merge requests found
...@@ -91,6 +91,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -91,6 +91,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public NewtonMeter Initialize(NewtonMeter torque, PerSecond angularSpeed) public NewtonMeter Initialize(NewtonMeter torque, PerSecond angularSpeed)
{ {
PreviousState.AngularSpeed = angularSpeed; PreviousState.AngularSpeed = angularSpeed;
if (angularSpeed.IsEqual(0))
return 0.SI<NewtonMeter>();
return ComputePowerDemand(angularSpeed) / angularSpeed; return ComputePowerDemand(angularSpeed) / angularSpeed;
} }
......
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