ADCS.orbits.ephemeris module

class ADCS.orbits.ephemeris.Ephemeris(filepath=None)[source]

Bases: object

High-precision planetary ephemeris interface based on Skyfield.

This class provides a unified interface for loading and accessing high-precision planetary ephemerides using the Skyfield library. It manages the retrieval, storage, and initialization of the JPL DE421 ephemeris file and exposes commonly used celestial bodies such as the Earth and the Sun.

The ephemeris data are represented in the International Celestial Reference Frame (ICRF), enabling precise position and velocity computations required for orbital dynamics, attitude determination, and navigation applications.

Mathematical Background

A planetary ephemeris provides the barycentric position and velocity of solar system bodies as continuous functions of time:

\[\mathbf{r}_i(t), \; \mathbf{v}_i(t) \quad \forall i \in \{\text{Sun, Earth, Moon, planets}\}\]

where \(\mathbf{r}_i\) and \(\mathbf{v}_i\) are expressed in the ICRF frame. These quantities are derived from numerical integration of the N-body equations of motion:

\[\ddot{\mathbf{r}}_i = \sum_{j \neq i} G m_j \frac{\mathbf{r}_j - \mathbf{r}_i} {\lVert \mathbf{r}_j - \mathbf{r}_i \rVert^3},\]

with relativistic and empirical corrections applied in the JPL models.

The DE421 ephemeris is valid over the time span:

\[1900 \le t \le 2050,\]

and provides sufficient accuracy for most Earth-orbiting spacecraft analyses.

param filepath:

Optional path to a pre-downloaded JPL DE421 ephemeris file. If None, a default location under ADCS/environment/de421.bsp is used.

type filepath:

pathlib.Path | None

raises RuntimeError:

If the ephemeris file cannot be downloaded or loaded.

Note

This class internally initializes a shared Skyfield Ephemeris timescale object, which should be reused across all time-dependent orbital computations to ensure consistency.

Parameters:

filepath (Path | None)