.. _scenarioSpiceSpacecraft: scenarioSpiceSpacecraft ======================= .. raw:: html Overview -------- Demonstrates how to use :ref:`spiceInterface` to load a Spice kernel with the Hubble orbital information and use the corresponding :ref:`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 :ref:`scenarioAttitudeFeedback`. The script is found in the folder ``xmera/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 :ref:`spacecraft` as the :ref:`transRefMsgPayload` input message must be properly setup before initializing the spacecraft module which reads this in during ``reset()``. .. image:: /_images/static/test_scenarioSpiceSpacecraft.svg :align: center 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 .. image:: /_images/Scenarios/scenarioSpiceSpacecraft1.svg :align: center .. image:: /_images/Scenarios/scenarioSpiceSpacecraft2.svg :align: center