No BSD License  

Highlights from
rae2xyz

5.0

5.0 | 2 ratings Rate this file 9 Downloads (last 30 days) File Size: 3.67 KB File ID: #16084

rae2xyz

by Yair Altman

 

24 Aug 2007 (Updated 24 Aug 2007)

Transform radar coordinates (Range, Azimuth, Elevation) to Cartesian coordinates (East, North, Up)

| Watch this File

File Information
Description

A variation of Matlab's sph2cart, that transforms a vector of radar coordinates (Range, Azimuth, Elevation) to Cartesian coordinates (East, North, Up). 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: [...] = rae2xyz(range, azimuth, elevation)
input format #2: [...] = rae2xyz(rae)
output format #1: [east, north, up] = rae2xyz(...)
output format #2: xyz = rae2xyz(...)

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

Use the corresponding xyz2rae function for the reverse transformation.

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

MATLAB release MATLAB 6.0 (R12)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
27 Aug 2007 John D'Errico

This is not a code that huge numbers of people will find extremely useful, plus the actual computational kernel is relatively small. (Sorry Yair, but I'm not insulting your code, instead take this review as a sincere compliment.) Even so, the author has written it carefully and documented it well. He has taken pains to allow you to provide your input in several forms, checking for errors along the way. I'd suggest that many Matlab programmers who aspire to improve the quality of their code might learn from what they find here. High quality code does not stop at just a few lines of dense code. It should include well written documentation as well as careful error checking on the parameters. Well written code should worry about the interface with you, the user.

One minor point - Input format #2 allows you to provide the inputs bundled into one single array. Must this array be an nx3 array? (Yes.) Or could it be 3xn? While I like to build these things as nx3 arrays, others seem to use 3xn arrays here. (If so, then what would happen if there were exactly 3 points, so it is 3x3?) There is no indication in the help of the expected shape of the array.

08 Dec 2007 bigoh Oh  
Please login to add a comment or rating.
Updates
24 Aug 2007

added sanity checks; handled 2D data

Tag Activity for this File
Tag Applied By Date/Time
aerospace Yair Altman 22 Oct 2008 09:24:22
aeronautics Yair Altman 22 Oct 2008 09:24:22
aerodef Yair Altman 22 Oct 2008 09:24:22
cartesian Yair Altman 22 Oct 2008 09:24:22
radar Yair Altman 22 Oct 2008 09:24:22
coordinates Yair Altman 22 Oct 2008 09:24:22
range Yair Altman 22 Oct 2008 09:24:23
azimuth Yair Altman 22 Oct 2008 09:24:23
elevation Yair Altman 22 Oct 2008 09:24:23

Contact us at files@mathworks.com