ON 20050926@9:19:34 AM at page:
http://techref.massmind.org/techref/io/sensor/pos/gps.htm#38621.388587963
Elkin Dario Gonzalez Sierra[EDG-TK-FKI] Says
I've been looking for the equation for finding the distance between two
cities, given the latitude and longitude of both cities. For example: what
is the formula one would use to find the distance between San Francisco
(N37 37' 00" latitude, W122 22' 00" longitude) and Paris (N48 44' 00"
latitude, E02 23' 00" longitude.)
The equation to implement is:
A = LAT1, B = LONG1
C = LAT2, D = LONG2 (all converted to radians: degree/57.29577951)
IF A = C AND B = D THEN DISTANCE = 0;
ELSE
IF [SIN(A)SIN(C) COS(A)COS(C)COS(B-D)] > 1 THEN DISTANCE =
3963.1*ARCOS[1]; /* solved a prob I ran into. I haven't fully
analyzed it yet */
ELSE
DISTANCE=3963.1*ARCOS[SIN(A)SIN(C) COS(A)COS(C)COS(B-D)];
I'm trying to write a program for the 18F452 PIC micro that will include this distance calculation in it.
Any help that members of "The PIC List" can offer would be greatly appreciated.
Elkin Dario Gonzalez Sierra
Bogota (COLOMBIA)
ON 20050926@3:35:30 PM at page:
http://techref.massmind.org/techref/io/sensor/pos/gps.htm#38621.6496527778
James Newton[JMN-EFP-786] See:
/techref/datafile/location.htm
Location Data, Physical Address
ON 20050926@3:40:51 PM at page:
http://techref.massmind.org/techref/io/sensor/pos/gps.htm#
James Newton[JMN-EFP-786] edited the page. Difference:
http://techref.massmind.org/techref/diff.asp?url=H:\techref\io\sensor\pos\gps.htm&version=3
ON 20050926@3:42:52 PM at page:
http://techref.massmind.org/techref/io/sensor/pos/gps.htm#
James Newton[JMN-EFP-786] edited the page. Difference:
http://techref.massmind.org/techref/diff.asp?url=H:\techref\io\sensor\pos\gps.htm&version=5
ON 20050926 at page:
http://www.massmind.org/techref/io/sensor/pos/gps.htm
someone[--] edited the page. Difference:
"R:\bak\H\techref\io\sensor\pos\gps.htm.20050926.dif"