diff --git a/CHANGES.md b/CHANGES.md index 98315277b9c8b997cb6f3bdfc7d36ec9b493c976..afbe3b4822a2b08d2ef001d79c51126ae961cab0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,11 +15,12 @@ TUG improvements: * Check of digits after decimal separator for all coordinates, transmission ratios (gear + axle) and altitudes (Values in vehicle file changed to string values) * Vehicle file check included (For height and class code) * Expand vehicle file with vVehMax and GVMMax value + * Change vehicle file configuration parameter from "Rigid/Tractor" to "No/Yes" * Displacement of Genshape file into code * Add reference vehicle high in genshape class * Add minimum/maximum vehicle high in genshape class * Control of min/max height with vehicle height only in Declaration mode - * Calculation of new Result values (delta_CdxA_height; v_avg_LS/HS; t_amb_LS1) + * Calculation of new Result values (delta_CdxA_height; v_avg_LS/HS; t_amb_LS1, CdxA(ß)_H1/2, beta_H1/2) * Change of CdxA(ß) and beta calculation * Output files in Declaration mode extended * Output files adapted diff --git a/CSE/Calculation/sub_linear_regression.vb b/CSE/Calculation/sub_linear_regression.vb index af7aaa60945b4101742132cb75bb158b8133ed4f..d3932e972447fd33926f5085eabae5c6d9d5f7aa 100644 --- a/CSE/Calculation/sub_linear_regression.vb +++ b/CSE/Calculation/sub_linear_regression.vb @@ -18,7 +18,6 @@ Module sub_linear_regression Dim numH1, numH2 As Integer Dim XLS1_Array(,), XLS2_Array(,), XHS_Array(,), XHSg_Array(,), XHS_S(1, 1), YLS1_Array(), YLS2_Array(), YHS_Array(), YHSg_Array(), YHS_S(1) As Double Dim XLR(,), YLR(), WFLR(,), F0, F2, F095, F295, R2, Rho_air_LS1, Rho_air_LS2 As Double - Dim CdxAß_H1, CdxAß_H2, beta_H1, beta_H2 As Double Dim EnumStr As tCompErgReg ' Output on the GUI @@ -29,13 +28,13 @@ Module sub_linear_regression anzLS1 = 0 anzLS2 = 0 anzHS = 0 - CdxAß_H1 = 0 - CdxAß_H2 = 0 - beta_H1 = 0 - beta_H2 = 0 numH1 = 0 numH2 = 0 ErgValuesReg = New Dictionary(Of tCompErgReg, List(Of Double)) + Job.CdxAß_H1 = 0 + Job.beta_H1 = 0 + Job.CdxAß_H2 = 0 + Job.beta_H2 = 0 Job.CdxAß = 0 Job.CdxA0meas = 0 Job.CdxA0 = 0 @@ -243,12 +242,12 @@ Module sub_linear_regression ' Wighted summerise for the endresults Select Case (ErgValuesComp(tCompErg.HeadID)(i)) Case 1 - CdxAß_H1 += ErgValuesReg(tCompErgReg.CdxAß_ave_singleMS)(lauf) * ErgValuesReg(tCompErgReg.NumUsed)(lauf) - beta_H1 += ErgValuesReg(tCompErgReg.beta_ave_singleMS)(lauf) * ErgValuesReg(tCompErgReg.NumUsed)(lauf) + Job.CdxAß_H1 += ErgValuesReg(tCompErgReg.CdxAß_ave_singleMS)(lauf) * ErgValuesReg(tCompErgReg.NumUsed)(lauf) + Job.beta_H1 += ErgValuesReg(tCompErgReg.beta_ave_singleMS)(lauf) * ErgValuesReg(tCompErgReg.NumUsed)(lauf) numH1 += ErgValuesReg(tCompErgReg.NumUsed)(lauf) Case 2 - CdxAß_H2 += ErgValuesReg(tCompErgReg.CdxAß_ave_singleMS)(lauf) * ErgValuesReg(tCompErgReg.NumUsed)(lauf) - beta_H2 += ErgValuesReg(tCompErgReg.beta_ave_singleMS)(lauf) * ErgValuesReg(tCompErgReg.NumUsed)(lauf) + Job.CdxAß_H2 += ErgValuesReg(tCompErgReg.CdxAß_ave_singleMS)(lauf) * ErgValuesReg(tCompErgReg.NumUsed)(lauf) + Job.beta_H2 += ErgValuesReg(tCompErgReg.beta_ave_singleMS)(lauf) * ErgValuesReg(tCompErgReg.NumUsed)(lauf) numH2 += ErgValuesReg(tCompErgReg.NumUsed)(lauf) End Select Else @@ -264,8 +263,12 @@ Module sub_linear_regression ' Calculate the Endresults If lauf <> -1 Then - Job.CdxAß = ((CdxAß_H1 / numH1) + (CdxAß_H2 / numH2)) / 2 - Job.beta = ((beta_H1 / numH1) + (beta_H2 / numH2)) / 2 + Job.CdxAß_H1 = Job.CdxAß_H1 / numH1 + Job.beta_H1 = Job.beta_H1 / numH1 + Job.CdxAß_H2 = Job.CdxAß_H2 / numH2 + Job.beta_H2 = Job.beta_H2 / numH2 + Job.CdxAß = (Job.CdxAß_H1 + Job.CdxAß_H2) / 2 + Job.beta = (Job.beta_H1 + Job.beta_H2) / 2 Job.delta_CdxA_beta = fCalcGenShp(Job.beta, vehicle) * (-1) Job.CdxA0meas = Job.CdxAß + Job.delta_CdxA_beta Job.delta_CdxA_height = (Job.CdxA0meas * GenShape.h_ref / vehicle.vehHeight) - Job.CdxA0meas @@ -274,6 +277,10 @@ Module sub_linear_regression Job.v_avg_LS = Job.v_avg_LS / (anzLS1 + anzLS2) Job.v_avg_HS = Job.v_avg_HS / (anzHS) Else + Job.CdxAß_H1 = 0 + Job.beta_H1 = 0 + Job.CdxAß_H2 = 0 + Job.beta_H2 = 0 Job.CdxAß = 0 Job.beta = 0 Job.delta_CdxA_beta = 0 diff --git a/CSE/GUI/F_Main.vb b/CSE/GUI/F_Main.vb index 4651b2f7f18102db77ca1cf9025b7dd5eab768d7..dba2ab9e080440858131ef4f8def00e8d925bfcf 100644 --- a/CSE/GUI/F_Main.vb +++ b/CSE/GUI/F_Main.vb @@ -786,7 +786,6 @@ Public Class F_Main TB_delta_v_avg_min_HS.Enabled = SetState ' Evaluation box CB_accel_correction.Enabled = SetState - CB_gradient_correction.Enabled = SetState ' Altitude TB_dist_gridpoints_max.Enabled = SetState TB_dist_grid_ms_max.Enabled = SetState diff --git a/CSE/IO/cCriteria.vb b/CSE/IO/cCriteria.vb index 5ab5eb1ce56bdb407bc44f8e010215c0edf83c36..8ee94f2686789154a082d0570fd942bf7e33bb63 100644 --- a/CSE/IO/cCriteria.vb +++ b/CSE/IO/cCriteria.vb @@ -30,7 +30,7 @@ Public Class cCriteria g = New JObject() b.Processing = g g.accel_correction = True - g.gradient_correction = True + g.gradient_correction = False g.hz_out = 1 g.rr_corr_factor = 1.143 g.acc_corr_avg = 1 @@ -322,7 +322,7 @@ Public Class cCriteria ' Processing params Public rr_corr_factor As Double Public accel_correction As Boolean '= True - Public gradient_correction As Boolean '= True + Public gradient_correction As Boolean '= False Public hz_out As Integer '= 1 Public acc_corr_avg As Single Public delta_CdxA_anemo As Single diff --git a/CSE/IO/cJob.vb b/CSE/IO/cJob.vb index 06f014bba8088e08a0425f8e2187226916020719..2e4ca7ed81bd831d64aca55f70bf3a0773f13ffc 100644 --- a/CSE/IO/cJob.vb +++ b/CSE/IO/cJob.vb @@ -44,6 +44,10 @@ Public Class cJob b.t_amb_LS1 = 0 b.v_avg_LS = 0 b.v_avg_HS = 0 + b.CdxAß_H1 = 0 + b.beta_H1 = 0 + b.CdxAß_H2 = 0 + b.beta_H2 = 0 b.CdxAß = 0 b.beta = 0 b.delta_CdxA_beta = 0 @@ -148,6 +152,32 @@ Public Class cJob 'default': 0, "units": "km/h", }, + + "CdxAß_H1": { + "type": "number", + "description": "Average CdxA before yaw angle correction for heading 1", + 'default': 0, + "units": "m²", + }, + "beta_H1": { + "type": "number", + "description": "Average absolute yaw angle from high speed tests for heading 1.", + 'default': 0, + "units": "m²", + }, + "CdxAß_H2": { + "type": "number", + "description": "Average CdxA before yaw angle correction for heading 2", + 'default': 0, + "units": "m²", + }, + "beta_H2": { + "type": "number", + "description": "Average absolute yaw angle from high speed tests for heading 2.", + 'default': 0, + "units": "m²", + }, + "CdxAß": { "type": "number", "description": "Average CdxA before yaw angle correction", @@ -223,6 +253,10 @@ Public Class cJob Job.t_amb_LS1 = 0 Job.v_avg_LS = 0 Job.v_avg_HS = 0 + Job.CdxAß_H1 = 0 + Job.beta_H1 = 0 + Job.CdxAß_H2 = 0 + Job.beta_H2 = 0 Job.CdxAß = 0 Job.beta = 0 Job.delta_CdxA_beta = 0 @@ -268,6 +302,10 @@ Public Class cJob Public t_amb_LS1 As Double Public v_avg_LS As Double Public v_avg_HS As Double + Public CdxAß_H1 As Double + Public beta_H1 As Double + Public CdxAß_H2 As Double + Public beta_H2 As Double Public CdxAß As Double Public beta As Double Public delta_CdxA_beta As Double @@ -287,6 +325,10 @@ Public Class cJob b.t_amb_LS1 = Math.Round(t_amb_LS1, 3) b.v_avg_LS = Math.Round(v_avg_LS, 3) b.v_avg_HS = Math.Round(v_avg_HS, 3) + b.CdxAß_H1 = Math.Round(CdxAß_H1, 5) + b.beta_H1 = Math.Round(beta_H1, 5) + b.CdxAß_H2 = Math.Round(CdxAß_H2, 5) + b.beta_H2 = Math.Round(beta_H2, 5) b.CdxAß = Math.Round(CdxAß, 5) b.beta = Math.Round(beta, 5) b.delta_CdxA_beta = Math.Round(delta_CdxA_beta, 5) diff --git a/CSE/IO/cVehicle.vb b/CSE/IO/cVehicle.vb index 996a168bde2bfcdc038dd52e724597d004a4cab7..77f6b0b4a8efb5a1873179cbe3f20b3214c00abc 100644 --- a/CSE/IO/cVehicle.vb +++ b/CSE/IO/cVehicle.vb @@ -13,8 +13,8 @@ Imports Newtonsoft.Json.Linq Imports Newtonsoft.Json.Schema Public Enum VehicleConfig - Rigid - Tractor + No + Yes End Enum Public Enum gearBoxConfig @@ -66,11 +66,11 @@ Public Class cVehicle "description": "The class the vehicle belongs to according to the legislation. The generic parameters for classes are stored in the GenShape.shp", }, - "configuration": { - "title": "Vehicle Configuration", - "enum": ["rigid", "tractor"], + "configuration with trailer": { + "title": "Vehicle Configuration with trailer", + "enum": ["no", "yes"], "required": true, - "title": "Vehicle is rigid or track'n tractor?", + "title": "Vehicle contains trailer?", }, "GVMMax": { "title": "Maximum gross vehicle mass [kg]", @@ -188,12 +188,12 @@ The generic parameters for classes are stored in the GenShape.shp", End Property Public Property configuration As VehicleConfig Get - Dim value As String = Me.Body("configuration") + Dim value As String = Me.Body("configuration with trailer") Return [Enum].Parse(GetType(VehicleConfig), value, True) End Get Set(ByVal value As VehicleConfig) - Me.Body("configuration") = value.ToString() + Me.Body("configuration with trailer") = value.ToString() End Set End Property Public Property GVWMax As Double @@ -272,9 +272,9 @@ The generic parameters for classes are stored in the GenShape.shp", End Property #End Region ' "json props" - Public ReadOnly Property IsRigid As Boolean + Public ReadOnly Property IsWithTrailer As Boolean Get - Return Me.configuration = VehicleConfig.Rigid + Return Me.configuration = VehicleConfig.No End Get End Property diff --git a/CSE/IO/output.vb b/CSE/IO/output.vb index db70aea67c8321ac3e263afa4b56d596d64d65a8..fd0219cec6078ea60c795e15d0fe42e43022909f 100644 --- a/CSE/IO/output.vb +++ b/CSE/IO/output.vb @@ -238,6 +238,10 @@ Module output FileOut.WriteLine("# t_amb_LS1:" & Prefs.listSep & Job.t_amb_LS1 & Prefs.listSep & "[°] average ambient temperature during first low speed test") FileOut.WriteLine("# v_avg_LS:" & Prefs.listSep & Job.v_avg_LS & Prefs.listSep & "[km/h] average vehicle speed used datasets low speed tests") FileOut.WriteLine("# v_avg_HS:" & Prefs.listSep & Job.v_avg_HS & Prefs.listSep & "[km/h] average vehicle speed used datasets high speed test") + FileOut.WriteLine("# CdxA(ß)_H1:" & Prefs.listSep & Job.CdxAß_H1 & Prefs.listSep & "[m²] average CdxA before yaw angle correction for heading 1") + FileOut.WriteLine("# beta_H1:" & Prefs.listSep & Job.beta_H1 & Prefs.listSep & "[°] average absolute yaw angle from high speed tests for heading 1") + FileOut.WriteLine("# CdxA(ß)_H2:" & Prefs.listSep & Job.CdxAß_H2 & Prefs.listSep & "[m²] average CdxA before yaw angle correction for heading 2") + FileOut.WriteLine("# beta_H2:" & Prefs.listSep & Job.beta_H2 & Prefs.listSep & "[°] average absolute yaw angle from high speed tests for heading 2") FileOut.WriteLine("# CdxA(ß):" & Prefs.listSep & Job.CdxAß & Prefs.listSep & "[m²] average CdxA before yaw angle correction") FileOut.WriteLine("# beta:" & Prefs.listSep & Job.beta & Prefs.listSep & "[°] average absolute yaw angle from high speed tests") FileOut.WriteLine("# delta_CdxA_beta:" & Prefs.listSep & Job.delta_CdxA_beta & Prefs.listSep & "[m²] correction of CdxA for yaw angle") diff --git a/DemoData/VECTO-Air Drag_InputData_V2.0.6_DemoData.xlsm b/DemoData/VECTO-Air Drag_InputData_V2.0.7_DemoData.xlsm similarity index 51% rename from DemoData/VECTO-Air Drag_InputData_V2.0.6_DemoData.xlsm rename to DemoData/VECTO-Air Drag_InputData_V2.0.7_DemoData.xlsm index d51f4dd18168d514a694169b200fe1b7882ffb50..be61260aa18bc55c62ea50f78fe3248eb2635d54 100644 Binary files a/DemoData/VECTO-Air Drag_InputData_V2.0.6_DemoData.xlsm and b/DemoData/VECTO-Air Drag_InputData_V2.0.7_DemoData.xlsm differ diff --git a/DemoData/VehicleDemo.csveh.json b/DemoData/VehicleDemo.csveh.json index b96ac09c20ba8abf4698bdd5492d99059bba6599..903794ee95bcb8888ecaa8e7a1ffb8a3d461ee25 100644 --- a/DemoData/VehicleDemo.csveh.json +++ b/DemoData/VehicleDemo.csveh.json @@ -2,22 +2,22 @@ "Header": { "Title": "VECTO-Air Drag VEHICLE", "FileVersion": "1.0.0", - "AppVersion": "2.0.3-beta6", - "ModifiedDate": "2016.10.20 08:32:42", + "AppVersion": "2.0.7-beta7", + "ModifiedDate": "2016.10.25 13:19:11", "Strict": true, "BodySchema": null, }, "Body": { - "classCode": 4, - "configuration": "rigid", - "GVMMax": 16000, - "vVehMax": 85, - "vehHeight": 3.5, - "anemometerHeight": 4.55, - "testMass": 25000, - "gearRatio_low": "2.500", - "gearRatio_high": "1.000", - "axleRatio": "3.600", - "gearBox_type": "MT_AMT", + "classCode": 4, + "configuration with trailer": "no", + "GVMMax": 16000, + "vVehMax": 85, + "vehHeight": 3.5, + "anemometerHeight": 4.55, + "testMass": 25000, + "gearRatio_low": "2.500", + "gearRatio_high": "1.000", + "axleRatio": "3.600", + "gearBox_type": "MT_AMT", } } diff --git a/Docs/VECTO-Air Drag_ReleaseNotes_2.0.7-beta7.pdf b/Docs/VECTO-Air Drag_ReleaseNotes_2.0.7-beta7.pdf index 4c4883cf9a7d5c5b127f43fe10ea9486be35f3ea..f09dd2606b63f03f63c0942ed0fa3dd7ba9e47a4 100644 Binary files a/Docs/VECTO-Air Drag_ReleaseNotes_2.0.7-beta7.pdf and b/Docs/VECTO-Air Drag_ReleaseNotes_2.0.7-beta7.pdf differ diff --git a/Docs/VECTO_Air Drag-User Manual_2.0.7-beta7.pdf b/Docs/VECTO_Air Drag-User Manual_2.0.7-beta7.pdf index 0feab89723283aa4824207acc9c0114d84bf416e..e226867f393b43b574136a29c93f23e0c8d42d80 100644 Binary files a/Docs/VECTO_Air Drag-User Manual_2.0.7-beta7.pdf and b/Docs/VECTO_Air Drag-User Manual_2.0.7-beta7.pdf differ