From 104e5bb4e9762429390028882019cfa7e5214b6d Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Thu, 21 Mar 2019 17:23:44 +0100 Subject: [PATCH] when re-engaging use minimum of current and previous out-angular velocity (fixes testcase VECTO-855 and others) --- VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs index d3b575effe..e88ef84be8 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs @@ -392,7 +392,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl var lastGear = Gear; Gear = DataBus.VehicleStopped ? _strategy.InitGear(absTime, dt, outTorque, outAngularVelocity) - : _strategy.Engage(absTime, dt, outTorque, outAngularVelocity); + : _strategy.Engage(absTime, dt, outTorque, VectoMath.Min(PreviousState.OutAngularVelocity, outAngularVelocity)); if (!DataBus.VehicleStopped) { if (Gear > lastGear) { LastUpshift = absTime; -- GitLab