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

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

turn engine on (if it is off) and no eco-roll or pcc action is active

parent 99350207
No related branches found
No related tags found
No related merge requests found
......@@ -194,6 +194,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
HandleEcoRoll(absTime, targetVelocity);
}
if (EcoRollState.State != EcoRollStates.EcoRollOn && PCCState != PCCStates.UseCase1 &&
PCCState != PCCStates.UseCase2) {
EngineOffTimestamp = null;
Driver.DataBus.IgnitionOn = true;
}
if (CurrentDrivingMode == DrivingMode.DrivingModeBrake) {
if (Driver.DataBus.Distance.IsGreaterOrEqual(BrakeTrigger.TriggerDistance, 1e-3.SI<Meter>())) {
CurrentDrivingMode = DrivingMode.DrivingModeDrive;
......@@ -392,6 +398,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
var dBus = Driver.DataBus;
var vehicleSpeedAboveLowerThreshold = dBus.VehicleSpeed >= Driver.DriverData.EcoRoll.MinSpeed;
var slopeNegative = dBus.RoadGradient.IsSmaller(0);
// potential optimization...
//if (EcoRollState.State != EcoRollStates.EcoRollOn && !slopeNegative) {
// EcoRollState.State = EcoRollStates.EcoRollOff;
// return;
//}
var forces = dBus.SlopeResistance(dBus.RoadGradient) + dBus.RollingResistance(dBus.RoadGradient) +
dBus.AirDragResistance(dBus.VehicleSpeed, dBus.VehicleSpeed);
......
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