I decided to make this program to calculate distances based off of GPS coordinates. My next step is to calculate it with differences in elevation between the GPS points. I got the code from here http://www.movable-type.co.uk/scripts/latlong-vincenty.html http://www.movable-type.co.uk/scripts/latlong.html The Autoit _Radian() function doesn't output all the time because sometimes the IsNumber() function thinks the float is not a number... don't ask me why... so the /57.2957795130823 in my code
Decided to post my updated version since there seems to be some interest. Code below has no gui, also has some bonus functions. #include <INet.au3>
Global Const $PI = 4 * ATan(1)
Global Const $degToRad = $PI / 180
$lon1dd = -116
$lat1dd = 33
$lon2dd = -116.05
$lat2dd = 33.05
MsgBox(0, "Test", DisplayAll(CalcAll($lat1dd, $lon1dd, $lat2dd, $lon2dd)))
; Calculate geodesic distance (in m) between two points specified by latitude/longitude (in DD)
; using Vincenty inverse formula for ell