.. _BskSim_scenarios_scenario_AttGuidance: scenario_AttGuidance ==================== Overview -------- This script sets up a 6-DOF spacecraft orbiting Earth. The goal of the scenario is to make use of the hill pointing module with the :ref:`mrpFeedback` module and a reaction wheel pyramid to control the attitude all within the new BSK_Sim architecture. The script is found in the folder ``xmera/examples/BskSim/scenarios`` and executed by using:: python3 scenario_AttGuidance.py The simulation mimics the basic simulation simulation in the earlier tutorial in :ref:`scenarioAttitudeGuidance`. The simulation layout is shown in the following illustration. .. image:: /_images/static/test_scenario_AttGuidance.svg :align: center The initial setup for the simulation closely models that of :ref:`scenario_FeedbackRW`. Custom Dynamics Configurations Instructions ------------------------------------------- The modules required for this scenario are identical to those used in :ref:`scenario_FeedbackRW`. Custom FSW Configurations Instructions -------------------------------------- Three of the four modules required to configure the :ref:`hillPoint` FSW mode have already been included within the :ref:`BSK_FSW` framework (``mrpFeedbackRWConfig()``, ``attTrackingErrorConfig()``, ``rwMotorTorqueConfig()``). The only remaining module is the hill pointing module itself which is set within ``__init__()``. These modules provide the initial setup for an attitude guidance system that makes use of an hill pointing model, a module that tracks the error of the spacecraft's MRP parameters against the vector pointing towards the central, planetary body, and uses a module that takes that information to provide a torque to correct for the error. This event is triggered when a user calls `self.masterSim.modeRequest = 'hillPoint'` in any current or future :ref:`Folder_BskSim` file. Illustration of Simulation Results ---------------------------------- :: showPlots = True .. image:: /_images/Scenarios/scenario_AttGuidance_attitudeErrorNorm.svg :align: center .. image:: /_images/Scenarios/scenario_AttGuidance_rwMotorTorque.svg :align: center .. image:: /_images/Scenarios/scenario_AttGuidance_rateError.svg :align: center .. image:: /_images/Scenarios/scenario_AttGuidance_orientation.svg :align: center