Skip to content

ECI ↔ ECEF Transformations

Generic transformations using common "Earth-Centered Inertial" and "Earth-Centered Earth-Fixed" naming convention. Currently maps to GCRF ↔ ITRF transformations.

Note

For conceptual explanations and examples, see ECI ↔ ECEF Transformations in the Learn section.

ECI to ECEF

state_eci_to_ecef builtin

state_eci_to_ecef(epc: Epoch, x_eci: Union[ndarray, List]) -> ndarray

Transforms a state vector (position and velocity) from the Earth Centered Inertial (ECI/GCRF) frame to the Earth Centered Earth Fixed (ECEF/ITRF) frame.

This function is an alias for state_gcrf_to_itrf. Applies the full IAU 2006/2000A transformation including bias, precession, nutation, Earth rotation, and polar motion corrections using global Earth orientation parameters. The velocity transformation accounts for the Earth's rotation rate.

Parameters:

Name Type Description Default
epc Epoch

Epoch instant for the transformation

required
x_eci ndarray or list

State vector in ECI frame [position (m), velocity (m/s)], shape (6,)

required

Returns:

Type Description
ndarray

numpy.ndarray: State vector in ECEF frame [position (m), velocity (m/s)], shape (6,)

Example
import brahe as bh
import numpy as np

# Create epoch
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)

# State vector in ECI [x, y, z, vx, vy, vz] (meters, m/s)
state_eci = np.array([bh.R_EARTH + 500e3, 0.0, 0.0, 0.0, 7600.0, 0.0])

# Transform to ECEF
state_ecef = bh.state_eci_to_ecef(epc, state_eci)
print(f"ECEF state: {state_ecef}")

rotation_eci_to_ecef builtin

rotation_eci_to_ecef(epc: Epoch) -> ndarray

Computes the combined rotation matrix from the inertial to the Earth-fixed reference frame. Applies corrections for bias, precession, nutation, Earth-rotation, and polar motion.

This function is an alias for rotation_gcrf_to_itrf. ECI refers to the GCRF (Geocentric Celestial Reference Frame) implementation, and ECEF refers to the ITRF (International Terrestrial Reference Frame) implementation.

Parameters:

Name Type Description Default
epc Epoch

Epoch instant for computation of transformation matrix

required

Returns:

Type Description
ndarray

numpy.ndarray: 3x3 rotation matrix transforming ECI (GCRF) -> ECEF (ITRF)

Example
import brahe as bh
import numpy as np

# Create epoch
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)

# Get rotation matrix
R = bh.rotation_eci_to_ecef(epc)
print(f"Rotation matrix shape: {R.shape}")
# Output: Rotation matrix shape: (3, 3)

position_eci_to_ecef builtin

position_eci_to_ecef(epc: Epoch, x: Union[ndarray, List]) -> ndarray

Transforms a position vector from the Earth Centered Inertial (ECI/GCRF) frame to the Earth Centered Earth Fixed (ECEF/ITRF) frame.

This function is an alias for position_gcrf_to_itrf. Applies the full IAU 2006/2000A transformation including bias, precession, nutation, Earth rotation, and polar motion corrections using global Earth orientation parameters.

Parameters:

Name Type Description Default
epc Epoch

Epoch instant for the transformation

required
x ndarray or list

Position vector in ECI frame (m), shape (3,)

required

Returns:

Type Description
ndarray

numpy.ndarray: Position vector in ECEF frame (m), shape (3,)

Example
import brahe as bh
import numpy as np

# Create epoch
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)

# Position vector in ECI (meters)
r_eci = np.array([7000000.0, 0.0, 0.0])

# Transform to ECEF
r_ecef = bh.position_eci_to_ecef(epc, r_eci)
print(f"ECEF position: {r_ecef}")

ECEF to ECI

state_ecef_to_eci builtin

state_ecef_to_eci(epc: Epoch, x_ecef: Union[ndarray, List]) -> ndarray

Transforms a state vector (position and velocity) from the Earth Centered Earth Fixed (ECEF/ITRF) frame to the Earth Centered Inertial (ECI/GCRF) frame.

This function is an alias for state_itrf_to_gcrf. Applies the full IAU 2006/2000A transformation including bias, precession, nutation, Earth rotation, and polar motion corrections using global Earth orientation parameters. The velocity transformation accounts for the Earth's rotation rate.

Parameters:

Name Type Description Default
epc Epoch

Epoch instant for the transformation

required
x_ecef ndarray or list

State vector in ECEF frame [position (m), velocity (m/s)], shape (6,)

required

Returns:

Type Description
ndarray

numpy.ndarray: State vector in ECI frame [position (m), velocity (m/s)], shape (6,)

Example
import brahe as bh
import numpy as np

# Create epoch
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)

# State vector in ECEF [x, y, z, vx, vy, vz] (meters, m/s)
state_ecef = np.array([4000000.0, 3000000.0, 4000000.0, 100.0, -50.0, 200.0])

# Transform to ECI
state_eci = bh.state_ecef_to_eci(epc, state_ecef)
print(f"ECI state: {state_eci}")

rotation_ecef_to_eci builtin

rotation_ecef_to_eci(epc: Epoch) -> ndarray

Computes the combined rotation matrix from the Earth-fixed to the inertial reference frame. Applies corrections for bias, precession, nutation, Earth-rotation, and polar motion.

This function is an alias for rotation_itrf_to_gcrf. ECEF refers to the ITRF (International Terrestrial Reference Frame) implementation, and ECI refers to the GCRF (Geocentric Celestial Reference Frame) implementation.

Parameters:

Name Type Description Default
epc Epoch

Epoch instant for computation of transformation matrix

required

Returns:

Type Description
ndarray

numpy.ndarray: 3x3 rotation matrix transforming ECEF (ITRF) -> ECI (GCRF)

Example
1
2
3
4
5
6
7
8
import brahe as bh

# Create epoch
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)

# Get rotation matrix from ECEF to ECI
R = bh.rotation_ecef_to_eci(epc)
print(f"Rotation matrix shape: {R.shape}")

position_ecef_to_eci builtin

position_ecef_to_eci(epc: Epoch, x: Union[ndarray, List]) -> ndarray

Transforms a position vector from the Earth Centered Earth Fixed (ECEF/ITRF) frame to the Earth Centered Inertial (ECI/GCRF) frame.

This function is an alias for position_itrf_to_gcrf. Applies the full IAU 2006/2000A transformation including bias, precession, nutation, Earth rotation, and polar motion corrections using global Earth orientation parameters.

Parameters:

Name Type Description Default
epc Epoch

Epoch instant for the transformation

required
x ndarray or list

Position vector in ECEF frame (m), shape (3,)

required

Returns:

Type Description
ndarray

numpy.ndarray: Position vector in ECI frame (m), shape (3,)

Example
import brahe as bh
import numpy as np

# Create epoch
epc = bh.Epoch.from_datetime(2024, 1, 1, 12, 0, 0.0, 0.0, bh.TimeSystem.UTC)

# Position in ECEF (ground station)
r_ecef = np.array([4000000.0, 3000000.0, 4000000.0])

# Transform to ECI
r_eci = bh.position_ecef_to_eci(epc, r_ecef)
print(f"ECI position: {r_eci}")

See Also