11 # pragma warning (disable: 4996) 22 double a = 6378137,
f = 1/298.257223563;
23 double lat1, lon1, azi1, lat2, lon2, azi2, s12;
27 while (scanf(
"%lf %lf %lf %lf", &lat1, &lon1, &lat2, &lon2) == 4) {
28 geod_inverse(&g, lat1, lon1, lat2, lon2, &s12, &azi1, &azi2);
29 printf(
"%.15f %.15f %.10f\n", azi1, azi2, s12);
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
void geod_inverse(const struct geod_geodesic *g, double lat1, double lon1, double lat2, double lon2, double *ps12, double *pazi1, double *pazi2)
void geod_init(struct geod_geodesic *g, double a, double f)
API for the geodesic routines in C.