Quickstart¶
Installation¶
Ephemerista is distributed on PyPI and can be installed via pip
.
# Create new virtual environment
python -m venv .venv
source .venv/bin/activate
# Install Ephemerista
pip install ephemerista
Obtain Required Data¶
Ephemerista requires the following data at runtime:
Earth orientation parameters from the IERS: finals2000A.all.csv
Planetary ephemerides in SPK format, e.g. de44s.bsp
An Orekit data package: orekit-data-master.zip
Alternatively, the Orekit data can be installed as a Python package via
pip
, see here.
Initialise Ephemerista¶
Call the ephemerista.init
function before using any other Ephemerista functionality and provide the paths to the required data files.
import ephemerista
EOP_PATH = ... # e.g. finals2000A.all.csv
SPK_PATH = ... # e.g. de440s.bsp
OREKIT_DATA_PATH = ... # e.g. orekit-data-master.zip
ephemerista.init(eop_path=EOP_PATH, spk_path=SPK_PATH, orekit_data=OREKIT_DATA_PATH)
If the Orekit data package was installed via package manager the orekit_data
parameter can be omitted.
Use Ephemerista¶
Propagate the orbit of the ISS with Ephemerista.
import ephemerista
from ephemerista.propagators.sgp4 import SGP4
from ephemerista.time import TimeDelta
# Propgate the trajectory
iss_tle = """ISS (ZARYA)
1 25544U 98067A 24187.33936543 -.00002171 00000+0 -30369-4 0 9995
2 25544 51.6384 225.3932 0010337 32.2603 75.0138 15.49573527461367"""
propagator = SGP4(tle=iss_tle)
start_time = propagator.time
end_time = start_time + TimeDelta.from_hours(6)
times = start_time.trange(end_time, step=float(TimeDelta.from_minutes(1)))
trajectory = propagator.propagate(times)