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

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

allow overspeed in case overspeed is disabled but PCC option 3 is enabled and we are on a highway

parent af408e34
No related branches found
No related tags found
No related merge requests found
......@@ -753,7 +753,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public bool IsOverspeedAllowed(MeterPerSecond velocity, bool prohibitOverspeed = false) =>
!prohibitOverspeed
&& Driver.DriverData.OverSpeed.Enabled
// allow overspeed either if enabled in the driver model, or ADAS PCC option 3 is enabled in the vehicle and we are on a highway
&& (Driver.DriverData.OverSpeed.Enabled || ADAS.PredictiveCruiseControl == PredictiveCruiseControlType.Option_1_2_3 && DataBus.DrivingCycleInfo.CycleData.LeftSample.Highway)
&& velocity > Driver.DriverData.OverSpeed.MinSpeed
&& ApplyOverspeed(velocity) < (DataBus.VehicleInfo.MaxVehicleSpeed ?? 500.KMPHtoMeterPerSecond());
}
......
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