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

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

introduce declaration contants for gearbox shifting parameters

parent b90b8fbf
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,7 @@ using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.InputData.Impl;
using TUGraz.VectoCore.Models.Declaration;
namespace TUGraz.VectoCore.InputData.FileIO.JSON
{
......@@ -214,7 +215,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
get
{
return Body["DownshiftAferUpshiftDelay"] == null
? 10.SI<Second>()
? DeclarationData.Gearbox.DownshiftAfterUpshiftDelay
: Body.GetEx<double>("DownshiftAferUpshiftDelay").SI<Second>();
}
}
......@@ -224,7 +225,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
get
{
return Body["UpshiftAfterDownshiftDelay"] == null
? 10.SI<Second>()
? DeclarationData.Gearbox.UpshiftAfterDownshiftDelay
: Body.GetEx<double>("UpshiftAfterDownshiftDelay").SI<Second>();
}
}
......@@ -234,7 +235,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
get
{
return Body["UpshiftMinAcceleration"] == null
? 0.1.SI<MeterPerSquareSecond>()
? DeclarationData.Gearbox.UpshiftMinAcceleration
: Body.GetEx<double>("UpshiftMinAcceleration").SI<MeterPerSquareSecond>();
}
}
......
......@@ -222,9 +222,9 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdaper
});
}).ToDictionary(kv => kv.Key, kv => kv.Value);
retVal.DownshiftAfterUpshiftDelay = 10.SI<Second>();
retVal.UpshiftAfterDownshiftDelay = 10.SI<Second>();
retVal.UpshiftMinAcceleration = 0.1.SI<MeterPerSquareSecond>();
retVal.DownshiftAfterUpshiftDelay = DeclarationData.Gearbox.DownshiftAfterUpshiftDelay;
retVal.UpshiftAfterDownshiftDelay = DeclarationData.Gearbox.UpshiftAfterDownshiftDelay;
retVal.UpshiftMinAcceleration =DeclarationData.Gearbox.UpshiftMinAcceleration;
return retVal;
}
......
......@@ -236,6 +236,9 @@ namespace TUGraz.VectoCore.Models.Declaration
private static double ShiftPolygonEngineFldMargin = 0.98;
public static readonly Second MinTimeBetweenGearshifts = 2.SI<Second>();
public static readonly Second DownshiftAfterUpshiftDelay = 10.SI<Second>();
public static readonly Second UpshiftAfterDownshiftDelay = 10.SI<Second>();
public static readonly MeterPerSquareSecond UpshiftMinAcceleration = 0.1.SI<MeterPerSquareSecond>();
/// <summary>
/// computes the shift polygons for a single gear according to the whitebook 2016
......
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