File: geoidtest.c

package info (click to toggle)
geographiclib 2.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,572 kB
  • sloc: cpp: 27,765; sh: 5,463; makefile: 695; python: 12; ansic: 10
file content (13 lines) | stat: -rw-r--r-- 284 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdio.h>
#include "cgeoid.h"

#if defined(_MSC_VER)
/* Squelch warnings about scanf */
#  pragma warning (disable: 4996)
#endif

int main() {
  double lat, lon, h;
  while(scanf("%lf %lf %lf", &lat, &lon, &h) == 3)
    printf("%.3f\n", HeightAboveEllipsoid(lat, lon, h));
}