From 8715dc7dc4637c507f563101179424a2a3141f47 Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Wed, 6 May 2020 10:50:57 +0200
Subject: [PATCH] adapt shift polygon calculation for AMT Effshift in case
 clutch-closing speed is lower than idle speed * 1.1

---
 VectoCore/VectoCore/Models/Declaration/DeclarationData.cs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs
index cb6d617bea..3d254a2459 100644
--- a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs
+++ b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs
@@ -626,7 +626,10 @@ namespace TUGraz.VectoCore.Models.Declaration
 					throw new VectoException("ComputeShiftPolygon needs at least 2 gears. {0} gears given.", gears.Count);
 				}
 
-				var p2 = new Point(engine.IdleSpeed.Value() * 1.1, 0);
+				var clutchClosingSpeed = (engine.FullLoadCurves[0].RatedSpeed - engine.IdleSpeed) *
+									Constants.SimulationSettings.ClutchClosingSpeedNorm + engine.IdleSpeed;
+
+				var p2 = new Point(Math.Min((clutchClosingSpeed - 10.RPMtoRad()).Value(), engine.IdleSpeed.Value() * 1.1), 0);
 				var p3 = new Point(fullLoadCurve.NTq99lSpeed.Value(), 0);
 				var p5 = new Point(fullLoadCurve.NP98hSpeed.Value(), fullLoadCurve.MaxTorque.Value() * 1.1);
 
-- 
GitLab