gps distance calculation
Posted: April 17th, 2024, 11:33 am
Hi
I've tried using the gps function to calculate great-circle distances between two points (as explained in the manual) but I do not get a distance if the second point is not provided using the gps() function.
LAT1, LON1, LAT2, LON2, DISTANCE are variables in my dictionary where LAT1 and LON1 come from a lookup file (pre-existing coordinates for a point).
LAT2 and LON2 are set from a succesful gps reading (see below).
LAT2 = gps(latitude);
LON3 = gps(longitude);
If DISTANCE is set with gps(distance,LAT1,LON1,LAT2,LON2) --> it returns default.
If DISTANCE is set with gps(distance,LAT1,LON1,gps(latitude),gps(longitude)) --> it returns a distance in meters.
Is this by design?
Regards,
--
Steven Lwendo
I've tried using the gps function to calculate great-circle distances between two points (as explained in the manual) but I do not get a distance if the second point is not provided using the gps() function.
LAT1, LON1, LAT2, LON2, DISTANCE are variables in my dictionary where LAT1 and LON1 come from a lookup file (pre-existing coordinates for a point).
LAT2 and LON2 are set from a succesful gps reading (see below).
LAT2 = gps(latitude);
LON3 = gps(longitude);
If DISTANCE is set with gps(distance,LAT1,LON1,LAT2,LON2) --> it returns default.
If DISTANCE is set with gps(distance,LAT1,LON1,gps(latitude),gps(longitude)) --> it returns a distance in meters.
Is this by design?
Regards,
--
Steven Lwendo