Institut für Astronomie und AstrophysikAbteilung AstronomieSand 1, D-72076 Tübingen, Germany |
GEO2GEODETIC
Convert from geographic/planetographic to geodetic coordinates
Converts from geographic (latitude, longitude, altitude) to geodetic (latitude, longitude, altitude). In geographic coordinates, the Earth is assumed a perfect sphere with a radius equal to its equatorial radius. The geodetic (or ellipsoidal) coordinate system takes into account the Earth's oblateness. Geographic and geodetic longitudes are identical. Geodetic latitude is the angle between local zenith and the equatorial plane. Geographic and geodetic altitudes are both the closest distance between the satellite and the ground. The PLANET keyword allows a similar transformation for the other planets (planetographic to planetodetic coordinates). The EQUATORIAL_RADIUS and POLAR_RADIUS keywords allow the transformation for any ellipsoid. Latitudes and longitudes are expressed in degrees, altitudes in km. REF: Stephen P. Keeler and Yves Nievergelt, "Computing geodetic coordinates", SIAM Rev. Vol. 40, No. 2, pp. 300-309, June 1998 Planterary constants from "Allen's Astrophysical Quantities", Fourth Ed., (2000)
ecoord=geo2geodetic(gcoord,[ PLANET=,EQUATORIAL_RADIUS=, POLAR_RADIUS=])
gcoord = a 3-element array of geographic [latitude,longitude,altitude], or an array [3,n] of n such coordinates.
PLANET = keyword specifying planet (default is Earth). The planet may be specified either as an integer (1-9) or as one of the (case-independent) strings 'mercury','venus','earth','mars', 'jupiter','saturn','uranus','neptune', or 'pluto' EQUATORIAL_RADIUS : Self-explanatory. In km. If not set, PLANET's value is used. POLAR_RADIUS : Self-explanatory. In km. If not set, PLANET's value is used.
a 3-element array of geodetic/planetodetic [latitude,longitude,altitude], or an array [3,n] of n such coordinates, double precision.
None
Whereas the conversion from geodetic to geographic coordinates is given by an exact, analytical formula, the conversion from geographic to geodetic isn't. Approximative iterations (as used here) exist, but tend to become less good with increasing eccentricity and altitude. The formula used in this routine should give correct results within six digits for all spatial locations, for an ellipsoid (planet) with an eccentricity similar to or less than Earth's. More accurate results can be obtained via calculus, needing a non-determined amount of iterations. In any case, IDL> PRINT,geodetic2geo(geo2geodetic(gcoord)) - gcoord is a pretty good way to evaluate the accuracy of geo2geodetic.pro.
Locate the geographic North pole, altitude 0., in geodetic coordinates IDL> geo=[90.d0,0.d0,0.d0] IDL> geod=geo2geodetic(geo); convert to equivalent geodetic coordinates IDL> PRINT,geod 90.000000 0.0000000 21.385000 As above, but for the case of Mars IDL> geod=geo2geodetic(geo,PLANET='Mars') IDL> PRINT,geod 90.000000 0.0000000 18.235500
Written by Pascal Saint-Hilaire (shilaire@astro.phys.ethz.ch), May 2002 Generalized for all solar system planets by Robert L. Marcialis (umpire@lpl.arizona.edu), May 2002 Modified 2002/05/18, PSH: added keywords EQUATORIAL_RADIUS and POLAR_RADIUS
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]