Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

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

drivingcycle: if vehicle speed is already at the next targetspeed and the...

drivingcycle: if vehicle speed is already at the next targetspeed and the estimated remaining distance is too short, simulate the current interval
parent 02458193
No related branches found
No related tags found
No related merge requests found
...@@ -186,7 +186,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -186,7 +186,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
var estimatedTimeToSpeedChange = distanceToSpeedChange / DataBus.VehicleInfo.VehicleSpeed; var estimatedTimeToSpeedChange = distanceToSpeedChange / DataBus.VehicleInfo.VehicleSpeed;
if (estimatedTimeToSpeedChange.IsSmaller(Constants.SimulationSettings.LowerBoundTimeInterval / 2) && if (estimatedTimeToSpeedChange.IsSmaller(Constants.SimulationSettings.LowerBoundTimeInterval / 2) &&
DataBus.VehicleInfo.VehicleSpeed.IsSmaller(DataBus.DriverInfo.ApplyOverspeed(Left.VehicleTargetSpeed), 0.1.KMPHtoMeterPerSecond()) && DataBus.VehicleInfo.VehicleSpeed.IsSmaller(DataBus.DriverInfo.ApplyOverspeed(Left.VehicleTargetSpeed), 0.1.KMPHtoMeterPerSecond()) &&
DataBus.VehicleInfo.VehicleSpeed.IsSmaller(DataBus.DriverInfo.ApplyOverspeed(Right.VehicleTargetSpeed), 0.1.KMPHtoMeterPerSecond())) { DataBus.VehicleInfo.VehicleSpeed.IsSmallerOrEqual( DataBus.DriverInfo.ApplyOverspeed(Right.VehicleTargetSpeed), 0.1.KMPHtoMeterPerSecond())) {
CurrentState.Response = DriveDistance(absTime, ds); CurrentState.Response = DriveDistance(absTime, ds);
return CurrentState.Response; return CurrentState.Response;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment