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

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

* Bugfix for digit check by use of GPS (trigger - only 4 (6) digits are needed)

parent 5f23a943
No related branches found
No related tags found
No related merge requests found
VECTO-CSE: Changes
===================
#### 2016-11-25: v3.0.1 ####
TUG improvements:
* New version number
* Bugfix for digit check by use of GPS
#### 2016-11-16: v3.0.0 ####
TUG improvements:
* New version number
* Update of needed signals in calibration run (t_ground no longer needed as input)
* Always a 3 month lisense will be delivered with the program
* Update of needed signals in calibration run (t_ground no longer required as input)
* A license valid until 16th of March is distributed with the code.
* Update DEMOData
#### 2016-11-09: v2.0.7-beta8/9 ####
......@@ -13,7 +19,6 @@ TUG improvements:
* Correction of rolling resistance criteria
* Correction of digit test for coordinates
* Update of needed signals in calibration run (t_ground no longer needed as input)
#### 2016-10-20: v2.0.7-beta7 ####
TUG improvements:
......
......@@ -80,10 +80,10 @@ Public Module input
MSCX.longE.Add(Line(7) * 60)
End Select
If Crt.gradient_correction And Not calibration Then MSCX.AltPath.Add(Line(8))
If Line(4).Substring(Line(4).IndexOf(Prefs.decSep) + 1).Length < AnzDigit(CoordID) Then Counter += 1
If Line(5).Substring(Line(5).IndexOf(Prefs.decSep) + 1).Length < AnzDigit(CoordID) Then Counter += 1
If Line(6).Substring(Line(6).IndexOf(Prefs.decSep) + 1).Length < AnzDigit(CoordID) Then Counter += 1
If Line(7).Substring(Line(7).IndexOf(Prefs.decSep) + 1).Length < AnzDigit(CoordID) Then Counter += 1
If Line(4).Substring(Line(4).IndexOf(Prefs.decSep) + 1).Length < AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID) Then Counter += 1
If Line(5).Substring(Line(5).IndexOf(Prefs.decSep) + 1).Length < AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID) Then Counter += 1
If Line(6).Substring(Line(6).IndexOf(Prefs.decSep) + 1).Length < AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID) Then Counter += 1
If Line(7).Substring(Line(7).IndexOf(Prefs.decSep) + 1).Length < AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID) Then Counter += 1
Loop
Catch ex As Exception
' Falls kein gültiger Wert eingegeben wurde
......@@ -163,9 +163,9 @@ Public Module input
' Check coordinate digits after decimal seperator
If Counter > 0 Then
If Job.mode = 1 Then
Throw New Exception(format("The csms coordinates from file ({0}) have not enought digits after the decimal seperator (minimum digits are ({1}). Number of fails: ({1})!", MSCfile, AnzDigit(CoordID), Counter))
Throw New Exception(format("The csms coordinates from file ({0}) have not enought digits after the decimal seperator (minimum digits are ({1}). Number of fails: ({1})!", MSCfile, AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID), Counter))
Else
logme(8, False, format("The csms coordinates from file ({0}) have not enought digits after the decimal seperator (minimum digits are ({1}). Number of fails: ({1})!", MSCfile, AnzDigit(CoordID), Counter))
logme(8, False, format("The csms coordinates from file ({0}) have not enought digits after the decimal seperator (minimum digits are ({1}). Number of fails: ({1})!", MSCfile, AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID), Counter))
End If
End If
......@@ -250,8 +250,8 @@ Public Module input
End Select
Altdata(i).Altitude.Add(Line(2))
If Line(0).Substring(Line(0).IndexOf(Prefs.decSep) + 1).Length < AnzDigit(CoordID) Then CounterLat += 1
If Line(1).Substring(Line(1).IndexOf(Prefs.decSep) + 1).Length < AnzDigit(CoordID) Then CounterLong += 1
If Line(0).Substring(Line(0).IndexOf(Prefs.decSep) + 1).Length < AnzDigit(0, CoordID) Then CounterLat += 1
If Line(1).Substring(Line(1).IndexOf(Prefs.decSep) + 1).Length < AnzDigit(0, CoordID) Then CounterLong += 1
If Line(2).Substring(Line(2).IndexOf(Prefs.decSep) + 1).Length < 2 Then CounterAlt += 1
' Calculate the UTM coordinates for each point
......@@ -269,16 +269,16 @@ Public Module input
' Check coordinate digits after decimal seperator
If CounterLat > 0 Then
If Job.mode = 1 Then
Throw New Exception(format("The altitude latitude coordinates from file ({0}) have not enought digits after the decimal seperator (minimum digits are ({1}). Number of fails: ({2})!", MSCOrg.AltPath(i), AnzDigit(CoordID), CounterLat))
Throw New Exception(format("The altitude latitude coordinates from file ({0}) have not enought digits after the decimal seperator (minimum digits are ({1}). Number of fails: ({2})!", MSCOrg.AltPath(i), AnzDigit(0, CoordID), CounterLat))
Else
logme(8, False, format("The altitude latitude coordinates from file ({0}) have not enought digits after the decimal seperator (minimum digits are ({1}). Number of fails: ({2})!", MSCOrg.AltPath(i), AnzDigit(CoordID), CounterLat))
logme(8, False, format("The altitude latitude coordinates from file ({0}) have not enought digits after the decimal seperator (minimum digits are ({1}). Number of fails: ({2})!", MSCOrg.AltPath(i), AnzDigit(0, CoordID), CounterLat))
End If
End If
If CounterLong > 0 Then
If Job.mode = 1 Then
Throw New Exception(format("The altitude longitude coordinates from file ({0}) have not enought digits after the decimal seperator (minimum digits are ({1}). Number of fails: ({2})!", MSCOrg.AltPath(i), AnzDigit(CoordID), CounterLong))
Throw New Exception(format("The altitude longitude coordinates from file ({0}) have not enought digits after the decimal seperator (minimum digits are ({1}). Number of fails: ({2})!", MSCOrg.AltPath(i), AnzDigit(0, CoordID), CounterLong))
Else
logme(8, False, format("The altitude longitude coordinates from file ({0}) have not enought digits after the decimal seperator (minimum digits are ({1}). Number of fails: ({2})!", MSCOrg.AltPath(i), AnzDigit(CoordID), CounterLong))
logme(8, False, format("The altitude longitude coordinates from file ({0}) have not enought digits after the decimal seperator (minimum digits are ({1}). Number of fails: ({2})!", MSCOrg.AltPath(i), AnzDigit(0, CoordID), CounterLong))
End If
End If
If CounterAlt > 0 Then
......@@ -594,7 +594,7 @@ Public Module input
End If
CalcData(tCompCali.t).Add(CDbl(Line(sKV.Value) + nDay * DayTimeSec))
ElseIf sKV.Key = tComp.lati Or sKV.Key = tComp.lati_D Then
If Line(sKV.Value).Substring(Line(sKV.Value).IndexOf(Prefs.decSep) + 1).Length < AnzDigit(CoordID) Then CounterLat += 1
If Line(sKV.Value).Substring(Line(sKV.Value).IndexOf(Prefs.decSep) + 1).Length < AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID) Then CounterLat += 1
If UTMcalc Then
If MeasCheck(tComp.lati) And sKV.Key = tComp.lati Then UTMCoord = UTM(InputData(sKV.Key)(tDim) / 60, InputData(tComp.longi)(tDim) / 60)
If Not MeasCheck(tComp.lati) And MeasCheck(tComp.lati_D) And sKV.Key = tComp.lati_D Then UTMCoord = UTM(InputData(sKV.Key)(tDim), InputData(tComp.longi_D)(tDim))
......@@ -615,7 +615,7 @@ Public Module input
UTMcalc = True
End If
ElseIf sKV.Key = tComp.longi Or sKV.Key = tComp.longi_D Then
If Line(sKV.Value).Substring(Line(sKV.Value).IndexOf(Prefs.decSep) + 1).Length < AnzDigit(CoordID) Then CounterLong += 1
If Line(sKV.Value).Substring(Line(sKV.Value).IndexOf(Prefs.decSep) + 1).Length < AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID) Then CounterLong += 1
If UTMcalc Then
If MeasCheck(tComp.longi) And sKV.Key = tComp.longi Then UTMCoord = UTM(InputData(tComp.lati)(tDim) / 60, InputData(sKV.Key)(tDim) / 60)
If Not MeasCheck(tComp.longi) And MeasCheck(tComp.longi_D) And sKV.Key = tComp.longi_D Then UTMCoord = UTM(InputData(tComp.lati_D)(tDim), InputData(sKV.Key)(tDim))
......@@ -673,16 +673,16 @@ Public Module input
' Check coordinate digits
If CounterLat > 0 Then
If Job.mode = 1 Then
Throw New Exception(format("The latitude coordinates from file ({0}) have not enought digits after the decimal seperator (minimum digits are ({1})). Number of fails: ({2})!", Datafile, AnzDigit(CoordID), CounterLat))
Throw New Exception(format("The latitude coordinates from file ({0}) have not enought digits after the decimal seperator (minimum digits are ({1})). Number of fails: ({2})!", Datafile, AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID), CounterLat))
Else
logme(8, False, format("The latitude coordinates from file ({0}) have not enought digits after the decimal seperator (minimum digits are ({1})). Number of fails: ({2})!", Datafile, AnzDigit(CoordID), CounterLat))
logme(8, False, format("The latitude coordinates from file ({0}) have not enought digits after the decimal seperator (minimum digits are ({1})). Number of fails: ({2})!", Datafile, AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID), CounterLat))
End If
End If
If CounterLong > 0 Then
If Job.mode = 1 Then
Throw New Exception(format("The longitude coordinates from file ({0}) have not enought digits after the decimal seperator (minimum digits are ({1})). Number of fails: ({2})!", Datafile, AnzDigit(CoordID), CounterLong))
Throw New Exception(format("The longitude coordinates from file ({0}) have not enought digits after the decimal seperator (minimum digits are ({1})). Number of fails: ({2})!", Datafile, AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID), CounterLong))
Else
logme(8, False, format("The longitude coordinates from file ({0}) have not enought digits after the decimal seperator (minimum digits are ({1})). Number of fails: ({2})!", Datafile, AnzDigit(CoordID), CounterLong))
logme(8, False, format("The longitude coordinates from file ({0}) have not enought digits after the decimal seperator (minimum digits are ({1})). Number of fails: ({2})!", Datafile, AnzDigit(Convert.ToInt32(MSCX.tUse), CoordID), CounterLong))
End If
End If
......
......@@ -13,7 +13,7 @@ Module declaration_public
' Description of the form
Public Const AppName As String = "Air Drag" ' Name of the programm
Public Const AppVers As String = "3.0.0" ' Version of the Programm
Public Const AppVers As String = "3.0.1" ' Version of the Programm
Public AppDate As String ' Date of the compilation of the programm
' Control variables
......@@ -54,7 +54,7 @@ Module declaration_public
Public AT As Boolean = False ' Calculation of an automatic transmission (with n_card)
Public MT_AMT As Boolean = False ' Calculation of an manual transmission (always when n_eng available)
Public KoordSys() As Boolean = {False, False} ' Used Koordinate system 0. (MM.MM); 1.(DD.DD)
Public AnzDigit() As Integer = {6, 8} ' Minimum ammount of digits position 0. (MM.MM); 1.(DD.DD)
Public AnzDigit(,) As Integer = {{6, 8}, {4, 6}} ' Minimum ammount of digits position (x) 0. DGPS, 1. GPS --> x.0 (MM.MM); x.1 (DD.DD)
' Boolean for the programm control
Public FileBlock As Boolean = False ' Variable if a file is blocked by an other process
......
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