ecef2geodetic

Class: oblateSpheroid

Transform geocentric (ECEF) to geodetic coordinates

Syntax

[lat,lon,h] = ecef2geodetic(spheroid,X,Y,Z)
[lat,lon,h] = ecef2geodetic(___, angleUnit)

Description

[lat,lon,h] = ecef2geodetic(spheroid,X,Y,Z)returns geodetic coordinates corresponding to coordinates X, Y, Z in an Earth-Centered Earth-Fixed (ECEF) spheroid-centric Cartesian system. Any of the three numerical arguments can be scalar, even when the others are nonscalar; but all nonscalar numeric arguments must match in size.

[lat,lon,h] = ecef2geodetic(___, angleUnit) adds angleUnit which specifies the units of outputs lat and lon.

Input Arguments

expand all

spheroid — Reference spheroidscalar referenceEllipsoid | oblateSpheroid | referenceSphere object

Reference spheroid, specified as a scalar referenceEllipsoid, oblateSpheroid, or referenceSphere object.

X — ECEF x-coordinatesscalar value | vector | matrix | N-D array

x-coordinates of one or more points in the spheroid-centric ECEF system, specified as a scalar value, vector, matrix, or N-D array. Values must be in units that match the LengthUnit property of the spheroid object.

Data Types: single | double

Y — ECEF y-coordinatesscalar value | vector | matrix | N-D array

y-coordinates of one or more points in the spheroid-centric ECEF system, specified as a scalar value, vector, matrix, or N-D array. Values must be in units that match the LengthUnit property of the spheroid object.

Data Types: single | double

Z — ECEF z-coordinatesscalar value | vector | matrix | N-D array

z-coordinates of one or more points in the spheroid-centric ECEF system, specified as a scalar value, vector, matrix, or N-D array. Values must be in units that match the LengthUnit property of the spheroid object.

Data Types: single | double

angleUnit — Units of angles'degrees' (default) | 'radians'

Units of angles, specified as ‘degrees' (default), or 'radians'.

Data Types: char

Output Arguments

expand all

lat — Geodetic latitudesscalar value | vector | matrix | N-D array

Geodetic latitudes of one or more points, returned as a scalar value, vector, matrix, or N-D array. Units are determined by the input argument angleUnit, if supplied; values are in degrees, otherwise. When in degrees, they lie in the closed interval [-90 90].

lon — Longitudesscalar value | vector | matrix | N-D array

Longitudes of one or more points, returned as a scalar value, vector, matrix, or N-D array. Units are determined by the input argument angleUnit, if supplied; values are in degrees, otherwise. When in degrees, they lie in the interval [-180 180].

h — Ellipsoidal heightsscalar value | vector | matrix | N-D array

Ellipsoidal heights of one or more points, returned as a scalar value, vector, matrix, or N-D array. Units are determined by the LengthUnit property of the spheroid object

Was this topic helpful?