Transform Cartesian coordinates (East, North, Up) to radar coordinates (Range, Azimuth, Elevation)
Updated 24 Aug 2007

No License

A variation of Matlab's cart2sph, that transforms a vector of Cartesian coordinates (East, North, Up) to radar coordinates (Range, Azimuth, Elevation). Note the different definition of radar coords vs. spherical coords, which require this different function (see exact definitions within the help comment).

input format #1: [...] = xyz2rae(x,y,z)
input format #2: [...] = xyz2rae(xyz)
output format #1: [range, azimuth, elevation] = xyz2rae(...)
output format #2: rae = xyz2rae(...)

The input coordinates may be either singular values or a vector of coordinate points.

Use the corresponding rae2xyz function for the reverse transformation.

Note: xyz2rae does NOT take into account earth curvature, Ionosphere beam curving etc. - this simple function uses a simple flat-earth free-space model.

Cite As

Yair Altman (2024). xyz2rae (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R12
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

added sanity checks; handled 2D data