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 scenarioBasicOrbit.

The script is found in the folder basilisk/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 Module: magnetometer module which outputs the local magnetic field measurements in sensor frame components.

../_images/test_scenario_magnetometer.svg

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 Module: spacecraft module. The magnetic field module is created using one of the magnetic field models, e.g. scenarioMagneticFieldCenteredDipole which requires setting appropriate parameters for the specific planet, scenarioMagneticFieldWMM which is a model specific to only Earth.

Illustration of Simulation Results

show_plots = True, orbitCase = 'circular', planetCase = 'Earth', useBias = False, useBounds = False
../_images/scenarioTAM1circularEarth.svg../_images/scenarioTAM2circularEarth.svg
show_plots = True, orbitCase = 'elliptical', planetCase = 'Earth', useBias = True, useBounds = False
../_images/scenarioTAM1ellipticalEarth.svg../_images/scenarioTAM2ellipticalEarth.svg
show_plots = True, orbitCase = 'circular', planetCase = 'Jupiter', useBias = False, useBounds = True
../_images/scenarioTAM1circularJupiter.svg../_images/scenarioTAM2circularJupiter.svg
show_plots = True, orbitCase = 'elliptical', planetCase = 'Jupiter', useBias = False, useBounds = False
../_images/scenarioTAM1ellipticalJupiter.svg../_images/scenarioTAM2ellipticalJupiter.svg
scenarioTAM.run(show_plots, orbitCase, planetCase, useBias, useBounds)[source]

The scenarios can be run with the followings setups parameters:

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

  • orbitCase (str) – Specify the type of orbit to be simulated {‘elliptical’, ‘circular’}

  • planetCase (str) – Specify about which the spacecraft is orbiting {‘Earth’, ‘Jupiter’}

  • useBias (bool) – Flag to use a sensor bias

  • useBounds (bool) – Flag to use TAM sensor bounds