Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 2943fade authored by Martin Dippold's avatar Martin Dippold
Browse files

* Change of the output formats

parent 4e6ae161
No related branches found
No related tags found
No related merge requests found
...@@ -32,16 +32,13 @@ ...@@ -32,16 +32,13 @@
FileOut.OpenWrite(NameOutFile, , False) FileOut.OpenWrite(NameOutFile, , False)
' Filekopf ' Filekopf
FileOut.WriteLine("Resultfile Programm " & AppName & " " & AppVers & " Comp " & AppDate) FileOut.WriteLine("# Resultfile Programm " & AppName & " " & AppVers & " Comp " & AppDate)
FileOut.WriteLine("Datafile: ", Datafile) FileOut.WriteLine("# Datafile: ", Datafile)
FileOut.WriteLine("") FileOut.WriteLine("#")
' Write the head ' Write the head and units
FileOut.WriteLine(ErgHead("InputData") + "," + ErgHead("CalcData")) FileOut.WriteLine(ErgHead("InputData") + "," + ErgHead("CalcData"))
' Write the units
FileOut.WriteLine(ErgUnits("InputData") + "," + ErgUnits("CalcData"))
' Write the data ' Write the data
For i = 0 To InputData.Item(tComp.t).Count - 1 For i = 0 To InputData.Item(tComp.t).Count - 1
For Each key In ErgEntryListI For Each key In ErgEntryListI
......
...@@ -44,16 +44,13 @@ ...@@ -44,16 +44,13 @@
FileOut.OpenWrite(NameOutFile, , False) FileOut.OpenWrite(NameOutFile, , False)
' Filekopf ' Filekopf
FileOut.WriteLine("Resultfile Programm " & AppName & " " & AppVers & " Comp " & AppDate) FileOut.WriteLine("# Resultfile Programm " & AppName & " " & AppVers & " Comp " & AppDate)
FileOut.WriteLine("Datafile: ", Datafile) FileOut.WriteLine("# Datafile: ", Datafile)
FileOut.WriteLine("") FileOut.WriteLine("#")
' Write the head ' Write the head and units
FileOut.WriteLine(ErgHead("InputData") + "," + ErgHead("InputUndefData") + "," + ErgHead("CalcData")) FileOut.WriteLine(ErgHead("InputData") + "," + ErgHead("InputUndefData") + "," + ErgHead("CalcData"))
' Write the units
FileOut.WriteLine(ErgUnits("InputData") + "," + ErgUnits("InputUndefData") + "," + ErgUnits("CalcData"))
' Write the data ' Write the data
For i = 0 To InputData.Item(tComp.t).Count - 1 For i = 0 To InputData.Item(tComp.t).Count - 1
For Each key In ErgEntryListI For Each key In ErgEntryListI
...@@ -120,28 +117,25 @@ ...@@ -120,28 +117,25 @@
FileOut.OpenWrite(NameOutFile, , False) FileOut.OpenWrite(NameOutFile, , False)
' Filekopf ' Filekopf
FileOut.WriteLine("Resultfile Programm " & AppName & " " & AppVers & " Comp " & AppDate) FileOut.WriteLine("# Resultfile Programm " & AppName & " " & AppVers & " Comp " & AppDate)
If calibration Then If calibration Then
FileOut.WriteLine("Datafile: ", Job.calib_run_fpath) FileOut.WriteLine("# Datafile: ", Job.calib_run_fpath)
Else Else
FileOut.WriteLine("Datafile LS1: ", coasting_fpaths(0)) FileOut.WriteLine("# Datafile LS1: ", coasting_fpaths(0))
FileOut.WriteLine("Datafile HS: ", coasting_fpaths(1)) FileOut.WriteLine("# Datafile HS: ", coasting_fpaths(1))
FileOut.WriteLine("Datafile LS2: ", coasting_fpaths(2)) FileOut.WriteLine("# Datafile LS2: ", coasting_fpaths(2))
End If End If
FileOut.WriteLine("") FileOut.WriteLine("#")
FileOut.WriteLine("Results") FileOut.WriteLine("# Results")
FileOut.WriteLine("fv_veh:", fv_veh) FileOut.WriteLine("# fv_veh:", fv_veh)
FileOut.WriteLine("fv_veh_opt2:", fv_veh_opt2) FileOut.WriteLine("# fv_veh_opt2:", fv_veh_opt2)
FileOut.WriteLine("fv_pe:", fv_pe) FileOut.WriteLine("# fv_pe:", fv_pe)
FileOut.WriteLine("beta_ame:", beta_ame) FileOut.WriteLine("# beta_ame:", beta_ame)
FileOut.WriteLine("") FileOut.WriteLine("#")
' Write the head ' Write the head and units
FileOut.WriteLine(ErgHead("ErgValues") + "," + ErgHead("ErgValuesUndef")) FileOut.WriteLine(ErgHead("ErgValues") + "," + ErgHead("ErgValuesUndef"))
' Write the units
FileOut.WriteLine(ErgUnits("ErgValues") + "," + ErgUnits("ErgValuesUndef"))
' Write the data ' Write the data
If calibration Then If calibration Then
For i = 0 To ErgValues.Item(tCompErg.SecID).Count - 1 For i = 0 To ErgValues.Item(tCompErg.SecID).Count - 1
...@@ -217,48 +211,45 @@ ...@@ -217,48 +211,45 @@
FileOut.OpenWrite(NameOutFile, , False) FileOut.OpenWrite(NameOutFile, , False)
' Filekopf ' Filekopf
FileOut.WriteLine("Resultfile Programm " & AppName & " " & AppVers & " Comp " & AppDate) FileOut.WriteLine("# Resultfile Programm " & AppName & " " & AppVers & " Comp " & AppDate)
FileOut.WriteLine("Datafile LS1: ", coasting_fpaths(0)) FileOut.WriteLine("# Datafile LS1: ", coasting_fpaths(0))
FileOut.WriteLine("Datafile HS: ", coasting_fpaths(1)) FileOut.WriteLine("# Datafile HS: ", coasting_fpaths(1))
FileOut.WriteLine("Datafile LS2: ", coasting_fpaths(2)) FileOut.WriteLine("# Datafile LS2: ", coasting_fpaths(2))
FileOut.WriteLine("") FileOut.WriteLine("#")
FileOut.WriteLine("Results") FileOut.WriteLine("# Results")
FileOut.WriteLine("fv_veh:", fv_veh, "[-] calibration factor for vehicle speed") 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_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("# 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("# 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("# beta_ame:", beta_ame, "[°] calibration factor for beta (misalignment)")
FileOut.WriteLine("CdxA:", CdxA, "[m²] average CdxA before yaw angle correction") 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("# 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("# 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):", 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("# CdxA(0)_opt2:", CdxA0_opt2, "[m²] average CdxA for zero yaw angle (yaw angle correction performed before averaging of measurement sections)")
FileOut.WriteLine("") FileOut.WriteLine("#")
FileOut.WriteLine("Validity criteria:") FileOut.WriteLine("# Validity criteria:")
If valid_t_tire Then If valid_t_tire Then
FileOut.WriteLine("Tire temp:", "Ok") FileOut.WriteLine("# Tire temp:", "Ok")
Else Else
FileOut.WriteLine("Tire temp:", "Invalid test - maximum variation of tyre temperature exceeded") FileOut.WriteLine("# Tire temp:", "Invalid test - maximum variation of tyre temperature exceeded")
End If End If
If valid_RRC Then If valid_RRC Then
FileOut.WriteLine("RRC:", "Ok") FileOut.WriteLine("# RRC:", "Ok")
Else Else
FileOut.WriteLine("RRC:", "Invalid test - maximum deviation of RRCs between low speed tests exceeded") FileOut.WriteLine("# RRC:", "Invalid test - maximum deviation of RRCs between low speed tests exceeded")
End If End If
If valid_t_amb Then If valid_t_amb Then
FileOut.WriteLine("Ambient temp:", "Ok") FileOut.WriteLine("# Ambient temp:", "Ok")
Else Else
FileOut.WriteLine("Ambient temp:", "Invalid test - variation of ambient temperature (at the vehicle) outside boundaries") FileOut.WriteLine("# Ambient temp:", "Invalid test - variation of ambient temperature (at the vehicle) outside boundaries")
End If End If
FileOut.WriteLine("") FileOut.WriteLine("#")
' Write the head ' Write the head and units
FileOut.WriteLine(ErgHead("ErgValuesReg")) FileOut.WriteLine(ErgHead("ErgValuesReg"))
' Write the units
FileOut.WriteLine(ErgUnits("ErgValuesReg"))
' Write the data ' Write the data
For i = 0 To ErgValuesReg.Item(tCompErgReg.SecID).Count - 1 For i = 0 To ErgValuesReg.Item(tCompErgReg.SecID).Count - 1
For Each key In ErgEntryListReg For Each key In ErgEntryListReg
...@@ -270,7 +261,6 @@ ...@@ -270,7 +261,6 @@
s.Clear() s.Clear()
first = True first = True
Next i Next i
End Using End Using
' Ausgabe bei blockierter Datei ' Ausgabe bei blockierter Datei
...@@ -529,7 +519,7 @@ ...@@ -529,7 +519,7 @@
End If End If
End Sub End Sub
' Generate the head output string ' Generate the head output string with units
Public Function ErgHead(ByVal Dic As String) As String Public Function ErgHead(ByVal Dic As String) As String
Dim s As New System.Text.StringBuilder Dim s As New System.Text.StringBuilder
Dim key As String Dim key As String
...@@ -539,85 +529,37 @@ ...@@ -539,85 +529,37 @@
If Dic = "InputData" Then If Dic = "InputData" Then
For Each key In ErgEntryListI For Each key In ErgEntryListI
If Not First Then s.Append(",") If Not First Then s.Append(",")
s.Append(ErgEntriesI(key).Head) s.Append(ErgEntriesI(key).Head + " " + ErgEntriesI(key).Unit)
First = False
Next
ElseIf Dic = "InputUndefData" Then
For Each key In ErgEntryListIU
If Not First Then s.Append(",")
s.Append(ErgEntriesIU(key).Head)
First = False
Next
ElseIf Dic = "CalcData" Then
For Each key In ErgEntryListC
If Not First Then s.Append(",")
s.Append(ErgEntriesC(key).Head)
First = False
Next
ElseIf Dic = "ErgValues" Then
For Each key In ErgEntryListR
If Not First Then s.Append(",")
s.Append(ErgEntriesR(key).Head)
First = False
Next
ElseIf Dic = "ErgValuesUndef" Then
For Each key In ErgEntryListRU
If Not First Then s.Append(",")
s.Append(ErgEntriesRU(key).Head)
First = False
Next
ElseIf Dic = "ErgValuesReg" Then
For Each key In ErgEntryListReg
If Not First Then s.Append(",")
s.Append(ErgEntriesReg(key).Head)
First = False
Next
End If
Return s.ToString
End Function
' Generate the unit output string
Public Function ErgUnits(ByVal Dic As String) As String
Dim s As New System.Text.StringBuilder
Dim First As Boolean
Dim key As String
First = True
If Dic = "InputData" Then
For Each key In ErgEntryListI
If Not First Then s.Append(",")
s.Append(ErgEntriesI(key).Unit)
First = False First = False
Next Next
ElseIf Dic = "InputUndefData" Then ElseIf Dic = "InputUndefData" Then
For Each key In ErgEntryListIU For Each key In ErgEntryListIU
If Not First Then s.Append(",") If Not First Then s.Append(",")
s.Append(ErgEntriesIU(key).Unit) s.Append(ErgEntriesIU(key).Head + " " + ErgEntriesIU(key).Unit)
First = False First = False
Next Next
ElseIf Dic = "CalcData" Then ElseIf Dic = "CalcData" Then
For Each key In ErgEntryListC For Each key In ErgEntryListC
If Not First Then s.Append(",") If Not First Then s.Append(",")
s.Append(ErgEntriesC(key).Unit) s.Append(ErgEntriesC(key).Head + " " + ErgEntriesC(key).Unit)
First = False First = False
Next Next
ElseIf Dic = "ErgValues" Then ElseIf Dic = "ErgValues" Then
For Each key In ErgEntryListR For Each key In ErgEntryListR
If Not First Then s.Append(",") If Not First Then s.Append(",")
s.Append(ErgEntriesR(key).Unit) s.Append(ErgEntriesR(key).Head + " " + ErgEntriesR(key).Unit)
First = False First = False
Next Next
ElseIf Dic = "ErgValuesUndef" Then ElseIf Dic = "ErgValuesUndef" Then
For Each key In ErgEntryListRU For Each key In ErgEntryListRU
If Not First Then s.Append(",") If Not First Then s.Append(",")
s.Append(ErgEntriesRU(key).Unit) s.Append(ErgEntriesRU(key).Head + " " + ErgEntriesRU(key).Unit)
First = False First = False
Next Next
ElseIf Dic = "ErgValuesReg" Then ElseIf Dic = "ErgValuesReg" Then
For Each key In ErgEntryListReg For Each key In ErgEntryListReg
If Not First Then s.Append(",") If Not First Then s.Append(",")
s.Append(ErgEntriesReg(key).Unit) s.Append(ErgEntriesReg(key).Head + " " + ErgEntriesReg(key).Unit)
First = False First = False
Next Next
End If End If
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment