Main Content

geoc2geod

Convert geocentric latitude to geodetic latitude

Description

WGS84 Ellipsoid Planet

geodeticLatitude = geoc2geod(geocentricLatitude,radii) converts an array of geocentric latitudes and an array of radii from the center of the planet into an array of geodetic latitudes.

[geodeticLatitude,height] = geoc2geod(geocentricLatitude,radii) returns an array of altitudes above the planetary ellipsoid.

example

Specific Ellipsoid Planet

geodeticLatitude = geoc2geod(geocentricLatitude,radii,model) returns an array of radii, radii.

[geodeticLatitude,height] = geoc2geod(geocentricLatitude,radii,model) returns an array of altitude above planetary ellipsoid.

example

Custom Ellipsoid Planet

geodeticLatitude = geoc2geod(geocentricLatitude,radii,flattening, Re) returns an array of radii, radii.

[geodeticLatitude,height] = geoc2geod(geocentricLatitude,radii,flattening,Re) returns an array of altitude above planetary ellipsoid.

example

Examples

collapse all

Determine geodetic latitude given a geocentric latitude and radius.

gd = geoc2geod(45, 6379136)
gd = 
45.1921

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

gd = geoc2geod([0 45 90], 6379136, 'WGS84')
gd = 1×3

         0   45.1921   90.0000

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

f = 1/196.877360;
Re = 3397000;
gd = geoc2geod([0 45 90], 6379136, f, Re)
gd = 1×3

         0   45.1550   90.0000

This example shows how to determine geodetic latitude and ellipsoidal altitude at multiple geocentric latitudes and radii that specify a WGS84 ellipsoid model.

[gd,h] = geoc2geod([0 45 90],6379136,'WGS84')
gd = 1×3

         0   45.1921   90.0000

h = 1×3
104 ×

    0.0999    1.1718    2.2384

This example shows how to determine geodetic latitude at multiple geocentric latitudes given radii that specify a custom ellipsoid model.

f = 1/196.877360;
Re = 3397000;
[gd,h] = geoc2geod([0 45 90],6379136,f,Re)
gd = 1×3

         0   45.1550   90.0000

h = 1×3
106 ×

    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.

Altitude above planetary ellipsoid, returned as an array in meters.

Limitations

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

Version History

Introduced in R2006b