inverse.c
Go to the documentation of this file.
1 
6 #include <stdio.h>
7 #include "geodesic.h"
8 
9 #if defined(_MSC_VER)
10 /* Squelch warnings about scanf */
11 # pragma warning (disable: 4996)
12 #endif
13 
21 int main() {
22  double a = 6378137, f = 1/298.257223563; /* WGS84 */
23  double lat1, lon1, azi1, lat2, lon2, azi2, s12;
24  struct geod_geodesic g;
25 
26  geod_init(&g, a, f);
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);
30  }
31  return 0;
32 }
main
int main()
Definition: inverse.c:21
geodesic.h
API for the geodesic routines in C.
geod_geodesic
Definition: geodesic.h:168
geod_init
void geod_init(struct geod_geodesic *g, double a, double f)
g
void g(const string &key, int i)
Definition: testBTree.cpp:41
tree::f
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Definition: testExpression.cpp:218
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
geod_inverse
void geod_inverse(const struct geod_geodesic *g, double lat1, double lon1, double lat2, double lon2, double *ps12, double *pazi1, double *pazi2)


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:28