31 #define SWAP(a,b) temp=a;a=b;b=temp
33 static int adjust_lat(
double *);
34 static int adjust_lon(
double *);
42 double sin21, tan1, tan2;
63 sin21 = sin(lon2 - lon1);
67 A = (tan2 * cos(lon1) - tan1 * cos(lon2)) / sin21;
68 B = (tan2 * sin(lon1) - tan1 * sin(lon2)) / sin21;
80 return Degrees(atan(A * sin(lon) - B * cos(lon)));
83 static int adjust_lon(
double *lon)
93 static int adjust_lat(
double *lat)
int G_begin_geodesic_equation(double lon1, double lat1, double lon2, double lat2)
double G_geodesic_lat_from_lon(double lon)