Skip to content

Reference Frames

Coordinate reference frames and ephemeris data.

Supported Frames

Abbreviation Name Description
ICRF International Celestial Reference Frame Inertial frame
ECLIPJ2000 Ecliptic J2000 Ecliptic plane at J2000
IAU_EARTH IAU Earth Earth body-fixed frame
ITRF International Terrestrial Reference Frame Earth-fixed

Quick Example

import lox_space as lox

# Create a frame
icrf = lox.Frame("ICRF")
itrf = lox.Frame("ITRF")

# Load ephemeris data
spk = lox.SPK("/path/to/de440.bsp")

# Transform states between frames
state_icrf = state.to_frame(itrf, provider=eop_provider)

# Transform between origins
state_moon = state.to_origin(lox.Origin("Moon"), spk)

Frame

Represents a reference frame for positioning and transformations.

Supported frames: - ICRF: International Celestial Reference Frame (inertial) - GCRF: Geocentric Celestial Reference Frame (inertial, Earth-centered) - CIRF: Celestial Intermediate Reference Frame - TIRF: Terrestrial Intermediate Reference Frame - ITRF: International Terrestrial Reference Frame (Earth-fixed) - Body-fixed frames: IAU_EARTH, IAU_MOON, IAU_MARS, etc.

Parameters:

  • abbreviation

    Frame abbreviation (e.g., "ICRF", "ITRF", "IAU_MOON").

Raises:

  • ValueError

    If the frame abbreviation is not recognized.

Examples:

>>> icrf = lox.Frame("ICRF")
>>> itrf = lox.Frame("ITRF")

Methods:

  • abbreviation

    Return the abbreviation of this reference frame.

  • name

    Return the full name of this reference frame.

abbreviation

abbreviation() -> str

Return the abbreviation of this reference frame.

name

name() -> str

Return the full name of this reference frame.


SPK

SPICE SPK (Spacecraft and Planet Kernel) ephemeris data.

SPK files contain position and velocity data for celestial bodies and spacecraft. They are used for orbit propagation, frame transformations, and visibility analysis.

Parameters:

  • path

    Path to the SPK file (.bsp).

Raises:

  • ValueError

    If the file cannot be parsed or is invalid.

  • OSError

    If the file cannot be read.

Examples:

>>> spk = lox.SPK("/path/to/de440.bsp")