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

Skip to content
Snippets Groups Projects
Commit 881f3509 authored by Markus QUARITSCH's avatar Markus QUARITSCH
Browse files

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

Merge pull request #797 in VECTO/vecto-sim from ~EMBRANDST/vecto-sim:bugfix/VECTO-1159-simulation-abort-in-urbandelivery-lowloading to develop

* commit '9e7d34fb':
  bugfix: Decreasing MaxDistance to break earlier
parents ea0e0481 9e7d34fb
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