B4X:
'####################################
Dim d1 As Double
Dim d2 As Double
If d_lati <> "" Then
d1 = CDob(d_lati)
End If
If d_longi <> "" Then
d2 = CDob(d_longi)
End If
Msgbox(d1 & " " & d2,"sadf")
calc_uumkreis = CalcDistance(lat,lon,d1,d2)/1000
'###########################################
Sub CDob(o As Object) As Double
Return Floor(o)
End Sub
Sub CalcDistance(lat1 As Double, lng1 As Double, lat2 As Double, lng2 As Double) As Double
Dim l1, l2 As Location
Dim entfernung As Double
l1.Initialize2(lat1, lng1)
l2.Initialize2(lat2, lng2)
entfernung = l1.DistanceTo(l2)* 1.609344
Return entfernung
End Sub
Hi, i want to convert a string to double. The variable d_lati(45.222) and d_longi(34.2222) are strings form a .txt file. Now i want to calc the distance between me and this gps positons.
The problem is 33.2222 gps is after convert to double 33
Maybe someone can help me, thank you.:sign0085:
PS: great forum