From df5eef31e5eda59d7ce5bbfc03c5068017f8b1bc Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Mon, 3 Aug 2015 11:07:09 +0200
Subject: [PATCH] move constant to SimulationSettings class

---
 VectoCore/Models/SimulationComponent/Impl/Clutch.cs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/VectoCore/Models/SimulationComponent/Impl/Clutch.cs b/VectoCore/Models/SimulationComponent/Impl/Clutch.cs
index ae33867ac9..d2a77ca383 100644
--- a/VectoCore/Models/SimulationComponent/Impl/Clutch.cs
+++ b/VectoCore/Models/SimulationComponent/Impl/Clutch.cs
@@ -1,4 +1,5 @@
 using System;
+using TUGraz.VectoCore.Configuration;
 using TUGraz.VectoCore.Models.Connector.Ports;
 using TUGraz.VectoCore.Models.Simulation;
 using TUGraz.VectoCore.Models.Simulation.Data;
@@ -13,7 +14,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 		private readonly PerSecond _ratedSpeed;
 		private ITnOutPort _nextComponent;
 		private const double ClutchEff = 1;
-		private const double CluchNormSpeed = 0.03;
 		private ClutchState _clutchState = ClutchState.ClutchClosed;
 
 		public enum ClutchState
@@ -94,12 +94,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 			} else {
 				var engineSpeedNorm = (angularVelocity - _idleSpeed) /
 									(_ratedSpeed - _idleSpeed);
-				if (engineSpeedNorm < CluchNormSpeed) {
+				if (engineSpeedNorm < Constants.SimulationSettings.CluchNormSpeed) {
 					_clutchState = ClutchState.ClutchSlipping;
 
 					var engineSpeed0 = VectoMath.Max(_idleSpeed, angularVelocity);
-					var clutchSpeedNorm = CluchNormSpeed /
-										((_idleSpeed + CluchNormSpeed * (_ratedSpeed - _idleSpeed)) / _ratedSpeed);
+					var clutchSpeedNorm = Constants.SimulationSettings.CluchNormSpeed /
+										((_idleSpeed + Constants.SimulationSettings.CluchNormSpeed * (_ratedSpeed - _idleSpeed)) / _ratedSpeed);
 					engineSpeedIn =
 						((clutchSpeedNorm * engineSpeed0 / _ratedSpeed) * (_ratedSpeed - _idleSpeed) + _idleSpeed).Radian
 							.Cast<PerSecond>();
-- 
GitLab