Function File: az, el, slantrange = ecef2aer (x, y, z, lat0, lon0, alt0)
Function File: az, el, slantrange = ecef2aer (…, spheroid)
Function File: az, el, slantrange = ecef2aer (…, spheroid, angleUnit)

Convert Earth Centered Earth Fixed (ECEF) coordinates to local Azimuth, Elevation and slantRange (AER) coordinates.

Inputs:

  • x, y, z: ECEF coordinates of target points (length units equal to length unit of used referenceEllipsoid, of which the default is meters). Vectors and nD arrays are accepted if they have equal dimensions.
  • lat0, lon0, alt0: latitude, longitude and height of local observer point(s). Length unit of local height: see above. In case of multiple local locations their numbers and dimensions should match those of the target points (i.e., one observer location for each target point).
  • (Optional) spheroid: referenceEllipsoid specified as EPSG number, ellipsoid name, or parameter struct. An empty string ("") or empty numeric array ([]) is also accepted. Default is WGS84.
  • (Optional) angleUnit: string for angular units (’radians’ or ’degrees’), only the first letter matters. Default is ’d’: degrees.

All these coordinated must be either scalars or vectors or nD-arrays in which case all must have the same dimensions.

Outputs:

  • az, el, slantrange: look angles and distance to point under consideration (default units: degrees, degrees, and length unit of invoked referenceEllipsoid, of which default = meters).

Example:

[az, el, slantrange] = ecef2aer (660930.192761082, -4701424.22295701, ...
                                 4246579.60463288, 42, -82, 200, "wgs84")
az = 33.000
el = 70.000
slantrange = 1000.00

With radians:

[az, el, slantrange] = ecef2aer (660930.192761082,-4701424.22295701, ...
                                 4246579.60463288, 0.73304, -1.4312, 200, ...
                                 "wgs84", "rad")
az = 0.57596
el = 1.2217
slantrange = 1000.0

See also: aer2ecef, ecef2enu, ecef2enuv, ecef2geodetic, ecef2ned, ecef2nedv, referenceEllipsoid.

Package: mapping