# ecef2nedv

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

## Syntax

``````[uNorth,vEast,wDown] = ecef2nedv(U,V,W,lat0,lon0)``````
``[___] = ecef2nedv(___,angleUnit)``

## Description

example

``````[uNorth,vEast,wDown] = ecef2nedv(U,V,W,lat0,lon0)``` returns vector components `uNorth`, `vEast`, and `wDown` in a local north-east-down (NED) 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. ```
````[___] = ecef2nedv(___,angleUnit)` specifies the units for latitude and longitude. Specify `angleUnit` as `'degrees'` (the default) or `'radians'`.```

## Examples

collapse all

Find the NED velocity components of an aircraft using its ECEF components.

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

```lat0 = 61.64; lon0 = 30.70; U = 530.2445; V = 492.1283; W = 396.3459;```

Calculate the NED components of the aircraft. The units for the NED components match the units for the ECEF components. Thus, the NED components are returned in kilometers per hour. The negative value of `wDown` means the aircraft is ascending.

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

Reverse the rotation using the `ned2ecefv` function.

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

## 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

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

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

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

## Version History

Introduced in R2012b

expand all