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

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

* Correction HS calculation

  * Correction length calculation for the first section in the dat-file when there is a gap between the first and second MS.
  * Update length calculation in csms-file to check if specified length from user and coordinates are the same
  * New Version number.
parent 06dc9331
No related branches found
Tags milestones/2.0.1-beta3
No related merge requests found
VECTO-CSE: Changes
===================
#### 2014-09-30: v2.0.1-beta3 ####
Mostly TUG improvements:
* Correction HS calculation
* Correction length calculation for the first section in the dat-file when there is a gap between the first and second MS.
* Update length calculation in csms-file to check if specified length from user and coordinates are the same
* New Version number.
#### 2014-09-30: v2.0.1-beta2 ####
Mostly TUG improvements:
......
......@@ -47,7 +47,9 @@ Module Signal_identification
Dim i As Integer
Dim first As Boolean = True
Dim AddSec As Boolean = False
Dim LenDiff As Boolean = False
Dim Aae As Double
Dim len(MSCOrg.meID.Count - 1) As Double
Dim UTMCoordP As New cUTMCoord
Dim UTMCoordV As New cUTMCoord
......@@ -59,6 +61,7 @@ Module Signal_identification
UTMCoordP = UTM(MSCOrg.latS(i) / 60, MSCOrg.longS(i) / 60)
UTMCoordV = UTM(MSCOrg.latE(i) / 60, MSCOrg.longE(i) / 60)
Aae = QuadReq(UTMCoordV.Easting - UTMCoordP.Easting, UTMCoordV.Northing - UTMCoordP.Northing)
len(i) = Math.Sqrt(Math.Pow(UTMCoordV.Easting - UTMCoordP.Easting, 2) + Math.Pow(UTMCoordV.Northing - UTMCoordP.Northing, 2))
MSCVirt.meID.Add(MSCOrg.meID(i))
MSCVirt.dID.Add(MSCOrg.dID(i))
MSCVirt.KoordA.Add(KleinPkt(UTMCoordP.Easting, UTMCoordP.Northing, Aae, 0, -Crt.trigger_delta_y_max))
......@@ -71,20 +74,31 @@ Module Signal_identification
MSCVirt.NewSec.Add(True)
MSCVirt.meID.Add(0)
MSCVirt.dID.Add(MSCOrg.dID(i))
MSCVirt.KoordA.Add(KleinPkt(UTMCoordP.Easting, UTMCoordP.Northing, Aae, MSCOrg.len(i), -Crt.trigger_delta_y_max))
MSCVirt.KoordE.Add(KleinPkt(UTMCoordP.Easting, UTMCoordP.Northing, Aae, MSCOrg.len(i), Crt.trigger_delta_y_max))
MSCVirt.KoordA.Add(KleinPkt(UTMCoordP.Easting, UTMCoordP.Northing, Aae, len(i), -Crt.trigger_delta_y_max))
MSCVirt.KoordE.Add(KleinPkt(UTMCoordP.Easting, UTMCoordP.Northing, Aae, len(i), Crt.trigger_delta_y_max))
MSCVirt.Head.Add(MSCOrg.head(i))
End If
ElseIf i = MSCOrg.meID.Count - 1 Then
MSCVirt.NewSec.Add(True)
MSCVirt.meID.Add(0)
MSCVirt.dID.Add(MSCOrg.dID(i))
MSCVirt.KoordA.Add(KleinPkt(UTMCoordP.Easting, UTMCoordP.Northing, Aae, MSCOrg.len(i), -Crt.trigger_delta_y_max))
MSCVirt.KoordE.Add(KleinPkt(UTMCoordP.Easting, UTMCoordP.Northing, Aae, MSCOrg.len(i), Crt.trigger_delta_y_max))
MSCVirt.KoordA.Add(KleinPkt(UTMCoordP.Easting, UTMCoordP.Northing, Aae, len(i), -Crt.trigger_delta_y_max))
MSCVirt.KoordE.Add(KleinPkt(UTMCoordP.Easting, UTMCoordP.Northing, Aae, len(i), Crt.trigger_delta_y_max))
MSCVirt.Head.Add(MSCOrg.head(i))
End If
Next i
' Controll the spezified csms length
For i = 1 To MSCOrg.meID.Count - 1
If Math.Abs(len(i) - MSCOrg.len(i)) > Crt.leng_crit Then
If Not LenDiff Then logme(9, False, "Length difference between given coordinates and spezified section length in *.csms file!")
logme(9, False, "SecID(" & MSCOrg.meID(i) & "), DirID(" & MSCOrg.dID(i) & "), spez. Len(" & MSCOrg.len(i) & "), coord. Len(" & Math.Round(len(i), 2) & ")")
LenDiff = True
End If
Next i
' Exit the programm
If LenDiff Then Throw New Exception(format("Length difference between given coordinates and spezified section length in *.csms file! Please correct the length!"))
Return True
End Function
......@@ -582,7 +596,7 @@ Module Signal_identification
End If
Else
' Finish calculation after a valid section
If run > 0 And firstIn = False Then
If firstIn = False Then
' Calculate the results from the last section
ErgValues(tCompErg.v_veh)(run) = ErgValues(tCompErg.v_veh)(run) / anz
ErgValues(tCompErg.dist)(run) = CalcData(tCompCali.dist)(i - 1) - ErgValues(tCompErg.dist)(run)
......
......@@ -803,25 +803,21 @@ Public Module main_calculation_call
' Check if enough valid sections in both directionsection
For i = 0 To SecCount.NameSec.Count - 1
For j = i + 1 To SecCount.NameSec.Count - 1
If Trim(Mid(SecCount.NameSec(i), InStr(SecCount.NameSec(i), ",") + 1, InStr(SecCount.NameSec(i), ")") - (InStr(SecCount.NameSec(i), ",") + 1))) = Trim(Mid(SecCount.NameSec(j), InStr(SecCount.NameSec(j), ",") + 1, InStr(SecCount.NameSec(j), ")") - (InStr(SecCount.NameSec(j), ",") + 1))) Then
' If enought sections in both directions are detected
If SecCount.AnzSec(i) >= Crt.segruns_min_HS And SecCount.AnzSec(j) >= Crt.segruns_min_HS Then
' Count the valid tests per HeadID
Dim headId = Trim(Mid(SecCount.NameSec(i), InStr(SecCount.NameSec(i), ",") + 1, InStr(SecCount.NameSec(i), ")") - (InStr(SecCount.NameSec(i), ",") + 1)))
Select Case headId
Case 1
anzHS1 += SecCount.AnzSec(i) + SecCount.AnzSec(j)
Case 2
anzHS2 += SecCount.AnzSec(i) + SecCount.AnzSec(j)
Case Else
Throw New Exception(format("Unknown headID({0})!", headId))
End Select
Else
Throw New Exception(format("Not enough valid data({0}) for high speed tests available in section({1})!", SecCount.AnzSec(i), Trim(Mid(SecCount.NameSec(i), 1, InStr(SecCount.NameSec(i), "(") - 2))))
End If
End If
Next j
' If enought runs in the direction are detected
If SecCount.AnzSec(i) >= Crt.segruns_min_HS Then
' Count the valid tests per HeadID
Dim headId = Trim(Mid(SecCount.NameSec(i), InStr(SecCount.NameSec(i), ",") + 1, InStr(SecCount.NameSec(i), ")") - (InStr(SecCount.NameSec(i), ",") + 1)))
Select Case headId
Case 1
anzHS1 += SecCount.AnzSec(i)
Case 2
anzHS2 += SecCount.AnzSec(i)
Case Else
Throw New Exception(format("Unknown headID({0})!", headId))
End Select
Else
Throw New Exception(format("Not enough valid data({0}) for high speed tests available in section({1})!", SecCount.AnzSec(i), Trim(Mid(SecCount.NameSec(i), 1, InStr(SecCount.NameSec(i), "(") - 2))))
End If
Next i
' Ceck if enough sections are detected
......
......@@ -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-beta2" ' Version of the Programm
Public Const AppVers As String = "2.0.1-beta3" ' Version of the Programm
Public AppDate As String ' Date of the compilation of the programm
' Control variables
......
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