http://www.users.bigpond.com/tobbe/dl7aot.htm a 16F84 based project with source code
Elkin Dario Gonzalez Sierra of Consorcio Trunking S.A. 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(BD)] > 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(BD)];
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)
See also:
file: /Techref/microchip/gps.htm, 2KB, , updated: 2005/9/26 10:18, local time: 2021/10/21 12:01,

©2021 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://www.piclist.com/techref/microchip/gps.htm"> PIC GPS (Global Positioning System) IO</A> 
Did you find what you needed? 
PICList 2021 contributors:
o List host: MIT, Site host massmind.org, Top posters @20211021 Neil, Harold Hallikainen, Alan Pearce, RussellMc, Bob Blick, Allen Mulvey, Dwayne Reid, madscientistatlarge, Sean Breheny, Justin Richards, * Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. ongoing support is MOST appreciated! * Contributors: Richard Seriani, Sr. 
Welcome to www.piclist.com! 
.