Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

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

Merge pull request #395 in VECTO/vecto-sim from...

Merge pull request #395 in VECTO/vecto-sim from ~EMQUARIMA/vecto-sim:bugfix/VECTO-480-a_pos-0-in-sum-file to develop

* commit '146123bc':
  correction of handling extrapolation of full-load curve
  1hz filter: handle the case if vehicle already stopped but there is some time left for the whole second
parents 5fd86322 146123bc
No related branches found
No related tags found
No related merge requests found
......@@ -319,7 +319,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
currentGear > 1
? ModelData.Gears[currentGear].ShiftPolygon.InterpolateDownshift(response.EngineSpeed)
: double.MaxValue.SI<NewtonMeter>());
var reserve = 1 - inTorque / maxTorque;
var reserve = maxTorque.IsEqual(0) ? -1 : (1 - inTorque / maxTorque).Value();
if (reserve >= ModelData.TorqueReserve && IsBelowUpShiftCurve(currentGear, inTorque, inAngularVelocity)) {
continue;
}
......
......@@ -184,7 +184,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
var fullDragTorque = ModelData.FullLoadCurve.DragLoadStationaryTorque(avgEngineSpeed);
var dynamicFullLoadPower = ComputeFullLoadPower(avgEngineSpeed, dt, dryRun);
if (dynamicFullLoadPower < 0) {
dynamicFullLoadPower = double.MinValue.SI<Watt>();
dynamicFullLoadPower = 0.SI<Watt>();
}
var dynamicFullLoadTorque = dynamicFullLoadPower / avgEngineSpeed;
var inertiaTorqueLoss =
......
......@@ -157,6 +157,10 @@ namespace TUGraz.VectoCore.OutputData.ModFilter
var dt = remainingDt;
var a = (MeterPerSquareSecond)last[(int)ModalResultField.acc];
var ds = v * dt + a / 2 * dt * dt;
if (v.IsEqual(0)) {
ds = 0.SI<Meter>();
a = 0.SI<MeterPerSquareSecond>();
}
if (ds.IsSmaller(0)) {
throw new VectoSimulationException("1Hz-Filter: simulation distance must not be negative. ds: {0} {1}", ds, "4");
}
......
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