GREAT CIRCLE SAILING The great circle distance in degrees
between Point1 (lat1, lon1) and Point2 (lat2, lon2) is easily
calculated: cos(D)= Sin(lat1) * Sin(lat2) + cos(lat1) *
cos(lat2) * cos(lon2 - lon1) or what is the same: D=
arccos(Sin(lat1) * Sin(lat2) + cos(lat1) * cos(lat2) * cos(lon2
- lon1)) In this paper we assume the following signs N=+, S=-,
W=+, E=- . cos(D) will always fall in the range -1 < cos(D) < 1
and (D) will be a positive angle: 0° < D < 180°. You can use a
formula that will use the arctan function but this will give a
result in the -90° to +90° range and you need to add 180° if the
result is negative. The azimuth or initial course from point 1
(origin) to point 2 (destination) Zn can also be easily
calculated. Zn is always measured from North to East from 0° to
360°. First we calculate Z. If we have considered West
longitudes as positive we use this formula: (If we had
considered East longitudes as being positive we would need to
change the sign on one side of this equation.) The functio