Main Content

# ecef2enuv

Rotate geocentric Earth-centered Earth-fixed vector to local east-north-up

## Description

example

[uEast,vNorth,wUp] = ecef2enuv(U,V,W,lat0,lon0) returns vector components uEast, vNorth, and wUp in a local east-north-up (ENU) system corresponding to vector components U, V, and W in a geocentric Earth-centered Earth-fixed (ECEF) system. Specify the origin of the system with the geodetic coordinates lat0 and lon0. Each coordinate input argument must match the others in size or be scalar.

[___] = ecef2enuv(___,angleUnit) specifies the units for latitude and longitude. Specify angleUnit as 'degrees' (the default) or 'radians'.

## Examples

collapse all

Find the ENU velocity components of a ground vehicle using its ECEF velocity components.

Specify the geodetic coordinates of the vehicle in degrees and the ECEF velocity components in kilometers per hour.

lat0 = 17.4114;
lon0 = 78.2700;

U = 27.9799;
V = -1.0990;
W = -15.7723;

Calculate the ENU components of the vehicle. The units for the ENU components match the units for the ECEF components. Thus, the ENU components are returned in kilometers per hour. The rotation performed by ecef2enuv does not affect the speed of the vehicle.

[uEast,vNorth,wUp] = ecef2enuv(U,V,W,lat0,lon0)
uEast = -27.6190
vNorth = -16.4298
wUp = -0.3186

Reverse the rotation using the enu2ecefv function.

[U,V,W] = enu2ecefv(uEast,vNorth,wUp,lat0,lon0)
U = 27.9799
V = -1.0990
W = -15.7723

## Input Arguments

collapse all

ECEF x-components of one or more vectors, specified as a scalar value, vector, matrix, or N-D array.

Data Types: single | double

ECEF y-components of one or more vectors, specified as a scalar value, vector, matrix, or N-D array.

Data Types: single | double

ECEF z-components of one or more vectors, specified as a scalar value, vector, matrix, or N-D array.

Data Types: single | double

Geodetic latitude of the local origin, specified as a scalar, vector, matrix, or N-D array. The local origin can refer to one point or a series of points (for example, a moving platform). Specify the values in degrees. To use values in radians, specify the angleUnit argument as 'radians'.

Data Types: single | double

Geodetic longitude of the local origin, specified as a scalar, vector, matrix, or N-D array. The local origin can refer to one point or a series of points (for example, a moving platform). Specify the values in degrees. To use values in radians, specify the angleUnit argument as 'radians'.

Data Types: single | double

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

## Output Arguments

collapse all

ENU x-components of one or more vectors, returned as a scalar value, vector, matrix, or N-D array. Values are returned in the units specified by U, V, and W.

ENU y-components of one or more vectors, returned as a scalar value, vector, matrix, or N-D array. Values are returned in the units specified by U, V, and W.

ENU z-components of one or more vectors, returned as a scalar value, vector, matrix, or N-D array. Values are returned in the units specified by U, V, and W.

## Tips

To transform coordinate locations instead of vectors, use the ecef2enu function.

## Version History

Introduced in R2012b

expand all