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

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

overspeed only when accelerating

parent 2ca54d50
No related branches found
No related tags found
No related merge requests found
......@@ -320,7 +320,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
// compute speed at the end of the simulation interval. if it exceeds the limit -> return
var v2 = DataBus.VehicleSpeed + limitedOperatingPoint.Acceleration * limitedOperatingPoint.SimulationInterval;
if (v2 > maxVelocity) {
if (v2 > maxVelocity && limitedOperatingPoint.Acceleration.IsGreaterOrEqual(0.SI<MeterPerSquareSecond>())) {
Log.Debug("vehicle's velocity would exceed given max speed. v2: {0}, max speed: {1}", v2, maxVelocity);
return new ResponseSpeedLimitExceeded() { Source = this };
}
......
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