From abf0d1fc00b46ee6cab6995fb2cd4d0a82e07b04 Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Wed, 17 Feb 2016 13:36:06 +0100 Subject: [PATCH] fix: air-drag computation does not rely on vehicle state --- VectoCore/Models/SimulationComponent/Impl/Vehicle.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs b/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs index 8a2c851f0c..e0126f14d7 100644 --- a/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs +++ b/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs @@ -201,7 +201,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl if (vAverage.IsEqual(0)) { return 0.SI<Newton>(); } - var result = ComputeAirDragPowerLoss(PreviousState.Velocity, PreviousState.Velocity + acceleration * dt, dt) / + var result = ComputeAirDragPowerLoss(previousVelocity, previousVelocity + acceleration * dt, dt) / vAverage; Log.Debug("AirDragResistance: {0}", result); -- GitLab