Orbit and attitude manipulationΒΆ

In irfpy.aspera, the orbit (position and velocity) of spacecraft is supported, with a help of SPICE (link here) and its Python binding, spiceypy (link here). irfpy.mexpvat.mexspice and irfpy.vexpvat.vexspice modules provide useful functions to obtain the orbit.

The spacecraft attitude and sensor field-of-view is also possible to obtain, but it is more advanced.

Checking setup

One may see the following if the setup is correctly done.

>>> import spiceypy

If you get no output with this command, SpiceyPy is successfully installed. If you see import error as below, the installation of SpiceyPy has been failed.

>>> import spiceypy
ImportError: No module named 'spiceypy'

In such a case, you can try the following from a shell.

% pip install "git+https://github.com/AndrewAnnex/SpiceyPy.git"


Experienced users of SPICE are able to call SPICE functions directly from ipython. See the excellent project of Python bindings of SPICE, SpiceyPy, for details.