# ecef2eci

Position and velocity vectors in Earth-centered inertial mean-equator mean-equinox

## Description

example

[r_eci] = ecef2eci(utc,r_ecef) calculates the position vector in the Earth-centered inertial mean-equator mean-equinox (J2000) coordinate system for a given position vector in the Earth-centered Earth-fixed (ECEF) coordinate system at a specific Universal Coordinated Time (UTC).

[r_eci,v_eci] = ecef2eci(___,v_ecef) calculates the position and velocity vectors for given position and velocity vectors.

[r_eci,v_eci,a_eci] = ecef2eci(___,a_ecef) calculates the position, velocity, acceleration vectors for given position, velocity, and acceleration vectors.

[r_eci,v_eci,a_eci] = ecef2eci(___,Name,Value) calculates the position, velocity, and acceleration vectors at a higher precision using Earth orientation parameters.

## Examples

collapse all

Convert the Earth-centered Earth-fixed (ECEF) position and velocity to Earth-centered inertial (ECI) at 12:00 on January 4, 2019.

r_ecef = [-5762640 -1682738 3156028];
v_ecef = [3832 -4024 4837];
utc = [2019 1 4 12 0 0];
[r_eci, v_eci] = ecef2eci(utc, r_ecef, v_ecef);
r_eci =
1.0e+06 *
-2.9818
5.2070
3.1616

v_eci =
1.0e+03 *
-3.3837
-4.8870
4.8430

Convert the ECEF position to ECI at 12:00 on January 4, 2019, including the effects of polar motion.

r_ecef = [-5762640 -1682738 3156028];
utc = [2019 1 4 12 0 0];
mjd = mjuliandate(utc);
pm = polarMotion(mjd, 'action', 'none')*180/pi;
r_eci = ecef2eci(utc, r_ecef, 'pm', pm);
r_eci =
1.0e+06 *
-2.9818
5.2070
3.1616

## Input Arguments

collapse all

Universal Coordinated Time (UTC) in the order year, month, day, hour, minutes, and seconds, specified as 1-by-6 array of UTC values:

Time ValueEnter
YearDouble value that is a whole number greater than 1, such as 2013.
MonthDouble value that is a whole number greater than 0, within the range 1 to 12.
DayDouble value that is a whole number greater than 0, within the range 1 to 31.
HourDouble value that is a whole number greater than 0, within the range 1 to 24.
Minute and secondDouble value that is a whole number greater than 0, within the range 1 to 60.

Example: [2000 1 12 4 52 12.4]

Data Types: double

Array of Earth-centered Earth-fixed position components, specified as a 3-by-1 array.

Data Types: double

Earth-centered Earth-fixed velocity components, specified as a 3-by-1 array.

Data Types: double

Earth-centered Earth-fixed acceleration components, specified as a 3-by-1 array.

Data Types: double

### Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'dUT1',0.234

Difference between International Atomic Time (TAI) and Universal Coordinated Time (UTC), specified as a scalar, in seconds.

Example: 32

Data Types: double

Difference between UTC and Universal Time (UT1), specified as a scalar, in seconds.

Example: 0.234

Data Types: double

Polar displacements due to the motion of Earth crust along the x- and y-axis, in degrees.

Tip

To calculate the displacement, use the polarMotion function.

Example: pm = polarMotion(mjd, 'action', 'none')*180/pi;

Data Types: double

Adjustment to the location of the Celestial Intermediate Pole (CIP), in degrees, specified as a comma-separated pair consisting of dCIP and an M-by-2 array. This location (dDeltaX, dDeltaY) is along the x- and y- axes. By default, this function assumes a 1-by-2 array of zeroes.

For historical values, see the International Earth Rotation and Reference Systems Service Web site (https://www.iers.org) and navigate to the Earth orientation data Data/Products page.

• M-by-2 array

Specify an M-by-2 array of location adjustment values, where M is the number of direction cosine or transformation matrices to be converted. Each row corresponds to one set of dDeltaX and dDeltaY values.

Example: [-0.2530e-6 -0.0188e-6]

Data Types: double

Excess length of day (difference between astronomically determined duration of day and 86400 SI seconds), specified as a scalar, in seconds.

Example: 32

Data Types: double

## Output Arguments

collapse all

Earth-centered inertial mean-equator mean-equinox (J2000) position components, specified as a 3-by-1 array.

Earth-centered inertial mean-equator mean-equinox (J2000) velocity components, specified as a 3-by-1 array.

Earth-centered inertial mean-equator mean-equinox (J2000) acceleration components, specified as a 3-by-1 array.

## Limitations

The ecef2eci function is available only by installing the Aerospace Blockset™ CubeSat Simulation Library from the Add-On Explorer.

## References

[1] Vallado, D. A. Fundamentals of Astrodynamics and Applications. alg. 4. New York: McGraw-Hill, 1997.