From d853b954725001d7a015ac7e606bac7b0e11304b Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Tue, 30 Aug 2016 09:53:30 +0200 Subject: [PATCH] Adding n80h to databus (required for AT Shift strategy) --- .../VectoCore/Models/Simulation/DataBus/IEngineInfo.cs | 2 ++ .../VectoCore/Models/Simulation/Impl/VehicleContainer.cs | 5 +++++ .../SimulationComponent/Data/Engine/EngineFullLoadCurve.cs | 6 ++++++ .../Models/SimulationComponent/Impl/CombustionEngine.cs | 5 +++++ 4 files changed, 18 insertions(+) diff --git a/VectoCore/VectoCore/Models/Simulation/DataBus/IEngineInfo.cs b/VectoCore/VectoCore/Models/Simulation/DataBus/IEngineInfo.cs index ff40004e03..811d85d59d 100644 --- a/VectoCore/VectoCore/Models/Simulation/DataBus/IEngineInfo.cs +++ b/VectoCore/VectoCore/Models/Simulation/DataBus/IEngineInfo.cs @@ -54,5 +54,7 @@ namespace TUGraz.VectoCore.Models.Simulation.DataBus PerSecond EngineRatedSpeed { get; } PerSecond EngineN95hSpeed { get; } + + PerSecond EngineN80hSpeed { get; } } } \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/Simulation/Impl/VehicleContainer.cs b/VectoCore/VectoCore/Models/Simulation/Impl/VehicleContainer.cs index db8744b4c0..e7f0816225 100644 --- a/VectoCore/VectoCore/Models/Simulation/Impl/VehicleContainer.cs +++ b/VectoCore/VectoCore/Models/Simulation/Impl/VehicleContainer.cs @@ -174,6 +174,11 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl get { return Engine.EngineN95hSpeed; } } + public PerSecond EngineN80hSpeed + { + get { return Engine.EngineN80hSpeed; } + } + #endregion #region IVehicleCockpit diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/Engine/EngineFullLoadCurve.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/Engine/EngineFullLoadCurve.cs index f9a3e5520b..1009b46606 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/Engine/EngineFullLoadCurve.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/Engine/EngineFullLoadCurve.cs @@ -47,6 +47,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Engine private PerSecond _engineSpeedLo; // 55% of Pmax private PerSecond _engineSpeedHi; // 70% of Pmax private PerSecond _n95hSpeed; // 95% of Pmax + private PerSecond _n80hSpeed; // 80% of Pmax public static EngineFullLoadCurve ReadFromFile(string fileName, bool declarationMode = false) { @@ -94,6 +95,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Engine } } + public PerSecond N80hSpeed + { + get { return _n80hSpeed ?? (_n80hSpeed = FindEngineSpeedForPower(0.8 * MaxPower).Last()); } + } + public PerSecond N95hSpeed { get { return _n95hSpeed ?? (_n95hSpeed = FindEngineSpeedForPower(0.95 * MaxPower).Last()); } diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs index 983ce5cf3f..bca7a14a5f 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs @@ -126,6 +126,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl get { return ModelData.FullLoadCurve.N95hSpeed; } } + public PerSecond EngineN80hSpeed + { + get { return ModelData.FullLoadCurve.N80hSpeed; } + } + public ICombustionEngineIdleController IdleController { get { return EngineIdleController ?? (EngineIdleController = new CombustionEngineIdleController(this)); } -- GitLab