Main Content

aer2enu

Transform local spherical coordinates to local east-north-up

Description

[xEast,yNorth,zUp] = aer2enu(az,elev,slantRange) transforms the local azimuth-elevation-range (AER) spherical coordinates specified by az, elev, and slantRange to the local east-north-up (ENU) Cartesian coordinates specified by xEast, yNorth, and zUp. Both coordinate systems use the same local origin. Each input argument must match the others in size or be scalar.

example

[___] = aer2enu(___,angleUnit) specifies the units for azimuth and elevation. Specify angleUnit as 'degrees' (the default) or 'radians'.

Examples

collapse all

A sensor captures the AER coordinates of a nearby ground vehicle. Find the ENU coordinates of the vehicle with respect to the sensor, using the AER coordinates of the vehicle with respect to the same sensor.

First, specify the AER coordinates of the vehicle. Specify the azimuth and elevation in degrees. For this example, specify the slant range in meters.

az = 34.1160;
elev = 4.1931;
slantRange = 15.1070; 

Then, calculate the ENU coordinates of the vehicle. The units for the ENU coordinates match the units specified by the slant range. Thus, the ENU coordinates are specified in meters.

[xEast,yNorth,zUp] = aer2enu(az,elev,slantRange)
xEast = 
8.4504
yNorth = 
12.4737
zUp = 
1.1046

Reverse the transformation using the enu2aer function.

[az,elev,slantRange] = enu2aer(xEast,yNorth,zUp)
az = 
34.1160
elev = 
4.1931
slantRange = 
15.1070

Input Arguments

collapse all

Azimuth angles of one or more points in the local AER system, specified as a scalar, vector, matrix, or N-D array. Azimuths are measured clockwise from north. Specify values in degrees. To use values in radians, specify the angleUnit argument as 'radians'.

Data Types: single | double

Elevation angles of one or more points in the local AER system, specified as a scalar, vector, matrix, or N-D array. Specify elevations with respect to the xEast-yNorth plane that contains the local origin. If the local origin is on the surface of the spheroid, then the xEast-yNorth plane is tangent to the spheroid.

Specify values in degrees. To use values in radians, specify the angleUnit argument as 'radians'.

Data Types: single | double

Distances from the local origin, specified as a scalar, vector, matrix, or N-D array. Specify each distance as along a straight, 3-D, Cartesian line.

Data Types: single | double

Angle units, specified as 'degrees' (the default) or 'radians'.

Output Arguments

collapse all

ENU x-coordinates of one or more points in the local ENU system, returned as a scalar, vector, matrix, or N-D array. Values are returned in the same units as the slantRange argument.

ENU y-coordinates of one or more points in the local ENU system, returned as a scalar, vector, matrix, or N-D array. Values are returned in the same units as the slantRange argument.

ENU z-coordinates of one or more points in the local ENU system, returned as a scalar, vector, matrix, or N-D array. Values are returned in the same units as the slantRange argument.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2012b

expand all