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

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

Driver Strategy: switch to braking mode only if close to braking point

parent a743d180
No related branches found
No related tags found
No related merge requests found
......@@ -679,7 +679,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
// coast would decelerate more than driver's max deceleration => issue brakes to decelerate with driver's max deceleration
response = Driver.DrivingActionBrake(absTime, ds, DriverStrategy.BrakeTrigger.NextTargetSpeed,
gradient, r);
Phase = BrakingPhase.Brake;
if ((DriverStrategy.BrakeTrigger.BrakingStartDistance - currentDistance).IsSmallerOrEqual(
Constants.SimulationSettings.DriverActionDistanceTolerance)) {
Phase = BrakingPhase.Brake;
}
}).
Case<ResponseOverload>(r => {
// limiting deceleration while coast may result in an overload => issue brakes to decelerate with driver's max deceleration
......
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