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

porting bugfix from official vecto version into develop tree

parent 33e10a0e
No related branches found
No related tags found
No related merge requests found
...@@ -299,16 +299,28 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -299,16 +299,28 @@ 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);
//var responseCurrent = RequestDryRunWithGear(absTime, dt, outTorque, outAngularVelocity, current); //var responseCurrent = RequestDryRunWithGear(absTime, dt, outTorque, outAngularVelocity, current);
var responseCurrent = RequestDryRunWithGear(absTime, dt, outTorqueEst, outAngularVelocityEst, current); var responseCurrent = RequestDryRunWithGear(absTime, dt, outTorqueEst, outAngularVelocityEst, current);
if (responseCurrent.Engine.EngineSpeed.IsGreaterOrEqual(DataBus.EngineInfo.EngineN95hSpeed)) {
fcCurrent = double.MaxValue;
} else {
var tqCurrent = responseCurrent.Engine.TorqueOutDemand.LimitTo( var tqCurrent = responseCurrent.Engine.TorqueOutDemand.LimitTo(
fld[currentGear.Gear].DragLoadStationaryTorque(responseCurrent.Engine.EngineSpeed), fld[currentGear.Gear].DragLoadStationaryTorque(responseCurrent.Engine.EngineSpeed),
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( var tqNext = response.Engine.TorqueOutDemand.LimitTo(
fld[next.Gear].DragLoadStationaryTorque(response.Engine.EngineSpeed), fld[next.Gear].DragLoadStationaryTorque(response.Engine.EngineSpeed),
fld[next.Gear].FullLoadStationaryTorque(response.Engine.EngineSpeed)); fld[next.Gear].FullLoadStationaryTorque(response.Engine.EngineSpeed));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment