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 aee8ac18 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

ignore gears with too high engine speed

parent a678b7a4
Branches
Tags
No related merge requests found
...@@ -304,6 +304,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -304,6 +304,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
} }
} }
var tqdrag = fld[next.Gear].DragLoadStationaryTorque(response.Engine.EngineSpeed);
var tqmax = fld[next.Gear].FullLoadStationaryTorque(response.Engine.EngineSpeed);
if (tqmax.IsSmallerOrEqual(tqdrag) || response.Engine.EngineSpeed.IsGreaterOrEqual(DataBus.EngineInfo.EngineN95hSpeed)) {
// engine speed is to high or
// extrapolation of max torque curve for high engine speeds may leads to negative max torque
continue;
}
if (double.IsNaN(fcCurrent)) { if (double.IsNaN(fcCurrent)) {
//var responseCurrent = RequestDryRunWithGear( //var responseCurrent = RequestDryRunWithGear(
// absTime, dt, vehicleSpeedForGearRating, DataBus.DriverAcceleration, current); // absTime, dt, vehicleSpeedForGearRating, DataBus.DriverAcceleration, current);
...@@ -314,9 +322,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -314,9 +322,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
fld[currentGear.Gear].FullLoadStationaryTorque(responseCurrent.Engine.EngineSpeed)); fld[currentGear.Gear].FullLoadStationaryTorque(responseCurrent.Engine.EngineSpeed));
fcCurrent = GetFCRating(responseCurrent.Engine.EngineSpeed, tqCurrent); fcCurrent = GetFCRating(responseCurrent.Engine.EngineSpeed, tqCurrent);
} }
var tqNext = response.Engine.TorqueOutDemand.LimitTo(
fld[next.Gear].DragLoadStationaryTorque(response.Engine.EngineSpeed), var tqNext = response.Engine.TorqueOutDemand.LimitTo(tqdrag, tqmax);
fld[next.Gear].FullLoadStationaryTorque(response.Engine.EngineSpeed));
var fcNext = GetFCRating(response.Engine.EngineSpeed, tqNext); var fcNext = GetFCRating(response.Engine.EngineSpeed, tqNext);
if (reserve < GearshiftParams.TorqueReserve || if (reserve < GearshiftParams.TorqueReserve ||
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment