Main Content

geoc2geod

Convert geocentric latitude to geodetic latitude

Description

WGS84 Ellipsoid Planet

example

geodeticLatitude = geoc2geod(geocentricLatitude,radii) and [geodeticLatitude,height] = geoc2geod(geocentricLatitude,radii) convert an array of geocentric latitudes and an array of radii from the center of the planet into an array of geodetic latitudes. The optional height returns the mean sea-level altitude (MSL).

Specific Ellipsoid Planet

example

geodeticLatitude = geoc2geod(geocentricLatitude,radii,model) and [geodeticLatitude,height] = geoc2geod(geocentricLatitude,radii,model) convert for a specific ellipsoid planet.

Custom Ellipsoid Planet

example

geodeticLatitude = geoc2geod(geocentricLatitude,radii,flattening, Re) and [geodeticLatitude,height] = geoc2geod(geocentricLatitude,radii,flattening,Re) convert for a custom ellipsoid planet defined by flattening and the equatorial radius.

Examples

collapse all

Determine geodetic latitude given a geocentric latitude and radius.

[gd,h] = geoc2geod(45,6379136)
gd =
   45.1921

h =
   1.1718e+04

Determine geodetic latitude at multiple geocentric latitudes given a radius, and specifying a WGS84 ellipsoid model.

[gd,h] = geoc2geod([0 45 90],6379136,'WGS84')
gd =
         0   45.1921   90.0000
h =
   1.0e+04 *
    0.0999    1.1718    2.2384

Determine geodetic latitude at multiple geocentric latitudes given a radius, and specifying a custom ellipsoid model.

f = 1/196.877360;
Re = 3397000;
[gd,h] = geoc2geod([0 45 90],6379136,f,Re)
gd =
         0   45.1550   90.0000
h =
   1.0e+06 *
    2.9821    2.9908    2.9994

Input Arguments

collapse all

Geocentric latitudes, specified as an array in degrees. Latitude values can be any value. However, values of +90 and -90 may return unexpected values because of singularity at the poles.

Data Types: double

Radii from center of planet, specified as an array in meters.

Data Types: double

Specific ellipsoid planet model, specified as 'WGS84'.

Data Types: char | string

Flattening at each pole, specified as a scalar.

Data Types: double

Equatorial radius, specified as a scalar in meters.

Data Types: double

Output Arguments

collapse all

Geocentric latitudes, returned as an array in degrees.

Mean sea-level altitude (MSL), returned as a scalar or array in meters.

Limitations

This function generates a geocentric latitude that lies between ±90 degrees.

Introduced in R2006b