From 22fce00bf11531862638e2b030cb3ebf8f4ebbea Mon Sep 17 00:00:00 2001
From: Michael Krisper <michael.krisper@tugraz.at>
Date: Mon, 6 Jun 2016 15:30:34 +0200
Subject: [PATCH] enhanced data range of loss maps for generic vehicle, reset
 extrapolated flag in transmission loss map

---
 .../12t Delivery Truck/12t Delivery Truck.vmap                | 4 +++-
 .../40t Long Haul Truck/40t_Long_Haul_Truck.vmap              | 2 ++
 .../Declaration Mode/40t Long Haul Truck/Direct Gear.vtlm     | 1 +
 .../Declaration Mode/40t Long Haul Truck/Indirect Gear.vtlm   | 1 +
 .../SimulationComponent/Data/Gearbox/TransmissionLossMap.cs   | 1 +
 .../VectoCore/Models/SimulationComponent/Impl/Gearbox.cs      | 1 +
 6 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/Generic Vehicles/Declaration Mode/12t Delivery Truck/12t Delivery Truck.vmap b/Generic Vehicles/Declaration Mode/12t Delivery Truck/12t Delivery Truck.vmap
index f7ad107b96..8d0ccfd038 100644
--- a/Generic Vehicles/Declaration Mode/12t Delivery Truck/12t Delivery Truck.vmap	
+++ b/Generic Vehicles/Declaration Mode/12t Delivery Truck/12t Delivery Truck.vmap	
@@ -183,4 +183,6 @@ engine speed [1/min],torque [Nm],fuel consumption [g/h]
 2600,400,23315
 2600,480,28351
 2700,-150,0
-2700,0,5900
\ No newline at end of file
+2700,0,5900
+3000,1200,40000
+600,1200,40000
\ No newline at end of file
diff --git a/Generic Vehicles/Declaration Mode/40t Long Haul Truck/40t_Long_Haul_Truck.vmap b/Generic Vehicles/Declaration Mode/40t Long Haul Truck/40t_Long_Haul_Truck.vmap
index 26c035cad9..a201ed96fb 100644
--- a/Generic Vehicles/Declaration Mode/40t Long Haul Truck/40t_Long_Haul_Truck.vmap	
+++ b/Generic Vehicles/Declaration Mode/40t Long Haul Truck/40t_Long_Haul_Truck.vmap	
@@ -111,3 +111,5 @@
 2100,800,35717
 2100,1000,45643
 2100,1100,50653
+2100,2400,60000
+560,2400,60000
\ No newline at end of file
diff --git a/Generic Vehicles/Declaration Mode/40t Long Haul Truck/Direct Gear.vtlm b/Generic Vehicles/Declaration Mode/40t Long Haul Truck/Direct Gear.vtlm
index fa171bece8..5edeb69064 100644
--- a/Generic Vehicles/Declaration Mode/40t Long Haul Truck/Direct Gear.vtlm	
+++ b/Generic Vehicles/Declaration Mode/40t Long Haul Truck/Direct Gear.vtlm	
@@ -191,3 +191,4 @@ Input Speed [rpm],Input Torque [Nm],Torque Loss [Nm]
 1700,-1000,18.662
 1900,-1000,19.674
 2100,-1000,20.686
+0,0,0
\ No newline at end of file
diff --git a/Generic Vehicles/Declaration Mode/40t Long Haul Truck/Indirect Gear.vtlm b/Generic Vehicles/Declaration Mode/40t Long Haul Truck/Indirect Gear.vtlm
index 0198efcc36..26b819e032 100644
--- a/Generic Vehicles/Declaration Mode/40t Long Haul Truck/Indirect Gear.vtlm	
+++ b/Generic Vehicles/Declaration Mode/40t Long Haul Truck/Indirect Gear.vtlm	
@@ -191,3 +191,4 @@ Input Speed [rpm],Input Torque [Nm],Torque Loss [Nm]
 1700,-1000,33.662
 1900,-1000,34.674
 2100,-1000,35.686
+0,0,0
diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/Gearbox/TransmissionLossMap.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/Gearbox/TransmissionLossMap.cs
index a5c2988fff..86e0c3978c 100644
--- a/VectoCore/VectoCore/Models/SimulationComponent/Data/Gearbox/TransmissionLossMap.cs
+++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/Gearbox/TransmissionLossMap.cs
@@ -64,6 +64,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox
 		public bool Extrapolated
 		{
 			get { return _lossMap.Extrapolated; }
+			set { _lossMap.Extrapolated = value; }
 		}
 
 		public string GearName { get; private set; }
diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs
index b4930376ae..d20b7faee1 100644
--- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs
+++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs
@@ -448,6 +448,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 				Disengaged = false;
 				_engageTime = -double.MaxValue.SI<Second>();
 			}
+			ModelData.Gears[Gear].LossMap.Extrapolated = false;
 			AdvanceState();
 		}
 
-- 
GitLab