Description Usage Arguments Details Author(s) References See Also Examples

Convert from geographic/planetographic to geodetic coordinates

1 | ```
geo2geodetic(gcoord, planet, equatorial_radius, polar_radius)
``` |

`gcoord` |
a 3-element vector of geographic coordinates [latitude, longitude, altitude], or an array [3,n] of n such coordinates |

`planet` |
keyword or integer specifying planet (see details, default = earth) |

`equatorial_radius` |
equatorial radius of chosen planet, in km. If not set, the |

`polar_radius` |
polar radius of chosen planet, in km. If not set, the |

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. The method is from Keeper and Nievergelt (1998) with planetary constants from Allen (2000).

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* input is either as an integer (1-9) or one of the (case-independent) strings 'mercury','venus','earth', 'mars', 'jupiter', 'saturn', 'uranus', 'neptune', or 'pluto'.

The *equitorial_radius* and *polar_radius* inputs allow the transformation for any ellipsoid.

Whereas the conversion from geodetic to geographic coordinates is given by an exact, analytical formula, the conversion from geographic to geodetic is not. Approximative iterations (as used here) exist, but tend to become less accurate 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.

Written by Pascal Saint-Hilaire (ETH) and Robert L. Marcialis (LPL), 2002

R adaptation by Arnab Chakraborty June 2013

Allen (ed.) 2000, "Astrophysical Quantities", 4th ed.

Keeler, S. P. and Nievergelt, Y., 1998, Computing geodetic coordinates", SIAM Rev., 40, 300-309.

1 2 3 4 5 6 7 | ```
# Locate the geographic North pole for Earth, altitude 0., in geodetic coordinates
# Returns: 90.000000 0.0000000 21.385000
geo2geodetic(c(90.0,0.0,0.0) )
# As above, but for the case of Mars
# Returns: 90.000000 0.0000000 18.235500
geo2geodetic(c(90.0,0.0,0.0), 'mars')
``` |

```
[1] 90.000 0.000 21.385
[1] 90.0000 0.0000 18.2355
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.