-/* convert a geodetic point lon(arcsec), lat(arcsec), elev(meter) to
- * a cartesian point */
-fgPoint3d geod_to_cart(double geod[3]) {
- fgPoint3d cp;
- fgPoint3d pp;
- double gc_lon, gc_lat, sl_radius;
-
- /* printf("A geodetic point is (%.2f, %.2f, %.2f)\n",
- geod[0], geod[1], geod[2]); */
-
- gc_lon = geod[0]*ARCSEC_TO_RAD;
- fgGeodToGeoc(geod[1]*ARCSEC_TO_RAD, geod[2], &sl_radius, &gc_lat);
-
- /* printf("A geocentric point is (%.2f, %.2f, %.2f)\n", gc_lon,
- gc_lat, sl_radius+geod[2]); */
-
- pp.lon = gc_lon;
- pp.lat = gc_lat;
- pp.radius = sl_radius + geod[2];
- cp = fgPolarToCart3d(pp);
-
- /* printf("A cart point is (%.8f, %.8f, %.8f)\n", cp.x, cp.y, cp.z); */
-
- return(cp);
-}
-