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

Skip to content
Snippets Groups Projects
Commit 288fac1c authored by Harald MARTINI's avatar Harald MARTINI
Browse files

in case the vehicle is driving and the engine is off, keep the speed virtually...

in case the vehicle is driving and the engine is off, keep the speed virtually at Max(gearboxSpeed, Idlespeed)
parent f67bd307
No related branches found
No related tags found
No related merge requests found
......@@ -84,7 +84,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
//throw new VectoSimulationException("Combustion engine cannot supply outtorque when switched off (T_out: {0})", outTorque);
}
CurrentState.EngineOn = false;
CurrentState.EngineSpeed = DataBus.VehicleInfo.VehicleStopped || outAngularVelocity.IsEqual(0) ? ModelData.IdleSpeed : outAngularVelocity; //ModelData.IdleSpeed;
CurrentState.EngineSpeed = DataBus.VehicleInfo.VehicleStopped || outAngularVelocity.IsEqual(0)
? ModelData.IdleSpeed
: VectoMath.Max(outAngularVelocity, ModelData.IdleSpeed);
CurrentState.EngineTorque = 0.SI<NewtonMeter>();
CurrentState.EngineTorqueOut = 0.SI<NewtonMeter>();
CurrentState.EnginePower = 0.SI<Watt>();
......
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