geodetic2geo: Convert from geodetic (or planetodetic) to geographic...

Description Usage Arguments Details Value Author(s) Examples

Description

Convert from geodetic (or planetodetic) to geographic coordinates

Usage

1
geodetic2geo(ecoord, planet, equatorial_radius, polar_radius)

Arguments

ecoord

a 3-element array of geodetic [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 planet value is used.

polar_radius

polar radius of chosen planet, in km. If not set, the planet value is used.

Details

Converts from geodetic (latitude, longitude, altitude) to geographic (latitude, longitude, altitude) coordinates. 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.

Value

gcoord

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

Author(s)

Written by Pascal Saint-Hilaire (ETH) on 2002

R adaptation by Arnab Chakraborty June 2013

Examples

1
2
3
4
5
6
7
# Convert North Pole, zero altitude, to geographic coordinates
# Results: 90.000000       0.0000000      -21.385000
geodetic2geo(c(90,0,0))

# Same calculation but for Mars
# Results: 90.000000       0.0000000      -18.235500
geodetic2geo(c(90,0,0),'mars')

Example output

     glat glon    galt
[1,]   90    0 -21.385
     glat glon     galt
[1,]   90    0 -18.2355

astrolibR documentation built on May 2, 2019, 3:26 a.m.