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

Skip to content
Snippets Groups Projects
Commit 9e7d34fb authored by Stefan BRANDT's avatar Stefan BRANDT
Browse files

bugfix: Decreasing MaxDistance to break earlier

parent ea0e0481
No related branches found
No related tags found
No related merge requests found
......@@ -98,7 +98,18 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
((NextDrivingAction.TriggerDistance - NextDrivingAction.ActionDistance) / Driver.DataBus.VehicleSpeed)
.IsSmaller(
Constants.SimulationSettings.LowerBoundTimeInterval / 20) && !Driver.DataBus.ClutchClosed(absTime);
if ( atTriggerTistance || closeBeforeBraking || brakingIntervalTooShort) {
var brakingIntervalShort = NextDrivingAction.Action == DrivingBehavior.Braking &&
((NextDrivingAction.TriggerDistance - NextDrivingAction.ActionDistance) / Driver.DataBus.VehicleSpeed)
.IsSmaller(
Constants.SimulationSettings.LowerBoundTimeInterval / 2) && !Driver.DataBus.ClutchClosed(absTime);
if (brakingIntervalShort && remainingDistance.IsEqual(ds)) {
return new ResponseDrivingCycleDistanceExceeded()
{
Source = this,
MaxDistance = ds / 2
};
}
if ( atTriggerTistance || closeBeforeBraking || brakingIntervalTooShort) {
CurrentDrivingMode = DrivingMode.DrivingModeBrake;
DrivingModes[CurrentDrivingMode].ResetMode();
Log.Debug("Switching to DrivingMode BRAKE");
......
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