enu2ecefv

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

Description

example

[U,V,W] = enu2ecefv(uEast,vNorth,wUp,lat0,lon0) returns vector components U, V, and W in a geocentric Earth-centered Earth-fixed (ECEF) system corresponding to vector components uEast, vNorth, and wUp in a local east-north-up (ENU) 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.

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

Examples

collapse all

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

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

lat0 = 17.41;
lon0 = 78.27;

uEast = -27.6190;
vNorth = -16.4298;
wUp = -0.3186;

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

[U,V,W] = enu2ecefv(uEast,vNorth,wUp,lat0,lon0)
U = 27.9798
V = -1.0993
W = -15.7724

Reverse the rotation using the ecef2enuv function.

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

Input Arguments

collapse all

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

Data Types: single | double

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

Data Types: single | double

ENU 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

Units of angles, specified as 'degrees' (the default) or 'radians'.

Data Types: char | string

Output Arguments

collapse all

ECEF 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 uEast, vNorth, and wUp.

ECEF 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 uEast, vNorth, and wUp.

ECEF 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 uEast, vNorth, and wUp.

Tips

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

Introduced in R2012b