ECI to ECEF ConverterΒΆ

Convert Earth-Centered Inertial (ECI) to Earth-Centered, Earth-Fixed (ECEF) coordinates.

from ostk.physics.time import Scale
from ostk.physics.time import Instant
from ostk.physics.time import DateTime
from ostk.physics.coordinate import Frame
<frozen importlib._bootstrap>:241: FutureWarning: pybind11-bound class 'ostk.physics.coordinate.frame.provider.Dynamic' is using an old-style placement-new '__init__' which has been deprecated. See the upgrade guide in pybind11's docs. This message is only visible when compiled in debug mode.

eci = Frame.GCRF()  # Geocentric Celestial Reference Frame (GCRF)
# eci = Frame.MOD(Instant.date_time(DateTime(2020, 10, 31, 0, 0, 0), Scale.UTC))  # Mean of Date (MOD) frame
# eci = Frame.TOD(Instant.date_time(DateTime(2020, 10, 31, 0, 0, 0), Scale.UTC))  # True of Date (TOD) frame
# eci = Frame.TEME()  # True Equator, Mean Equinox (TEME) frame
ecef = Frame.ITRF()  # International Terrestrial Reference Frame (ITRF)
instant = Instant.date_time(DateTime(2020, 10, 31, 0, 0, 0), Scale.UTC)
transform_ECEF_ECI = eci.get_transform_to(ecef, instant)
Locking local repository [/var/cache/open-space-toolkit-data/data/manifest]...
Fetching Data Manifest from [https://github.com/open-space-collective/open-space-toolkit-data/raw/v1/data/manifest.json]...
Unlocking local repository [/var/cache/open-space-toolkit-data/data/manifest]...
Data Manifest [/var/cache/open-space-toolkit-data/data/manifest/manifest.json] has been successfully fetched from [https://github.com/open-space-collective/open-space-toolkit-data/raw/v1/data/manifest.json].
x_ECI = (1.0, 0.0, 0.0)
v_ECI = (1.0, 0.0, 0.0)
x_ECEF = transform_ECEF_ECI.apply_to_position(x_ECI)
v_ECEF = transform_ECEF_ECI.apply_to_velocity(x_ECI, v_ECI)
print(f"x_ECEF = {x_ECEF}")
print(f"v_ECEF = {v_ECEF}")
x_ECEF = [ 0.77172317 -0.63595551  0.00198653]
v_ECEF = [ 0.77167679 -0.63601178  0.00198653]