scenarioSpiceSpacecraft

Overview

Demonstrates how to use Module: spiceInterface to load a Spice kernel with the Hubble orbital information and use the corresponding TransRefMsgPayload output message to specify the spacecraft motion. With this approach the spacecraft attitude is still dynamic and can achieve the same inertial pointing goal as setup in scenarioAttitudeFeedback.

The script is found in the folder basilisk/examples and executed by using:

python3 scenarioSpiceSpacecraft.py

The simulation layout is shown in the following illustration. Note that here the spiceInterface module must be executed prior to Module: spacecraft as the TransRefMsgPayload input message must be properly setup before initializing the spacecraft module which reads this in during Reset().

../_images/test_scenarioSpiceSpacecraft.svg

When the simulation completes 2 plots are shown for the MRP attitude tracking error history, as well as the Hubble inertial orbital coordinates with respect to the Earth.

Illustration of Simulation Results

show_plots = True
../_images/scenarioSpiceSpacecraft1.svg ../_images/scenarioSpiceSpacecraft2.svg
scenarioSpiceSpacecraft.run(show_plots)[source]

The scenarios can be run with the followings setups parameters:

Parameters:

show_plots (bool) – Determines if the script should display plots