From fb44087ccc8c4eeba80230cbcb366e0b08f71088 Mon Sep 17 00:00:00 2001 From: DIPPOLD Martin <Dippold@ivt.tugraz.at> Date: Tue, 24 Jun 2014 16:33:09 +0200 Subject: [PATCH] Add Results into Jobfile --- CSE/Calculation/Signal_identification.vb | 2 +- CSE/Calculation/main_calculation_call.vb | 48 +-- CSE/Calculation/sub_linear_regression.vb | 34 +- CSE/GUI/F_Main.vb | 6 +- CSE/IO/cJob.vb | 118 +++++- CSE/IO/cResults.vb | 34 +- CSE/IO/cVehicle.vb | 2 +- CSE/IO/output.vb | 34 +- CSE/declaration_public.vb | 14 - DemoData/EvaluationDemo.csjob.json | 433 ++++++++++++++++++++++- 10 files changed, 612 insertions(+), 113 deletions(-) diff --git a/CSE/Calculation/Signal_identification.vb b/CSE/Calculation/Signal_identification.vb index c6c4a9e..08c70e9 100644 --- a/CSE/Calculation/Signal_identification.vb +++ b/CSE/Calculation/Signal_identification.vb @@ -540,7 +540,7 @@ Module Signal_identification ' Calculate the corrected vehicle speed For i = 0 To CalcData(tCompCali.SecID).Count - 1 - CalcData(tCompCali.v_veh_c)(i) = (InputData(tComp.v_veh_CAN)(i) * fv_veh) + CalcData(tCompCali.v_veh_c)(i) = (InputData(tComp.v_veh_CAN)(i) * Job.fv_veh) If i = 0 Then CalcData(tCompCali.dist)(i) = (CalcData(tCompCali.v_veh_c)(i) / 3.6) * (1 / HzIn) Else diff --git a/CSE/Calculation/main_calculation_call.vb b/CSE/Calculation/main_calculation_call.vb index 172eca2..b43acc9 100644 --- a/CSE/Calculation/main_calculation_call.vb +++ b/CSE/Calculation/main_calculation_call.vb @@ -137,8 +137,8 @@ ' Check if all is valid For i = 0 To ErgValuesReg(tCompErgReg.SecID).Count - 1 - If ErgValuesReg(tCompErgReg.valid_t_tire)(i) = 0 Then valid_t_tire = False - If ErgValuesReg(tCompErgReg.RRC_valid)(i) = 0 Then valid_RRC = False + If ErgValuesReg(tCompErgReg.valid_t_tire)(i) = 0 Then Job.valid_t_tire = False + If ErgValuesReg(tCompErgReg.RRC_valid)(i) = 0 Then Job.valid_RRC = False Next i ' Output of the final data @@ -146,9 +146,9 @@ ' Write the results on the GUI logme(7, False, "Results from the calculation") - logme(6, False, "average absolute beta HS test: " & Math.Round(beta, 4)) - logme(6, False, "delta CdxA correction: " & Math.Round(delta_CdxA, 4)) - logme(6, False, "CdxA(0): " & Math.Round(CdxA0, 4)) + logme(6, False, "average absolute beta HS test: " & Math.Round(Job.beta, 4)) + logme(6, False, "delta CdxA correction: " & Math.Round(Job.delta_CdxA, 4)) + logme(6, False, "CdxA(0): " & Math.Round(Job.CdxA0, 4)) ' Clear the dictionaries ErgValuesComp = Nothing @@ -165,10 +165,10 @@ Dim Change As Boolean ' Initialisation - fv_veh = 0 - fv_veh_opt2 = 0 - fv_pe = 0 - beta_ame = 0 + Job.fv_veh = 0 + Job.fv_veh_opt2 = 0 + Job.fv_pe = 0 + Job.beta_ame = 0 Change = False run = 0 @@ -177,10 +177,10 @@ Do While Change ' Initialise Parameter - fv_veh = 0 - fv_veh_opt2 = 0 - fv_pe = 0 - beta_ame = 0 + Job.fv_veh = 0 + Job.fv_veh_opt2 = 0 + Job.fv_pe = 0 + Job.beta_ame = 0 run += 1 ' Calculate fv_veh @@ -297,20 +297,20 @@ For i = 0 To UBound(CalcX) If VSec(i) = 1 Then If MSCX.tUse Then - fv_veh += ave_vz(i) / ave_vn(i) - fv_veh_opt2 = 0 + Job.fv_veh += ave_vz(i) / ave_vn(i) + Job.fv_veh_opt2 = 0 num += 1 Else - fv_veh += ave_vz2(i) / ave_vn(i) - fv_veh_opt2 += ave_vz(i) / ave_vn(i) + Job.fv_veh += ave_vz2(i) / ave_vn(i) + Job.fv_veh_opt2 += ave_vz(i) / ave_vn(i) num += 1 End If End If Next i ' Calculate the average over all factors - fv_veh = fv_veh / num - fv_veh_opt2 = fv_veh_opt2 / num + Job.fv_veh = Job.fv_veh / num + Job.fv_veh_opt2 = Job.fv_veh_opt2 / num End Sub Function ffvpeBeta() As Boolean @@ -393,11 +393,11 @@ num += 1 End If Next j - fv_pe += ave_vc_ges / v_air_ges + Job.fv_pe += ave_vc_ges / v_air_ges Next i - fv_pe = fv_pe / (UBound(CalcX) + 1) - beta_ame += beta_ges / num + Job.fv_pe = Job.fv_pe / (UBound(CalcX) + 1) + Job.beta_ame += beta_ges / num Return True End Function @@ -414,8 +414,8 @@ ' Calculate the values For i = 0 To CalcData(tCompCali.lati_UTM).Count - 1 - CalcData(tCompCali.vair_uf)(i) = (CalcData(tCompCali.vair_ic)(i) * fv_pe) - CalcData(tCompCali.beta_uf)(i) = ((CalcData(tCompCali.beta_ic)(i) - beta_ame) * fa_pe) + CalcData(tCompCali.vair_uf)(i) = (CalcData(tCompCali.vair_ic)(i) * Job.fv_pe) + CalcData(tCompCali.beta_uf)(i) = ((CalcData(tCompCali.beta_ic)(i) - Job.beta_ame) * Job.fa_pe) vwind_x_ha = CalcData(tCompCali.vair_uf)(i) * Math.Cos(CalcData(tCompCali.beta_uf)(i) * Math.PI / 180) - CalcData(tCompCali.v_veh_c)(i) / 3.6 vwind_y_ha = CalcData(tCompCali.vair_uf)(i) * Math.Sin(CalcData(tCompCali.beta_uf)(i) * Math.PI / 180) CalcData(tCompCali.vwind_ha)(i) = (Math.Sqrt(vwind_x_ha ^ 2 + vwind_y_ha ^ 2)) diff --git a/CSE/Calculation/sub_linear_regression.vb b/CSE/Calculation/sub_linear_regression.vb index fc09796..a852e4b 100644 --- a/CSE/Calculation/sub_linear_regression.vb +++ b/CSE/Calculation/sub_linear_regression.vb @@ -20,14 +20,14 @@ t_amb_num = 0 FirstInGes = True ErgValuesReg = New Dictionary(Of tCompErgReg, List(Of Double)) - CdxA = 0 - CdxA0 = 0 - CdxA0_opt2 = 0 - delta_CdxA = 0 - beta = 0 - valid_t_amb = True - valid_RRC = True - valid_t_tire = True + Job.CdxA = 0 + Job.CdxA0 = 0 + Job.CdxA0_opt2 = 0 + Job.delta_CdxA = 0 + Job.beta = 0 + Job.valid_t_amb = True + Job.valid_RRC = True + Job.valid_t_tire = True ' Generate the result dictionary variables For Each EnumStr In System.Enum.GetValues(GetType(tCompErgReg)) @@ -294,9 +294,9 @@ End If ' Summerise for the endresults - CdxA += ErgValuesReg(tCompErgReg.CdxA)(lauf) - beta += ErgValuesReg(tCompErgReg.beta_abs_HS)(lauf) - CdxA0_opt2 += ErgValuesReg(tCompErgReg.CdxA0)(lauf) + Job.CdxA += ErgValuesReg(tCompErgReg.CdxA)(lauf) + Job.beta += ErgValuesReg(tCompErgReg.beta_abs_HS)(lauf) + Job.CdxA0_opt2 += ErgValuesReg(tCompErgReg.CdxA0)(lauf) Else ' Clear the data in the result dictionary ErgValuesReg(tCompErgReg.SecID).RemoveAt(lauf) @@ -313,17 +313,17 @@ Next i ' Calculate the Endresults - CdxA = CdxA / (lauf + 1) - beta = beta / (lauf + 1) - delta_CdxA = fCalcGenShp(beta, vehicle) - CdxA0_opt2 = CdxA0_opt2 / (lauf + 1) - CdxA0 = CdxA - delta_CdxA + Job.CdxA = Job.CdxA / (lauf + 1) + Job.beta = Job.beta / (lauf + 1) + Job.delta_CdxA = fCalcGenShp(Job.beta, vehicle) + Job.CdxA0_opt2 = Job.CdxA0_opt2 / (lauf + 1) + Job.CdxA0 = Job.CdxA - Job.delta_CdxA ' Test validation t_amb_f = t_amb_f / t_amb_num If (t_amb_f - t_amb_min_f) > Crt.t_amb_var Or (t_amb_max_f - t_amb_f) > Crt.t_amb_var Then logme(9, False, "Invalid test - variation of ambient temperature (at the vehicle) outside boundaries") - valid_t_amb = False + Job.valid_t_amb = False End If If t_amb_max_f > Crt.t_amb_max Then diff --git a/CSE/GUI/F_Main.vb b/CSE/GUI/F_Main.vb index 931bcfb..3397092 100644 --- a/CSE/GUI/F_Main.vb +++ b/CSE/GUI/F_Main.vb @@ -173,9 +173,9 @@ Public Class F_Main CalibrationState = False EvaluationState = False - Me.TextBoxRVeh.Text = Math.Round(fv_veh, 3).ToString - Me.TextBoxRAirPos.Text = Math.Round(fv_pe, 3).ToString - Me.TextBoxRBetaMis.Text = Math.Round(beta_ame, 2).ToString + Me.TextBoxRVeh.Text = Math.Round(Job.fv_veh, 3).ToString + Me.TextBoxRAirPos.Text = Math.Round(Job.fv_pe, 3).ToString + Me.TextBoxRBetaMis.Text = Math.Round(Job.beta_ame, 2).ToString End Sub diff --git a/CSE/IO/cJob.vb b/CSE/IO/cJob.vb index c051974..c3128cc 100644 --- a/CSE/IO/cJob.vb +++ b/CSE/IO/cJob.vb @@ -26,7 +26,19 @@ Public Class cJob b.low2_fpath = "" b.Criteria = New cCriteria().Body - b.Results = New cResults().Body + 'b.Results = New cResults().Body + b.fv_veh = 0 + b.fa_pe = 1 + b.fv_pe = 0 + b.beta_ame = 0 + b.CdxA = 0 + b.beta = 0 + b.delta_CdxA = 0 + b.CdxA0 = 0 + b.CdxA0_opt2 = 0 + b.valid_t_tire = True + b.valid_t_amb = True + b.valid_RRC = True Return b End Function @@ -86,8 +98,73 @@ Public Class cJob "description": "File-path to a measurement-file (*.csdat)", }, "Criteria": <%= cCriteria.JSchemaStr(isStrictBody) %>, - "Results": <%= cResults.JSchemaStr(isStrictBody) %>, - } + + "properties": { + "Calibration": { + "type": "object", + "required": true, + "additionalProperties": <%= allowAdditionalProps_str %>, + "properties": { + "fv_veh": {"type": "number", "required": true, + "description": "Calibration factor for vehicle speed.", + }, + "fv_pe": {"type": "number", "required": true, + "description": "Calibration factor for air speed (position error).", + }, + "fa_pe": {"type": "number", "required": true, + "description": "Position error correction factor for measured air inflow angle (beta).", + }, + "beta_ame": {"type": "number", "required": true, + "description": "Calibration factor for beta (misalignment).", + "units": "°", + }, + } + }, + "Evaluation": { + "type": "object", + "required": true, + "additionalProperties": <%= allowAdditionalProps_str %>, + "properties": { + "CdxA": {"type": "number", "required": true, + "description": "Average CdxA before yaw angle correction", + "units": "m^2", + }, + "beta": {"type": "number", "required": true, + "description": "Average absolute yaw angle from high speed tests.", + "units": "m^2", + }, + "delta_CdxA": {"type": "number", "required": true, + "description": "Correction of CdxA for yaw angle.", + "units": "m^2", + }, + "CdxA0": {"type": "number", "required": true, + "description": "Correction of CdxA for zero yaw angle.", + "units": "m^2", + }, + "CdxA0_opt2": {"type": "number", "required": true, + "description": "Average CdxA for zero yaw angle (yaw angle correction performed before averaging of measurement sections).", + "units": "m^2", + }, + } + }, + "Validity": { + "type": "object", + "required": true, + "additionalProperties": <%= allowAdditionalProps_str %>, + "properties": { + "valid_t_tire": {"type": "boolean", "required": true, + "description": "Invalid if the maximum ambient temperature exceeded.", + }, + "valid_t_amb": {"type": "boolean", "required": true, + "description": "Invalid if the ambient temperature fallen below minimum.", + }, + "valid_RRC": {"type": "boolean", "required": true, + "description": "Invalid if the ambient temperature higher than allowed.", + }, + } + }, + }, + } }</json>.Value '"": { ' "type": "string", @@ -143,6 +220,20 @@ Public Class cJob Public beta_f As Double Public beta_d As Double + Public fv_veh As Double = 0 + Public fv_veh_opt2 As Double = 0 + Public fa_pe As Double = 1 + Public fv_pe As Double = 0 + Public beta_ame As Double = 0 + Public CdxA As Double = 0 + Public beta As Double = 0 + Public delta_CdxA As Double = 0 + Public CdxA0 As Double = 0 + Public CdxA0_opt2 As Double = 0 + Public valid_t_tire As Boolean = True + Public valid_t_amb As Boolean = True + Public valid_RRC As Boolean = True + Protected Overrides Sub OnContentUpdated() Dim anem = PropOrDefault(".Anemometer") Me.v_air_f = anem("v_air_f") @@ -160,15 +251,18 @@ Public Class cJob b.beta_f = Me.beta_f b.beta_d = Me.beta_d - 'b.fv_veh = fv_veh - 'b.fa_pe = fa_pe - 'b.fv_pe = fv_pe - 'b.beta_ame = beta_ame - 'b.CdxA = CdxA - 'b.beta = beta - 'b.delta_CdxA = delta_CdxA - 'b.CdxA0 = CdxA0 - 'b.CdxA0_opt2 = CdxA0_opt2 + b.fv_veh = Math.Round(fv_veh, 3) + b.fa_pe = Math.Round(fa_pe, 3) + b.fv_pe = Math.Round(fv_pe, 3) + b.beta_ame = Math.Round(beta_ame, 2) + b.CdxA = Math.Round(CdxA, 5) + b.beta = Math.Round(beta, 5) + b.delta_CdxA = Math.Round(delta_CdxA, 5) + b.CdxA0 = Math.Round(CdxA0, 5) + b.CdxA0_opt2 = Math.Round(CdxA0_opt2, 5) + b.valid_t_tire = valid_t_tire + b.valid_t_amb = valid_t_amb + b.valid_RRC = valid_RRC End Sub diff --git a/CSE/IO/cResults.vb b/CSE/IO/cResults.vb index 84699f3..30f7b6b 100644 --- a/CSE/IO/cResults.vb +++ b/CSE/IO/cResults.vb @@ -162,24 +162,34 @@ Public Class cResults b = Me.Body g = b("Calibration") - g.fv_veh = fv_veh - g.fa_pe = fa_pe - g.fv_pe = fv_pe - g.beta_ame = beta_ame + g.fv_veh = Job.fv_veh + g.fa_pe = Job.fa_pe + g.fv_pe = Job.fv_pe + g.beta_ame = Job.beta_ame g = b("Evaluation") - g.CdxA = CdxA - g.beta = beta - g.delta_CdxA = delta_CdxA - g.CdxA0 = CdxA0 - g.CdxA0_opt2 = CdxA0_opt2 + g.CdxA = Job.CdxA + g.beta = Job.beta + g.delta_CdxA = Job.delta_CdxA + g.CdxA0 = Job.CdxA0 + g.CdxA0_opt2 = Job.CdxA0_opt2 g = b("Validity") - g.valid_t_tire = valid_t_tire - g.valid_t_amb = valid_t_amb - g.valid_RRC = valid_RRC + g.valid_t_tire = Job.valid_t_tire + g.valid_t_amb = Job.valid_t_amb + g.valid_RRC = Job.valid_RRC End Sub + ''' <summary>Do not invoke this method in vain...</summary> + Property Results As cResults + Get + Return New cResults(Me.Body("Results"), True) + End Get + Set(ByVal value As cResults) + Me.Body("Results") = value.Body + End Set + End Property + #End Region ' json props End Class diff --git a/CSE/IO/cVehicle.vb b/CSE/IO/cVehicle.vb index 4692b02..5118114 100644 --- a/CSE/IO/cVehicle.vb +++ b/CSE/IO/cVehicle.vb @@ -139,7 +139,7 @@ The generic parameters for classes are stored in the GenShape.shp", '' Check if vehicle class with the given configuration class is available For i = 0 To GenShape.veh_class.Count - 1 If GenShape.veh_class(i) = Me.classCode AndAlso CBool(GenShape.veh_conf(i)) = Me.IsRigid Then - fa_pe = GenShape.fa_pe(i) + Job.fa_pe = GenShape.fa_pe(i) Return End If Next i diff --git a/CSE/IO/output.vb b/CSE/IO/output.vb index b9d388c..55b0d26 100644 --- a/CSE/IO/output.vb +++ b/CSE/IO/output.vb @@ -127,10 +127,10 @@ End If FileOut.WriteLine("#") FileOut.WriteLine("# Results") - FileOut.WriteLine("# fv_veh:", fv_veh) - FileOut.WriteLine("# fv_veh_opt2:", fv_veh_opt2) - FileOut.WriteLine("# fv_pe:", fv_pe) - FileOut.WriteLine("# beta_ame:", beta_ame) + FileOut.WriteLine("# fv_veh:", Job.fv_veh) + FileOut.WriteLine("# fv_veh_opt2:", Job.fv_veh_opt2) + FileOut.WriteLine("# fv_pe:", Job.fv_pe) + FileOut.WriteLine("# beta_ame:", Job.beta_ame) FileOut.WriteLine("#") ' Write the head and units @@ -217,29 +217,29 @@ FileOut.WriteLine("# Datafile LS2: ", coasting_fpaths(2)) FileOut.WriteLine("#") FileOut.WriteLine("# Results") - FileOut.WriteLine("# fv_veh:", fv_veh, "[-] calibration factor for vehicle speed") - FileOut.WriteLine("# fv_veh_opt2:", fv_veh_opt2, "[-] calibration factor for vehicle speed (option2, only if (D)GPS option is used)") - FileOut.WriteLine("# fv_pe:", fv_pe, "[-] calibration factor for air speed (position error)") - FileOut.WriteLine("# fa_pe:", fa_pe, "[-] position error correction factor for measured air inflow angle (beta)") - FileOut.WriteLine("# beta_ame:", beta_ame, "[°] calibration factor for beta (misalignment)") - FileOut.WriteLine("# CdxA:", CdxA, "[m²] average CdxA before yaw angle correction") - FileOut.WriteLine("# beta:", beta, "[°] average absolute yaw angle from high speed tests") - FileOut.WriteLine("# delta_CdxA:", delta_CdxA, "[m²] correction of CdxA for yaw angle") - FileOut.WriteLine("# CdxA(0):", CdxA0, "[m²] average CdxA for zero yaw angle") - FileOut.WriteLine("# CdxA(0)_opt2:", CdxA0_opt2, "[m²] average CdxA for zero yaw angle (yaw angle correction performed before averaging of measurement sections)") + FileOut.WriteLine("# fv_veh:", Job.fv_veh, "[-] calibration factor for vehicle speed") + FileOut.WriteLine("# fv_veh_opt2:", Job.fv_veh_opt2, "[-] calibration factor for vehicle speed (option2, only if (D)GPS option is used)") + FileOut.WriteLine("# fv_pe:", Job.fv_pe, "[-] calibration factor for air speed (position error)") + FileOut.WriteLine("# fa_pe:", Job.fa_pe, "[-] position error correction factor for measured air inflow angle (beta)") + FileOut.WriteLine("# beta_ame:", Job.beta_ame, "[°] calibration factor for beta (misalignment)") + FileOut.WriteLine("# CdxA:", Job.CdxA, "[m²] average CdxA before yaw angle correction") + FileOut.WriteLine("# beta:", Job.beta, "[°] average absolute yaw angle from high speed tests") + FileOut.WriteLine("# delta_CdxA:", Job.delta_CdxA, "[m²] correction of CdxA for yaw angle") + FileOut.WriteLine("# CdxA(0):", Job.CdxA0, "[m²] average CdxA for zero yaw angle") + FileOut.WriteLine("# CdxA(0)_opt2:", Job.CdxA0_opt2, "[m²] average CdxA for zero yaw angle (yaw angle correction performed before averaging of measurement sections)") FileOut.WriteLine("#") FileOut.WriteLine("# Validity criteria:") - If valid_t_tire Then + If Job.valid_t_tire Then FileOut.WriteLine("# Tire temp:", "Ok") Else FileOut.WriteLine("# Tire temp:", "Invalid test - maximum variation of tyre temperature exceeded") End If - If valid_RRC Then + If Job.valid_RRC Then FileOut.WriteLine("# RRC:", "Ok") Else FileOut.WriteLine("# RRC:", "Invalid test - maximum deviation of RRCs between low speed tests exceeded") End If - If valid_t_amb Then + If Job.valid_t_amb Then FileOut.WriteLine("# Ambient temp:", "Ok") Else FileOut.WriteLine("# Ambient temp:", "Invalid test - variation of ambient temperature (at the vehicle) outside boundaries") diff --git a/CSE/declaration_public.vb b/CSE/declaration_public.vb index c406bf3..f24e89e 100644 --- a/CSE/declaration_public.vb +++ b/CSE/declaration_public.vb @@ -14,7 +14,6 @@ Public Prefs As cPreferences Public Job As cJob ' The values for the 'Main' tab (and Criteria) Public Crt As cCriteria ' The values for the 'Options' tab - 'Public Res As cResults ' The values of the results Public Sub installJob(ByVal newJob As cJob) Job = newJob Crt = newJob.Criteria @@ -96,19 +95,6 @@ Public ErgEntryListReg As New List(Of tCompErgReg) ' Array with the output sequenz of the result from the regression calculation ' Result values - Public fv_veh As Double = 0 - Public fv_veh_opt2 As Double = 0 - Public fa_pe As Double = 1 - Public fv_pe As Double = 0 - Public beta_ame As Double = 0 - Public CdxA As Double = 0 - Public beta As Double = 0 - Public delta_CdxA As Double = 0 - Public CdxA0 As Double = 0 - Public CdxA0_opt2 As Double = 0 - Public valid_t_tire As Boolean = True - Public valid_t_amb As Boolean = True - Public valid_RRC As Boolean = True Public GenShape As New cGenShp ' ***************************************************************** diff --git a/DemoData/EvaluationDemo.csjob.json b/DemoData/EvaluationDemo.csjob.json index 7e4feea..ff5898a 100644 --- a/DemoData/EvaluationDemo.csjob.json +++ b/DemoData/EvaluationDemo.csjob.json @@ -2,21 +2,418 @@ "Header": { "Title": "vecto-cse JOB", "FileVersion": "1.0.0", - "AppVersion": "2.0.1-pre2", - "ModifiedDate": "2014.06.10 08:25:44 +02:00", + "AppVersion": "2.0.1-pre3", + "ModifiedDate": "2014.06.24 16:20:19 +02:00", "CreatedBy": "VKMTHD\\martindippold@Dippold(lic: 88070b7c-1b69-4d65-a112-10c57f86f5ad)", - "StrictBody": false, - "BodySchema": null + "StrictBody": null, + "BodySchema": { + "title": "Schema for vecto-cse VEHICLE", + "type": "object", + "additionalProperties": true, + "required": true, + "properties": { + "vehicle_fpath": { + "type": [ + "null", + "string" + ], + "description": "File-path to Vehicle file (*.csveh)" + }, + "Anemometer": { + "type": "object", + "description": "The Anemometer calibration factors (floats).", + "default": { + "v_air_f": 1, + "v_air_d": 0, + "beta_f": 1, + "beta_d": 0 + } + }, + "ambient_fpath": { + "type": [ + "null", + "string" + ], + "description": "File-path to the Ambient(Weather) file (*.csamb)" + }, + "calib_track_fpath": { + "type": [ + "null", + "string" + ], + "description": "File-path to Track-sections (*.csmsc)." + }, + "calib_run_fpath": { + "type": [ + "null", + "string" + ], + "description": "File-path to a measurement-file (*.csdat)" + }, + "coast_track_fpath": { + "type": [ + "null", + "string" + ], + "description": "File-path to Track-sections (*.csmsc)." + }, + "low1_fpath": { + "type": [ + "null", + "string" + ], + "description": "File-path to a measurement-file (*.csdat)" + }, + "high_fpath": { + "type": [ + "null", + "string" + ], + "description": "File-path to a measurement-file (*.csdat)" + }, + "low2_fpath": { + "type": [ + "null", + "string" + ], + "description": "File-path to a measurement-file (*.csdat)" + }, + "Criteria": { + "title": "Schema for vecto-cse CRITERIA", + "type": "object", + "additionalProperties": true, + "required": true, + "properties": { + "Processing": { + "type": "object", + "required": true, + "additionalProperties": true, + "properties": { + "rho_air_ref": { + "type": "number", + "required": true, + "description": "Reference air density.", + "units": "kg/m^3" + }, + "accel_correction": { + "type": "boolean", + "required": true, + "description": "When True, applies acceleration correction." + }, + "gradient_correction": { + "type": "boolean", + "required": true, + "description": "When True, applies gradient correction." + }, + "hz_out": { + "type": "integer", + "required": true, + "description": "The sampling-rate of the result files.", + "units": "Hz" + }, + "rr_corr_factor": { + "type": "number", + "required": true, + "description": "Rolling resistance correction factor" + }, + "acc_corr_avg": { + "type": "number", + "required": true, + "description": "Averaging of vehicle speed for correction of acceleration forces.", + "units": "s" + }, + "dist_float": { + "type": "number", + "required": true, + "description": "Distance used for calculation of floatinig average signal used for stability criteria in low speeds.", + "units": "m" + } + } + }, + "Validation": { + "type": "object", + "required": true, + "additionalProperties": true, + "properties": { + "trigger_delta_x_max": { + "type": "number", + "required": true, + "description": "+/- size of the control area around a MS start/end point where a trigger signal is valid (driving direction).", + "units": "m" + }, + "trigger_delta_y_max": { + "type": "number", + "required": true, + "description": "+/- size of the control area around a MS start/end point where a trigger signal is valid (perpendicular to driving direction)", + "units": "m" + }, + "delta_head_max": { + "type": "number", + "required": true, + "description": "+/- maximum deviation from heading as read from the csdat-file to the heading from csms-file for a valid dataset.", + "units": "°" + }, + "segruns_min_CAL": { + "type": "integer", + "required": true, + "description": "Minimum number of valid datasets required for the calibration test (per combination of MS ID and DIR ID)." + }, + "segruns_min_LS": { + "type": "integer", + "required": true, + "description": "Minimum number of valid datasets required for the low speed (per combination of MS ID and DIR ID)." + }, + "segruns_min_HS": { + "type": "integer", + "required": true, + "description": "Minimum number of valid datasets required for the high speed (per combination of MS ID and DIR ID)." + }, + "segruns_min_head_MS": { + "type": "integer", + "required": true, + "description": "Minimum TOTAL number of valid datasets required for the high speed per heading." + }, + "delta_Hz_max": { + "type": "number", + "required": true, + "description": "Maximum allowed deviation of timestep-size in csdat-file from 100Hz.", + "units": "%" + }, + "delta_parallel_max": { + "type": "number", + "required": true, + "description": "Maximum heading difference for measurement section (parallelism criteria for test track layout).", + "units": "°" + }, + "v_wind_avg_max_CAL": { + "type": "number", + "required": true, + "description": "Maximum average wind speed (calibration).", + "units": "m/s" + }, + "v_wind_1s_max_CAL": { + "type": "number", + "required": true, + "description": "Maximum gust wind speed (calibration).", + "units": "m/s" + }, + "beta_avg_max_CAL": { + "type": "number", + "required": true, + "description": "Maximum average beta (calibration).", + "units": "°" + }, + "leng_crit": { + "type": "number", + "required": true, + "description": "Maximum absolute difference of distance driven with lenght of section as specified in configuration", + "units": "M" + }, + "v_wind_avg_max_LS": { + "type": "number", + "required": true, + "description": "Maximum average wind speed during (low speed).", + "units": "m/s" + }, + "v_wind_1s_max_LS": { + "type": "number", + "required": true, + "description": "Maximum gust wind speed (low speed).", + "units": "m/s" + }, + "v_veh_avg_min_LS": { + "type": "number", + "required": true, + "description": "Minimum average vehicle speed (low speed).", + "units": "km/h" + }, + "v_veh_avg_max_LS": { + "type": "number", + "required": true, + "description": "Maximum average vehicle speed (low speed).", + "units": "km/h" + }, + "v_veh_float_delta_LS": { + "type": "number", + "required": true, + "description": "+/- maximum deviation of floating average vehicle speed from average vehicle speed over entire section (low speed)", + "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)" + }, + "v_wind_avg_max_HS": { + "type": "number", + "required": true, + "description": "Maximum average wind speed (high speed).", + "units": "m/s" + }, + "v_wind_1s_max_HS": { + "type": "number", + "required": true, + "description": "Maximum gust wind speed (high speed).", + "units": "m/s" + }, + "beta_avg_max_HS": { + "type": "number", + "required": true, + "description": "Maximum average beta during (high speed).", + "units": "°" + }, + "v_veh_avg_min_HS": { + "type": "number", + "required": true, + "description": "Minimum average vehicle speed (high speed).", + "units": "km/h" + }, + "v_veh_1s_delta_HS": { + "type": "number", + "required": true, + "description": "+/- maximum deviation of 1s average vehicle speed from average vehicle speed over entire section (high speed).", + "units": "km/h" + }, + "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_t_tyre_max": { + "type": "number", + "required": true, + "description": "Maximum variation of tyre temperature between high speeds and low speeds.", + "units": "°C" + }, + "delta_rr_corr_max": { + "type": "number", + "required": true, + "description": "Maximum difference of RRC from the two low speed runs.", + "units": "kg/t" + }, + "t_amb_min": { + "type": "number", + "required": true, + "description": "Minimum ambient temperature (measured at the vehicle) during the tests (evaluated based on the used datasets only)", + "units": "°C" + }, + "t_amb_max": { + "type": "number", + "required": true, + "description": "Maximum ambient temperature (measured at the vehicle) during the tests (evaluated based on the used datasets only) .", + "units": "°C" + }, + "t_amb_var": { + "type": "number", + "required": true, + "description": "Maximum variation of ambient temperature (measured at the vehicle) during the tests (evaluated based on the used datasets only).", + "units": "°C" + }, + "t_amb_tarmac": { + "type": "number", + "required": true, + "description": "Maximum temperature below which no documentation of tarmac conditions is necessary.", + "units": "°C" + } + } + } + } + }, + "properties": { + "Calibration": { + "type": "object", + "required": true, + "additionalProperties": true, + "properties": { + "fv_veh": { + "type": "number", + "required": true, + "description": "Calibration factor for vehicle speed." + }, + "fv_pe": { + "type": "number", + "required": true, + "description": "Calibration factor for air speed (position error)." + }, + "fa_pe": { + "type": "number", + "required": true, + "description": "Position error correction factor for measured air inflow angle (beta)." + }, + "beta_ame": { + "type": "number", + "required": true, + "description": "Calibration factor for beta (misalignment).", + "units": "°" + } + } + }, + "Evaluation": { + "type": "object", + "required": true, + "additionalProperties": true, + "properties": { + "CdxA": { + "type": "number", + "required": true, + "description": "Average CdxA before yaw angle correction", + "units": "m^2" + }, + "beta": { + "type": "number", + "required": true, + "description": "Average absolute yaw angle from high speed tests.", + "units": "m^2" + }, + "delta_CdxA": { + "type": "number", + "required": true, + "description": "Correction of CdxA for yaw angle.", + "units": "m^2" + }, + "CdxA0": { + "type": "number", + "required": true, + "description": "Correction of CdxA for zero yaw angle.", + "units": "m^2" + }, + "CdxA0_opt2": { + "type": "number", + "required": true, + "description": "Average CdxA for zero yaw angle (yaw angle correction performed before averaging of measurement sections).", + "units": "m^2" + } + } + }, + "Validity": { + "type": "object", + "required": true, + "additionalProperties": true, + "properties": { + "valid_t_tire": { + "type": "boolean", + "required": true, + "description": "Invalid if the maximum ambient temperature exceeded." + }, + "valid_t_amb": { + "type": "boolean", + "required": true, + "description": "Invalid if the ambient temperature fallen below minimum." + }, + "valid_RRC": { + "type": "boolean", + "required": true, + "description": "Invalid if the ambient temperature higher than allowed." + } + } + } + } + } + } }, "Body": { "vehicle_fpath": "DemoData\\VehicleDemo.csveh.json", "ambient_fpath": "DemoData\\AmbientConditionsDemo.csamb", - "Anemometer": { - "v_air_f": "2", - "v_air_d": "0", - "beta_f": "1", - "beta_d": "0" - }, "calib_track_fpath": "DemoData\\CalibrationTrackDemo.csms", "calib_run_fpath": "DemoData\\DataDemo_CAL.csdat", "coast_track_fpath": "DemoData\\LS_HS_TrackDemo.csms", @@ -25,7 +422,7 @@ "low2_fpath": "DemoData\\DataDemo_LS2.csdat", "Criteria": { "Processing": { - "roh_air_ref": 1.1884, + "rho_air_ref": 1.1884, "accel_correction": false, "gradient_correction": false, "hz_out": 1, @@ -67,7 +464,19 @@ "t_amb_tarmac": 25 } }, - "v_air_f": 2.0, + "fv_veh": 0.0, + "fa_pe": 1.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": true, + "valid_t_amb": true, + "valid_RRC": true, + "v_air_f": 1.0, "v_air_d": 0.0, "beta_f": 1.0, "beta_d": 0.0 -- GitLab