diff --git a/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs b/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs index a47539256054af46ac6df0f1a7739cca62782571..f711e75172b179806442eaf1b717681ab6087721 100644 --- a/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs +++ b/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs @@ -128,7 +128,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl if (_currentState.Velocity.IsEqual(0.SI<MeterPerSecond>(), Constants.SimulationSettings.VehicleSpeedHaltTolerance)) { _currentState.Velocity = 0.SI<MeterPerSecond>(); } - _currentState.Distance = _previousState.Distance + dt * (_previousState.Velocity + _currentState.Velocity) / 2; + _currentState.Distance = _previousState.Distance + _previousState.Velocity * dt + acceleration * dt * dt / 2; _currentState.DriverAcceleration = DriverAcceleration(acceleration); _currentState.RollingResistance = RollingResistance(gradient);