1 #include <Include/fg_constants.h>
2 #include <Math/fg_geodesy.h>
9 double Lon, Alt, sl_radius;
11 double geocentric_Lat;
13 Lon = -87.75 * DEG_TO_RAD;
14 geodetic_Lat = 41.83 * DEG_TO_RAD;
17 printf("Geodetic position = (%.8f, %.8f, %.8f)\n", Lon, geodetic_Lat, Alt);
19 fgGeodToGeoc( geodetic_Lat, Alt, &sl_radius, &geocentric_Lat );
21 printf("Geocentric position = (%.8f, %.8f, %.8f)\n", Lon, geocentric_Lat,
23 printf("new sl_radius = %.8f\n", sl_radius);
25 fgGeocToGeod( geocentric_Lat, sl_radius + Alt, &geodetic_Lat,
28 printf("Geodetic position = (%.8f, %.8f, %.8f)\n", Lon, geodetic_Lat, Alt);
29 printf("new sl_radius = %.8f\n", sl_radius);