-/**
- * Find the Altitude above the Ellipsoid (WGS84) given the Earth
- * Centered Cartesian coordinate vector Distances are specified in
- * meters.
- * @param cp point specified in cartesian coordinates
- * @return altitude above the (wgs84) earth in meters
- */
-inline double sgGeodAltFromCart(const Point3D& p)
-{
- SGGeod geod;
- SGGeodesy::SGCartToGeod(SGVec3<double>(p.x(), p.y(), p.z()), geod);
- return geod.getElevationM();
-}
-
-
-/**
- * Convert a polar coordinate to a cartesian coordinate. Lon and Lat
- * must be specified in radians. The SG convention is for distances
- * to be specified in meters
- * @param p point specified in polar coordinates
- * @return the same point in cartesian coordinates
- */
-inline Point3D sgPolarToCart3d(const Point3D& p)
-{
- SGVec3<double> cart;
- SGGeodesy::SGGeocToCart(SGGeoc::fromRadM(p.lon(), p.lat(), p.radius()), cart);
- return Point3D::fromSGVec3(cart);
-}
-
-
-/**
- * Convert a cartesian coordinate to polar coordinates (lon/lat
- * specified in radians. Distances are specified in meters.
- * @param cp point specified in cartesian coordinates
- * @return the same point in polar coordinates
- */
-inline Point3D sgCartToPolar3d(const Point3D& p)
-{
- SGGeoc geoc;
- SGGeodesy::SGCartToGeoc(SGVec3<double>(p.x(), p.y(), p.z()), geoc);
- return Point3D::fromSGGeoc(geoc);
-}
-
-