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

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

1hz filter: handle the case if vehicle already stopped but there is some time...

1hz filter: handle the case if vehicle already stopped but there is some time left for the whole second
parent c37881e9
No related branches found
No related tags found
No related merge requests found
......@@ -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