.. _scenarioTAM: scenarioTAM =========== Overview -------- Demonstrates how to add a Three-Axis Magnetometer (TAM) sensor to a spacecraft. This script sets up a 3-DOF spacecraft which is orbiting a planet with a magnetic field. The orbit setup is similar to that used in :ref:`scenarioBasicOrbit`. The script is found in the folder ``xmera/examples`` and executed by using:: python3 scenarioTAM.py Simulation Scenario Setup Details --------------------------------- The simulation layout is shown in the following illustration. A single simulation process is created which contains the spacecraft object. The spacecraft state and the magnetic field model (World Magnetic Model (WMM), Centered Dipole Magnetic Field etc.) messages are connected to the :ref:`magnetometer` module which outputs the local magnetic field measurements in sensor frame components. .. image:: /_images/static/test_scenario_magnetometer.svg :align: center When the simulation completes 2 plots are shown for each case. One plot shows the radius in km, while the second plot shows the magnetic field measurement vector components with respect to the sensor frame. The dynamics simulation is setup using a :ref:`Spacecraft` module. The magnetic field module is created using one of the magnetic field models, e.g. :ref:`scenarioMagneticFieldCenteredDipole` which requires setting appropriate parameters for the specific planet, :ref:`scenarioMagneticFieldWMM` which is a model specific to only Earth. Illustration of Simulation Results ---------------------------------- :: show_plots = True, orbitCase = 'circular', planetCase = 'Earth', useBias = False, useBounds = False .. image:: /_images/Scenarios/scenarioTAM1circularEarth.svg :align: center .. image:: /_images/Scenarios/scenarioTAM2circularEarth.svg :align: center :: show_plots = True, orbitCase = 'elliptical', planetCase = 'Earth', useBias = True, useBounds = False .. image:: /_images/Scenarios/scenarioTAM1ellipticalEarth.svg :align: center .. image:: /_images/Scenarios/scenarioTAM2ellipticalEarth.svg :align: center :: show_plots = True, orbitCase = 'circular', planetCase = 'Jupiter', useBias = False, useBounds = True .. image:: /_images/Scenarios/scenarioTAM1circularJupiter.svg :align: center .. image:: /_images/Scenarios/scenarioTAM2circularJupiter.svg :align: center :: show_plots = True, orbitCase = 'elliptical', planetCase = 'Jupiter', useBias = False, useBounds = False .. image:: /_images/Scenarios/scenarioTAM1ellipticalJupiter.svg :align: center .. image:: /_images/Scenarios/scenarioTAM2ellipticalJupiter.svg :align: center