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

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

Pull request #175: porting bugfix from official vecto version into develop tree

Merge in VECTO/vecto-dev from VECTO/mq_vecto-dev:bugfix/VECTO-1561-simulation-abort-with-at-transmission to develop

* commit 'e7b5f65a':
  porting bugfix from official vecto version into develop tree
parents 95f5e35d e7b5f65a
No related branches found
No related tags found
No related merge requests found
......@@ -299,15 +299,27 @@ 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)) {
//var responseCurrent = RequestDryRunWithGear(
// absTime, dt, vehicleSpeedForGearRating, DataBus.DriverAcceleration, current);
//var responseCurrent = RequestDryRunWithGear(absTime, dt, outTorque, outAngularVelocity, current);
var responseCurrent = RequestDryRunWithGear(absTime, dt, outTorqueEst, outAngularVelocityEst, current);
var tqCurrent = responseCurrent.Engine.TorqueOutDemand.LimitTo(
fld[currentGear.Gear].DragLoadStationaryTorque(responseCurrent.Engine.EngineSpeed),
fld[currentGear.Gear].FullLoadStationaryTorque(responseCurrent.Engine.EngineSpeed));
fcCurrent = GetFCRating(responseCurrent.Engine.EngineSpeed, tqCurrent);
if (responseCurrent.Engine.EngineSpeed.IsGreaterOrEqual(DataBus.EngineInfo.EngineN95hSpeed)) {
fcCurrent = double.MaxValue;
} else {
var tqCurrent = responseCurrent.Engine.TorqueOutDemand.LimitTo(
fld[currentGear.Gear].DragLoadStationaryTorque(responseCurrent.Engine.EngineSpeed),
fld[currentGear.Gear].FullLoadStationaryTorque(responseCurrent.Engine.EngineSpeed));
fcCurrent = GetFCRating(responseCurrent.Engine.EngineSpeed, tqCurrent);
}
}
var tqNext = response.Engine.TorqueOutDemand.LimitTo(
fld[next.Gear].DragLoadStationaryTorque(response.Engine.EngineSpeed),
......
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