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

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

BugFix: Limit Engine Full Load Power / Full Drag Power

parent 3dbed026
No related branches found
No related tags found
No related merge requests found
......@@ -144,10 +144,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
[NonSerialized]
private List<TimeSpan> _enginePowerCorrections = new List<TimeSpan>();
public CombustionEngine()
{
}
public CombustionEngine(IVehicleContainer cockpit, CombustionEngineData data)
: base(cockpit)
......@@ -256,18 +252,18 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
{
_enginePowerCorrections.Add(_currentState.AbsTime);
Log.WarnFormat("t: {0} requested power > P_engine_full * 1.05 - corrected. P_request: {1} P_engine_full: {2}", _currentState.AbsTime, requestedEnginePower, _currentState.DynamicFullLoadPower);
return _currentState.DynamicFullLoadPower;
}
}
return _currentState.DynamicFullLoadPower;
}
else if (requestedEnginePower < _currentState.FullDragPower)
{
if (requestedEnginePower / _currentState.FullDragPower > MaxPowerExceededThreshold && requestedEnginePower > -99999)
{
_enginePowerCorrections.Add(_currentState.AbsTime);
Log.WarnFormat("t: {0} requested power < P_engine_drag * 1.05 - corrected. P_request: {1} P_engine_drag: {2}", _currentState.AbsTime, requestedEnginePower, _currentState.FullDragPower);
return _currentState.FullDragPower;
}
}
return _currentState.FullDragPower;
}
return requestedEnginePower;
}
......
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