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

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

allow coasting only above certain target speed (50km/h for now)

parent d4dcd5e0
No related branches found
No related tags found
No related merge requests found
......@@ -298,10 +298,15 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
entry.Distance - brakingDistance, brakingDistance, entry.Distance, nextTargetSpeed);
} else {
//var coastingDistance = ComputeCoastingDistance(currentSpeed, nextTargetSpeed);
action = DrivingBehavior.Coasting;
Log.Debug(
"adding 'Coasting' starting at distance {0}. coastingDistance: {1}, triggerDistance: {2}, nextTargetSpeed: {3}",
entry.Distance - coastingDistance, coastingDistance, entry.Distance, nextTargetSpeed);
if (currentSpeed > 50.KMPHtoMeterPerSecond()) {
action = DrivingBehavior.Coasting;
Log.Debug(
"adding 'Coasting' starting at distance {0}. coastingDistance: {1}, triggerDistance: {2}, nextTargetSpeed: {3}",
entry.Distance - coastingDistance, coastingDistance, entry.Distance, nextTargetSpeed);
} else {
coastingDistance = -1.SI<Meter>();
}
}
nextActions.Add(
new DrivingBehaviorEntry {
......
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