Frames¶
Frame transformations.
This sub-module provides functions for converting between common coordinate frames used in astrodynamics:
- GCRF-ITRF transformations: converting between the Geocentric Celestial Reference Frame and the International Terrestrial Reference Frame using the full IAU 2006/2000A CIO-based model (bias-precession-nutation, Earth rotation angle, and polar motion).
- TEME transformations: converting SGP4 output (TEME frame) to PEF, ITRF, and GCRF via GMST rotation and polar motion.
- Ecliptic-ICRF transformations: converting between the ecliptic coordinate frame and ICRF via a fixed rotation by the J2000 mean obliquity.
- ECI-ECEF aliases: backward-compatible names mapping to GCRF/ITRF functions.
bias_precession_nutation(eop, epc)
¶
Compute the bias-precession-nutation matrix (GCRF -> CIRS).
Uses the IAU 2006/2000A CIO-based model with dX/dY corrections from EOP data applied to the CIP coordinates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
eop
|
EOPData
|
EOP data providing dX, dY celestial pole offsets. |
required |
epc
|
Epoch
|
Epoch (UTC). |
required |
Returns:
| Type | Description |
|---|---|
Array
|
3x3 rotation matrix (GCRF -> CIRS). |
earth_rotation(eop, epc)
¶
Compute the Earth rotation matrix at the given epoch.
This is the full IAU 2006/2000A GCRF -> ITRF rotation combining
bias-precession-nutation, Earth rotation angle, and polar motion.
Equivalent to :func:rotation_gcrf_to_itrf.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
eop
|
EOPData
|
EOP data. |
required |
epc
|
Epoch
|
Epoch (UTC). |
required |
Returns:
| Type | Description |
|---|---|
Array
|
3x3 Earth rotation matrix (GCRF -> ITRF). |
earth_rotation_angle(eop, epc)
¶
Compute the Earth rotation matrix (CIRS -> TIRS).
Uses the IAU 2000 Earth Rotation Angle with UT1 time from EOP data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
eop
|
EOPData
|
EOP data providing UT1-UTC offset. |
required |
epc
|
Epoch
|
Epoch (UTC). |
required |
Returns:
| Type | Description |
|---|---|
Array
|
3x3 Earth rotation matrix. |
polar_motion(eop, epc)
¶
Compute the polar motion matrix (TIRS -> ITRF).
Uses polar motion parameters from EOP data and the TIO locator s'.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
eop
|
EOPData
|
EOP data providing pm_x, pm_y polar motion parameters. |
required |
epc
|
Epoch
|
Epoch (UTC). |
required |
Returns:
| Type | Description |
|---|---|
Array
|
3x3 polar motion matrix. |
rotation_ecef_to_eci(eop, epc)
¶
rotation_eci_to_ecef(eop, epc)
¶
rotation_ecliptic_to_icrf()
¶
rotation_gcrf_to_itrf(eop, epc)
¶
Compute the full 3x3 rotation matrix from GCRF to ITRF.
Combines polar motion, Earth rotation, and bias-precession-nutation:
R = PM @ ER @ BPN
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
eop
|
EOPData
|
EOP data. |
required |
epc
|
Epoch
|
Epoch (UTC). |
required |
Returns:
| Type | Description |
|---|---|
Array
|
3x3 rotation matrix (GCRF -> ITRF). |
Examples:
rotation_icrf_to_ecliptic()
¶
Compute the 3x3 rotation matrix from ICRF to ecliptic.
Returns the matrix Rx(ε) where ε is the J2000 mean obliquity.
This is the transpose of :func:rotation_ecliptic_to_icrf.
Returns:
| Type | Description |
|---|---|
Array
|
3x3 rotation matrix (ICRF -> ecliptic). |
Examples:
rotation_itrf_to_gcrf(eop, epc)
¶
rotation_itrf_to_teme(eop, epc)
¶
rotation_pef_to_teme(epc)
¶
Compute the 3x3 rotation matrix from PEF to TEME.
Transpose of :func:rotation_teme_to_pef.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc
|
Epoch
|
Epoch (UTC). |
required |
Returns:
| Type | Description |
|---|---|
Array
|
3x3 rotation matrix (PEF -> TEME). |
rotation_teme_to_itrf(eop, epc)
¶
Compute the 3x3 rotation matrix from TEME to ITRF.
Combines GMST rotation and polar motion:
R = PM @ Rz(GMST)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
eop
|
EOPData
|
EOP data providing polar motion parameters. |
required |
epc
|
Epoch
|
Epoch (UTC). |
required |
Returns:
| Type | Description |
|---|---|
Array
|
3x3 rotation matrix (TEME -> ITRF). |
rotation_teme_to_pef(epc)
¶
Compute the 3x3 rotation matrix from TEME to PEF.
Applies Rz(GMST) to rotate from the mean equinox frame to the
pseudo Earth-fixed frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc
|
Epoch
|
Epoch (UTC). |
required |
Returns:
| Type | Description |
|---|---|
Array
|
3x3 rotation matrix (TEME -> PEF). |
state_ecef_to_eci(eop, epc, x_ecef)
¶
Transform a 6-element state vector from ECEF (ITRF) to ECI (GCRF).
Alias for :func:state_itrf_to_gcrf.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
eop
|
EOPData
|
EOP data. |
required |
epc
|
Epoch
|
Epoch (UTC). |
required |
x_ecef
|
ArrayLike
|
6-element ECEF state |
required |
Returns:
| Type | Description |
|---|---|
Array
|
6-element ECI state |
state_eci_to_ecef(eop, epc, x_eci)
¶
Transform a 6-element state vector from ECI (GCRF) to ECEF (ITRF).
Alias for :func:state_gcrf_to_itrf.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
eop
|
EOPData
|
EOP data. |
required |
epc
|
Epoch
|
Epoch (UTC). |
required |
x_eci
|
ArrayLike
|
6-element ECI state |
required |
Returns:
| Type | Description |
|---|---|
Array
|
6-element ECEF state |
state_ecliptic_to_icrf(x_ecl)
¶
Transform a 6-element state vector from ecliptic to ICRF.
Both position and velocity are rotated identically (no Coriolis correction) since both frames are inertial.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x_ecl
|
ArrayLike
|
6-element ecliptic state |
required |
Returns:
| Type | Description |
|---|---|
Array
|
6-element ICRF state |
Examples:
state_gcrf_to_itrf(eop, epc, x_gcrf)
¶
Transform a 6-element state vector from GCRF to ITRF.
Position is rotated directly. Velocity includes the correction for Earth's rotation (Coriolis effect):
.. math::
\mathbf{r}_{\text{ITRF}} &= PM \cdot ER \cdot BPN \cdot
\mathbf{r}_{\text{GCRF}} \\
\mathbf{v}_{\text{ITRF}} &= PM \cdot \left(
ER \cdot BPN \cdot \mathbf{v}_{\text{GCRF}}
- \boldsymbol{\omega} \times (ER \cdot BPN \cdot
\mathbf{r}_{\text{GCRF}}) \right)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
eop
|
EOPData
|
EOP data. |
required |
epc
|
Epoch
|
Epoch (UTC). |
required |
x_gcrf
|
ArrayLike
|
6-element GCRF state |
required |
Returns:
| Type | Description |
|---|---|
Array
|
6-element ITRF state |
state_gcrf_to_teme(eop, epc, x_gcrf)
¶
Transform a 6-element state vector from GCRF to TEME.
Chains GCRF -> ITRF -> TEME.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
eop
|
EOPData
|
EOP data. |
required |
epc
|
Epoch
|
Epoch (UTC). |
required |
x_gcrf
|
ArrayLike
|
6-element GCRF state |
required |
Returns:
| Type | Description |
|---|---|
Array
|
6-element TEME state |
state_icrf_to_ecliptic(x_icrf)
¶
Transform a 6-element state vector from ICRF to ecliptic.
Both position and velocity are rotated identically (no Coriolis correction) since both frames are inertial.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x_icrf
|
ArrayLike
|
6-element ICRF state |
required |
Returns:
| Type | Description |
|---|---|
Array
|
6-element ecliptic state |
Examples:
state_itrf_to_gcrf(eop, epc, x_itrf)
¶
Transform a 6-element state vector from ITRF to GCRF.
Applies the inverse of :func:state_gcrf_to_itrf.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
eop
|
EOPData
|
EOP data. |
required |
epc
|
Epoch
|
Epoch (UTC). |
required |
x_itrf
|
ArrayLike
|
6-element ITRF state |
required |
Returns:
| Type | Description |
|---|---|
Array
|
6-element GCRF state |
state_itrf_to_teme(eop, epc, x_itrf)
¶
Transform a 6-element state vector from ITRF to TEME.
Inverse of :func:state_teme_to_itrf.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
eop
|
EOPData
|
EOP data. |
required |
epc
|
Epoch
|
Epoch (UTC). |
required |
x_itrf
|
ArrayLike
|
6-element ITRF state |
required |
Returns:
| Type | Description |
|---|---|
Array
|
6-element TEME state |
state_pef_to_teme(epc, x_pef)
¶
Transform a 6-element state vector from PEF to TEME.
Inverse of :func:state_teme_to_pef.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc
|
Epoch
|
Epoch (UTC). |
required |
x_pef
|
ArrayLike
|
6-element PEF state |
required |
Returns:
| Type | Description |
|---|---|
Array
|
6-element TEME state |
state_teme_to_gcrf(eop, epc, x_teme)
¶
Transform a 6-element state vector from TEME to GCRF.
Chains TEME -> ITRF -> GCRF using the existing ITRF-GCRF transformation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
eop
|
EOPData
|
EOP data. |
required |
epc
|
Epoch
|
Epoch (UTC). |
required |
x_teme
|
ArrayLike
|
6-element TEME state |
required |
Returns:
| Type | Description |
|---|---|
Array
|
6-element GCRF state |
state_teme_to_itrf(eop, epc, x_teme)
¶
Transform a 6-element state vector from TEME to ITRF.
Goes via PEF: applies GMST rotation and omega correction, then applies polar motion (position only, PM has negligible velocity effect).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
eop
|
EOPData
|
EOP data providing polar motion parameters. |
required |
epc
|
Epoch
|
Epoch (UTC). |
required |
x_teme
|
ArrayLike
|
6-element TEME state |
required |
Returns:
| Type | Description |
|---|---|
Array
|
6-element ITRF state |
state_teme_to_pef(epc, x_teme)
¶
Transform a 6-element state vector from TEME to PEF.
Velocity includes the Earth-rotation correction:
v_pef = R @ v_teme - omega_earth x r_pef
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc
|
Epoch
|
Epoch (UTC). |
required |
x_teme
|
ArrayLike
|
6-element TEME state |
required |
Returns:
| Type | Description |
|---|---|
Array
|
6-element PEF state |