From 4883d27606b194b8cd2cf3a3de3150b22d00bd05 Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Wed, 30 Mar 2016 16:49:04 +0200 Subject: [PATCH] add engine drag power to databus interface --- VectoCore/Models/Simulation/DataBus/IEngineInfo.cs | 2 ++ VectoCore/Models/Simulation/Impl/VehicleContainer.cs | 5 +++++ .../Models/SimulationComponent/Impl/CombustionEngine.cs | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/VectoCore/Models/Simulation/DataBus/IEngineInfo.cs b/VectoCore/Models/Simulation/DataBus/IEngineInfo.cs index d6573a424e..b97c979615 100644 --- a/VectoCore/Models/Simulation/DataBus/IEngineInfo.cs +++ b/VectoCore/Models/Simulation/DataBus/IEngineInfo.cs @@ -45,6 +45,8 @@ namespace TUGraz.VectoCore.Models.Simulation.DataBus Watt EngineStationaryFullPower(PerSecond angularSpeed); + Watt EngineDragPower(PerSecond angularSpeed); + PerSecond EngineIdleSpeed { get; } diff --git a/VectoCore/Models/Simulation/Impl/VehicleContainer.cs b/VectoCore/Models/Simulation/Impl/VehicleContainer.cs index bd40f1e29f..d4d8bfc8b6 100644 --- a/VectoCore/Models/Simulation/Impl/VehicleContainer.cs +++ b/VectoCore/Models/Simulation/Impl/VehicleContainer.cs @@ -127,6 +127,11 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl return Engine.EngineStationaryFullPower(angularSpeed); } + public Watt EngineDragPower(PerSecond angularSpeed) + { + return Engine.EngineDragPower(angularSpeed); + } + public PerSecond EngineIdleSpeed { get { return Engine.EngineIdleSpeed; } diff --git a/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs b/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs index a52c3823c6..80468d16cc 100644 --- a/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs +++ b/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs @@ -104,6 +104,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl return ModelData.FullLoadCurve.FullLoadStationaryTorque(angularSpeed) * angularSpeed; } + public Watt EngineDragPower(PerSecond angularSpeed) + { + return ModelData.FullLoadCurve.DragLoadStationaryPower(angularSpeed); + } + public PerSecond EngineIdleSpeed { get { return ModelData.IdleSpeed; } -- GitLab