```
Sub Loc2Dis (LocVStr As String, LocZStr As String) As Map
Dim r As Int = 6371.137
Dim rad2deg As Double = 180.0 / cPI
Dim LocV, LocZ As Map
LocV.Initialize
LocZ.Initialize
LocV=Loc2LatLon(LocVStr)
LocZ=Loc2LatLon(LocZStr)
Dim B1 As Double = LocV.Get("b")
Dim B2 As Double = LocZ.Get("b")
Dim L1 As Double = LocV.Get("l")
Dim L2 As Double = LocZ.Get("l")
Dim ew As Double = ACos(SinD(B1) * SinD(B2) + CosD(B1) * CosD(B2) * CosD(L1-L2)) 'entfernung in Winkelangabe
Dim Entfernung As Double = r * ew 'Umrechnung in Längenangabe
Dim tc As Double
If Sin(L2-L1)>=0 Then
tc=ACos((SinD(B2) - SinD(B1) * Cos(ew)) / (Sin(ew) * CosD(B1)))
Else
tc=(2*cPI) - ACos((SinD(B2) - SinD(B1) * Cos(ew)) / (Sin(ew) * CosD(B1)))
End If
Dim Richtung1 As Double = (tc * rad2deg * 10) / 10
Log("Entfernung " & NumberFormat(Entfernung,1,1))
Log("Richtung1 " & NumberFormat(Richtung1,1,1))
Dim MapR As Map
MapR.Initialize
MapR.Put("E",NumberFormat(Entfernung,1,0)) 'Dist
MapR.Put("R",NumberFormat(Richtung1,1,0)) 'Dir
Return MapR
End Sub
Sub Loc2LatLon(locator As String) As Map
Dim l1, l2, l3 As Double
Dim b1, b2, b3 As Double
Dim LocTrenn(locator.Length) As String
For i=0 To locator.Length-1
LocTrenn(i)=locator.ToUpperCase.SubString2(i,i+1)
Next
For i=0 To 17
If LocTrenn(0)= Chr(65+i) Then l1=-180 + (i*20)
Next
For i=0 To 17
If LocTrenn(1)= Chr(65+i) Then b1=-90 + (i*10)
Next
For i=0 To 9
If LocTrenn(2)= i Then l2= i*2
Next
For I=0 To 9
If LocTrenn(3)= I Then b2=i
Next
For i=0 To 23
If LocTrenn(4)= Chr(65+i) Then l3= (i*2)/24
Next
For i=0 To 23
If LocTrenn(5)= Chr(65+i) Then b3= i/24
Next
Dim l As Double = l1+l2+l3
Dim b As Double = b1+b2+b3
Dim retM As Map
retM.Initialize
retM.Put("l",l)
retM.Put("b",b)
Return retM
End Sub
```