Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

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
var lookAheadData = new DriverData.LACData {
Enabled = DeclarationData.Driver.LookAhead.Enabled,
//Deceleration = DeclarationData.Driver.LookAhead.Deceleration,
//MinSpeed = DeclarationData.Driver.LookAhead.MinimumSpeed,
MinSpeed = DeclarationData.Driver.LookAhead.MinimumSpeed,
LookAheadDecisionFactor = new LACDecisionFactor(),
LookAheadDistanceFactor = DeclarationData.Driver.LookAhead.LookAheadDistanceFactor,
};
......
......@@ -127,9 +127,9 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
var retVal = SetCommonGearboxData(gearbox);
//var gears = gearbox.Gears;
if (gearbox.Gears.Count < 1) {
if (gearbox.Gears.Count < 2) {
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;
......@@ -142,7 +142,9 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
retVal.StartSpeed = gearbox.StartSpeed;
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>();
......
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