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

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

re-adding min-speed for coasting

parent 6c3dbc5b
No related branches found
No related tags found
No related merge requests found
...@@ -57,7 +57,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter ...@@ -57,7 +57,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
var lookAheadData = new DriverData.LACData { var lookAheadData = new DriverData.LACData {
Enabled = DeclarationData.Driver.LookAhead.Enabled, Enabled = DeclarationData.Driver.LookAhead.Enabled,
//Deceleration = DeclarationData.Driver.LookAhead.Deceleration, //Deceleration = DeclarationData.Driver.LookAhead.Deceleration,
//MinSpeed = DeclarationData.Driver.LookAhead.MinimumSpeed, MinSpeed = DeclarationData.Driver.LookAhead.MinimumSpeed,
LookAheadDecisionFactor = new LACDecisionFactor(), LookAheadDecisionFactor = new LACDecisionFactor(),
LookAheadDistanceFactor = DeclarationData.Driver.LookAhead.LookAheadDistanceFactor, LookAheadDistanceFactor = DeclarationData.Driver.LookAhead.LookAheadDistanceFactor,
}; };
......
...@@ -127,9 +127,9 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter ...@@ -127,9 +127,9 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
var retVal = SetCommonGearboxData(gearbox); var retVal = SetCommonGearboxData(gearbox);
//var gears = gearbox.Gears; //var gears = gearbox.Gears;
if (gearbox.Gears.Count < 1) { if (gearbox.Gears.Count < 2) {
throw new VectoSimulationException( throw new VectoSimulationException(
"At least one Gear-Entry must be defined in Gearbox!"); "At least two Gear-Entries must be defined in Gearbox!");
} }
retVal.Inertia = gearbox.Inertia; retVal.Inertia = gearbox.Inertia;
...@@ -142,7 +142,9 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter ...@@ -142,7 +142,9 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
retVal.StartSpeed = gearbox.StartSpeed; retVal.StartSpeed = gearbox.StartSpeed;
retVal.StartAcceleration = gearbox.StartAcceleration; retVal.StartAcceleration = gearbox.StartAcceleration;
var gearDifferenceRatio = gearbox.Gears[0].Ratio / gearbox.Gears[1].Ratio; var gearDifferenceRatio = gearbox.Type.AutomaticTransmission() && gearbox.Gears.Count > 2 ?
gearbox.Gears[0].Ratio / gearbox.Gears[1].Ratio
: 1.0;
var gears = new Dictionary<uint, GearData>(); var gears = new Dictionary<uint, GearData>();
......
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