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

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

fix in driver strategy: when checking if the request exceeds the next action...

fix in driver strategy: when checking if the request exceeds the next action use the brake trigger, not driving action (brake trigger may change during braking phase!)
parent 96e4a460
No related branches found
No related tags found
No related merge requests found
......@@ -439,7 +439,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
}
var newOperatingPoint = VectoMath.ComputeTimeInterval(DataBus.VehicleSpeed, response.Acceleration, DataBus.Distance,
ds);
newds);
if (newOperatingPoint.SimulationInterval.IsSmaller(Constants.SimulationSettings.LowerBoundTimeInterval)) {
// the next time interval will be too short, this may lead to issues with inertia etc.
// instead of accelerating, drive at constant speed.
......@@ -751,7 +751,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
protected override IResponse CheckRequestDoesNotExceedNextAction(Second absTime, Meter ds,
MeterPerSecond targetVelocity, Radian gradient, IResponse response, out Meter newds)
{
var nextAction = DriverStrategy.NextDrivingAction;
var nextAction = DriverStrategy.BrakeTrigger;
newds = ds;
if (nextAction == null) {
return response;
......
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