From 6162eda790fd30c2782f1056a582f1851d932dcc Mon Sep 17 00:00:00 2001
From: Dippold Martin <dippold@ivt.tugraz.at>
Date: Mon, 22 Jun 2015 13:17:12 +0200
Subject: [PATCH] * New version number * Update r_dyn calculation for each test
 (HS, LS1, LS2) * Update DemoData

---
 CSE/Calculation/Signal_identification.vb | 20 +++---
 CSE/Calculation/main_calculation_call.vb |  5 +-
 CSE/IO/cCriteria.vb                      |  4 +-
 CSE/declaration_public.vb                |  2 +-
 DemoData/EvaluationDemo.csjob.json       | 90 +++++++++++++-----------
 DemoData/StandardCriteria.cscrt.json     |  8 +--
 6 files changed, 67 insertions(+), 62 deletions(-)

diff --git a/CSE/Calculation/Signal_identification.vb b/CSE/Calculation/Signal_identification.vb
index e82c757..eeb251a 100644
--- a/CSE/Calculation/Signal_identification.vb
+++ b/CSE/Calculation/Signal_identification.vb
@@ -1028,18 +1028,16 @@ Module Signal_identification
 
         ' Calculate r_dyn_ref
         anz = 0
-        If coastingSeq = 0 Then
-            For i = 0 To ErgValues(tCompErg.valid).Count - 1
-                If ErgValues(tCompErg.valid)(i) = 1 Then
-                    r_dyn_ref += ErgValues(tCompErg.r_dyn)(i)
-                    anz += 1
-                End If
-            Next i
-            If anz > 0 Then
-                r_dyn_ref = r_dyn_ref / anz
-            Else
-                r_dyn_ref = 0
+        For i = 0 To ErgValues(tCompErg.valid).Count - 1
+            If ErgValues(tCompErg.valid)(i) = 1 Then
+                r_dyn_ref += ErgValues(tCompErg.r_dyn)(i)
+                anz += 1
             End If
+        Next i
+        If anz > 0 Then
+            r_dyn_ref = r_dyn_ref / anz
+        Else
+            r_dyn_ref = 0
         End If
 
         Return True
diff --git a/CSE/Calculation/main_calculation_call.vb b/CSE/Calculation/main_calculation_call.vb
index c677ed6..bb84bed 100644
--- a/CSE/Calculation/main_calculation_call.vb
+++ b/CSE/Calculation/main_calculation_call.vb
@@ -240,17 +240,16 @@ Public Module main_calculation_call
             Job.fv_veh_opt2 = 0
             Job.fv_pe = 0
             run = 0
-            r_dyn_ref = 0
         End If
 
         Do While Change
+            ' Initialise Parameter
+            r_dyn_ref = 0
             If coastingSeq = 0 Then
-                ' Initialise Parameter
                 Job.fv_veh = 0
                 Job.fv_veh_opt2 = 0
                 Job.fv_pe = 0
                 run += 1
-                r_dyn_ref = 0
             End If
 
             ' Calculate fv_veh
diff --git a/CSE/IO/cCriteria.vb b/CSE/IO/cCriteria.vb
index 1e1e002..6104c03 100644
--- a/CSE/IO/cCriteria.vb
+++ b/CSE/IO/cCriteria.vb
@@ -63,7 +63,7 @@ Public Class cCriteria
         g.v_veh_avg_max_LS = 16
         g.v_veh_float_delta_LS = 0.5
         g.tq_sum_float_delta_LS = 0.1
-        g.delta_n_ec_LS = 0.06
+        g.delta_n_ec_LS = 0.02
 
         g.v_wind_avg_max_HS = 5
         g.v_wind_1s_max_HS = 8
@@ -71,7 +71,7 @@ Public Class cCriteria
         g.v_veh_avg_min_HS = 80
         g.v_veh_1s_delta_HS = 0.3
         g.tq_sum_1s_delta_HS = 0.1
-        g.delta_n_ec_HS = 0.01
+        g.delta_n_ec_HS = 0.02
 
         g.delta_t_tyre_max = 5
         g.delta_rr_corr_max = 0.3
diff --git a/CSE/declaration_public.vb b/CSE/declaration_public.vb
index de7c2ed..fdac44b 100644
--- a/CSE/declaration_public.vb
+++ b/CSE/declaration_public.vb
@@ -13,7 +13,7 @@ Module declaration_public
 
     ' Description of the form
     Public Const AppName As String = "VECTO_CSE"                ' Name of the programm
-    Public Const AppVers As String = "2.0.1-beta5"              ' Version of the Programm
+    Public Const AppVers As String = "2.0.2-beta5"                    ' Version of the Programm
     Public AppDate As String                                    ' Date of the compilation of the programm
 
     ' Control variables
diff --git a/DemoData/EvaluationDemo.csjob.json b/DemoData/EvaluationDemo.csjob.json
index 2f58e4f..862d059 100644
--- a/DemoData/EvaluationDemo.csjob.json
+++ b/DemoData/EvaluationDemo.csjob.json
@@ -2,8 +2,8 @@
   "Header": {
     "Title": "vecto-cse JOB",
     "FileVersion": "1.0.0",
-    "AppVersion": "2.0.1-beta5",
-    "ModifiedDate": "2015.05.21 11:30:53 +02:00",
+    "AppVersion": "2.0.2-beta5",
+    "ModifiedDate": "2015.06.22 13:14:40 +02:00",
     "CreatedBy": "VKMTHD\\martindippold@Dippold(lic: 88070b7c-1b69-4d65-a112-10c57f86f5ad)",
     "StrictBody": null,
     "BodySchema": {
@@ -72,7 +72,7 @@
                     'default': 0,
                     "units": "°",
                 },
-                "CdxA": {
+                "CdxAß": {
                     "type": "number", 
                     "description": "Average CdxA before yaw angle correction", 
                     'default': 0,
@@ -231,7 +231,10 @@
                             "units": "km/h", 
                         },
                         "tq_sum_float_delta_LS": {"type": "number", "required": true, 
-                            "description": "+/- maximum relative deviation of floating average torque from average torque over entire section (low speed)", 
+                            "description": "+/- maximum relative deviation of floating average torque from average torque over entire section (low speed test)", 
+                        },
+                        "delta_n_ec_LS": {"type": "number", "required": true, 
+                            "description": "+/- maximum relative deviation of variance of engine/card speed compared to variance in vehicle speed (used as plausibility check for engine speed signal) (low speed test)", 
                         },
 
                         "v_wind_avg_max_HS": {"type": "number", "required": true, 
@@ -257,6 +260,9 @@
                         "tq_sum_1s_delta_HS": {"type": "number", "required": true, 
                             "description": "+/- maximum relative deviation of 1s average torque from average torque over entire section (high speed).", 
                         },
+                        "delta_n_ec_HS": {"type": "number", "required": true, 
+                            "description": "+/- maximum relative deviation of variance of engine/card speed compared to variance in vehicle speed (used as plausibility check for engine/card speed signal) (high speed test).", 
+                        },
 
                         "delta_t_tyre_max": {"type": "number", "required": true, 
                             "description": "Maximum variation of tyre temperature between high speeds and low speeds.", 
@@ -304,55 +310,57 @@
         "accel_correction": true,
         "gradient_correction": false,
         "hz_out": 1,
-        "rr_corr_factor": 1,
-        "acc_corr_avg": 1,
-        "dist_float": 25
+        "rr_corr_factor": 1.0,
+        "acc_corr_avg": 1.0,
+        "dist_float": 25.0
       },
       "Validation": {
-        "trigger_delta_x_max": 10,
-        "trigger_delta_y_max": 100,
-        "delta_head_max": 10,
+        "trigger_delta_x_max": 10.0,
+        "trigger_delta_y_max": 100.0,
+        "delta_head_max": 10.0,
         "segruns_min_CAL": 5,
         "segruns_min_LS": 1,
         "segruns_min_HS": 2,
         "segruns_min_head_MS": 10,
-        "delta_Hz_max": 1,
-        "delta_parallel_max": 20,
-        "v_wind_avg_max_CAL": 5,
-        "v_wind_1s_max_CAL": 8,
-        "beta_avg_max_CAL": 5,
-        "leng_crit": 3,
-        "v_wind_avg_max_LS": 5,
-        "v_wind_1s_max_LS": 8,
-        "v_veh_avg_min_LS": 9,
-        "v_veh_avg_max_LS": 16,
-        "v_veh_float_delta_LS": 0.15,
+        "delta_Hz_max": 1.0,
+        "delta_parallel_max": 20.0,
+        "v_wind_avg_max_CAL": 5.0,
+        "v_wind_1s_max_CAL": 8.0,
+        "beta_avg_max_CAL": 5.0,
+        "leng_crit": 3.0,
+        "v_wind_avg_max_LS": 5.0,
+        "v_wind_1s_max_LS": 8.0,
+        "v_veh_avg_min_LS": 9.0,
+        "v_veh_avg_max_LS": 16.0,
+        "v_veh_float_delta_LS": 0.5,
         "tq_sum_float_delta_LS": 0.1,
-        "v_wind_avg_max_HS": 5,
-        "v_wind_1s_max_HS": 8,
-        "beta_avg_max_HS": 3,
-        "v_veh_avg_min_HS": 80,
+        "delta_n_ec_LS": 0.02,
+        "v_wind_avg_max_HS": 5.0,
+        "v_wind_1s_max_HS": 8.0,
+        "beta_avg_max_HS": 3.0,
+        "v_veh_avg_min_HS": 80.0,
         "v_veh_1s_delta_HS": 0.3,
         "tq_sum_1s_delta_HS": 0.1,
-        "delta_t_tyre_max": 5,
+        "delta_n_ec_HS": 0.02,
+        "delta_t_tyre_max": 5.0,
         "delta_rr_corr_max": 0.3,
-        "t_amb_min": 0,
-        "t_amb_max": 35,
-        "t_amb_var": 3,
-        "t_amb_tarmac": 25
+        "t_amb_min": 0.0,
+        "t_amb_max": 35.0,
+        "t_amb_var": 3.0,
+        "t_amb_tarmac": 25.0
       }
     },
-    "fv_veh": 0.0,
-    "fa_pe": 0.0,
-    "fv_pe": 0.0,
-    "beta_ame": 0.0,
-    "CdxA": 0.0,
-    "beta": 0.0,
-    "delta_CdxA": 0.0,
-    "CdxA0": 0.0,
-    "CdxA0_opt2": 0.0,
-    "valid_t_tire": false,
-    "valid_t_amb": false,
+    "fv_veh": 0.971,
+    "fa_pe": 1.0,
+    "fv_pe": 1.123,
+    "beta_ame": -0.02,
+    "CdxAß": 5.17138,
+    "beta": 0.95404,
+    "delta_CdxA": 0.0292,
+    "CdxA0": 5.14219,
+    "CdxA0_opt2": 5.13966,
+    "valid_t_tire": true,
+    "valid_t_amb": true,
     "valid_RRC": false
   }
 }
\ No newline at end of file
diff --git a/DemoData/StandardCriteria.cscrt.json b/DemoData/StandardCriteria.cscrt.json
index b40af85..06da36a 100644
--- a/DemoData/StandardCriteria.cscrt.json
+++ b/DemoData/StandardCriteria.cscrt.json
@@ -2,8 +2,8 @@
   "Header": {
     "Title": "vecto-cse CRITERIA",
     "FileVersion": "1.0.0",
-    "AppVersion": "2.0.1-beta5",
-    "ModifiedDate": "2015.06.10 09:51:03 +02:00",
+    "AppVersion": "2.0.2-beta5",
+    "ModifiedDate": "2015.06.22 13:11:11 +02:00",
     "CreatedBy": "VKMTHD\\martindippold@Dippold(lic: 88070b7c-1b69-4d65-a112-10c57f86f5ad)",
     "StrictBody": null,
     "BodySchema": {
@@ -212,14 +212,14 @@
       "v_veh_avg_max_LS": 16.0,
       "v_veh_float_delta_LS": 0.5,
       "tq_sum_float_delta_LS": 0.1,
-      "delta_n_ec_LS": 0.06,
+      "delta_n_ec_LS": 0.02,
       "v_wind_avg_max_HS": 5.0,
       "v_wind_1s_max_HS": 8.0,
       "beta_avg_max_HS": 3.0,
       "v_veh_avg_min_HS": 80.0,
       "v_veh_1s_delta_HS": 0.3,
       "tq_sum_1s_delta_HS": 0.1,
-      "delta_n_ec_HS": 0.01,
+      "delta_n_ec_HS": 0.02,
       "delta_t_tyre_max": 5.0,
       "delta_rr_corr_max": 0.3,
       "t_amb_min": 0.0,
-- 
GitLab