Main Content

ned2ecefv

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

Description

[U,V,W] = ned2ecefv(uNorth,vEast,wDown,lat0,lon0) returns vector components U, V, and W in a geocentric Earth-centered Earth-fixed (ECEF) system corresponding to vector components uNorth, vEast, and wDown in a local north-east-down (NED) 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.

example

[___] = ned2ecefv(___,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 an aircraft using its NED velocity components.

Specify the geodetic coordinates of the aircraft in degrees and the NED velocity components in kilometers per hour.

lat0 = 61.64;
lon0 = 30.70;

uNorth = -434.0403;
vEast = 152.4451;
wDown = -684.6964;

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

[U,V,W] = ned2ecefv(uNorth,vEast,wDown,lat0,lon0)
U = 
530.2445
V = 
492.1283
W = 
396.3459

Reverse the rotation using the ecef2nedv function.

[uNorth,vEast,wDown] = ecef2nedv(U,V,W,lat0,lon0)
uNorth = 
-434.0403
vEast = 
152.4451
wDown = 
-684.6964

Input Arguments

collapse all

NED x-components of one or more vectors in the local NED system, specified as a scalar value, vector, matrix, or N-D array.

Data Types: single | double

NED y-components of one or more vectors in the local NED system, specified as a scalar value, vector, matrix, or N-D array.

Data Types: single | double

NED z-components of one or more vectors in the local NED system, 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

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 uNorth, vEast, and wDown.

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 uNorth, vEast, and wDown.

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 uNorth, vEast, and wDown.

Tips

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

Extended Capabilities

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

Version History

Introduced in R2012b

expand all