Main Content


Convert geocentric latitude to geodetic latitude


geodeticLatitude = geoc2geod(geocentricLatitude,radii)
[geodeticLatitude,height] = geoc2geod(geocentricLatitude,radii)
geodeticLatitude = geoc2geod(geocentricLatitude,radii,model)
[geodeticLatitude,height] = geoc2geod(geocentricLatitude,radii,model)
geodeticLatitude = geoc2geod(geocentricLatitude,radii,flattening, equatorialRadius)
[geodeticLatitude,height] = geoc2geod(geocentricLatitude,radii,flattening,equatorialRadius)


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).

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

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

This function has the limitation that this implementation generates a geodetic latitude that lies between ±90 degrees.

Input Arguments


Array of geocentric latitudes, in degrees. Latitude values can be any value. However, values of +90 and -90 may return unexpected values because of singularity at the poles.


Array of radii from the center of the planet, in meters.


Specific ellipsoid planet. This function supports only 'WGS84'.


Custom ellipsoid planet defined by flattening.


Equatorial radius, in meters.

Output Arguments


Array of geodetic latitudes, in degrees.


Scalar of mean sea-level altitude (MSL), in meters.


Determine geodetic latitude given a geocentric latitude and radius:

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

h =

Determine geodetic latitude at multiple geocentric latitudes, given a radius, and specifying 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 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


Jackson, E.B., Manual for a Workstation-based Generic Flight Simulation Program (LaRCsim) Version 1.4, NASA TM 110164, April 1995

Hedgley, D. R., Jr., An Exact Transformation from Geocentric to Geodetic Coordinates for Nonzero Altitudes, NASA TR R-458, March, 1976

Clynch, J. R.. "Radius of the Earth - Radii Used in Geodesy." Naval Postgraduate School, Monterey, California, 2002.

Stevens, B. L., and F. L. Lewis, Aircraft Control and Simulation, John Wiley & Sons, New York, NY, 1992

Edwards, C. H., and D. E. Penny, Calculus and Analytical Geometry, 2nd Edition, Prentice-Hall, Englewood Cliffs, NJ, 1986

Introduced in R2006b