scenarioTAMcomparison

Overview

This script sets up a 3-DOF spacecraft which is orbiting in Earth’s magnetic field. The purpose is to demonstrate how to add multiple Three-Axis Magnetometers (TAM) to a spacecraft and assign different magnetic field representations, biases, and bounds to each. The orbit setup is similar to that used in scenarioBasicOrbit.

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

python3 scenarioTAMcomparison.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 models (World Magnetic Model (WMM) and Centered Dipole Magnetic Field) messages are each connected to a Module: magnetometer module which outputs the local magnetic field measurements in sensor frame components.

When the simulation completes three plots are shown for each case. One plot shows the radius in km, the second shows the scenarioMagneticFieldCenteredDipole measurements, and the third shows the scenarioMagneticFieldWMM measurements. The magnetic models measurements are shown as vector components with respect to the sensor frame.

The dynamics simulation is setup using a Module: spacecraft module. The magnetometers are defined as Three Axis Magnetometers based on scenarioTAM. The bounds for each magnetometer can be individually activated, and a bias in the sensor z-direction can be individually activated. The Centered Dipole Model can be utilized for Jupiter or Earth, but only the parameters for Earth are defined in this simulation. The World Magnetic Model (WMM) is specific to Earth.

Illustration of Simulation Results

show_plots = True, orbitCase = 'circular', useBias1 = False, useBounds1 = True, useBias2 = False, useBounds2 = True
../_images/scenarioTAMcomparison1circularFalseTrueFalseTrue.svg../_images/scenarioTAMcomparison2circularFalseTrueFalseTrue.svg../_images/scenarioTAMcomparison3circularFalseTrueFalseTrue.svg
show_plots = True, orbitCase = 'elliptical', useBias1 = True, useBounds1 = False, useBias2 = True, useBounds2=False
../_images/scenarioTAMcomparison1ellipticalTrueFalseTrueFalse.svg../_images/scenarioTAMcomparison2ellipticalTrueFalseTrueFalse.svg../_images/scenarioTAMcomparison3ellipticalTrueFalseTrueFalse.svg
show_plots = True, orbitCase = 'elliptical', useBias1 = False, useBounds1 = False, useBias2 = False,
useBounds2 = False
../_images/scenarioTAMcomparison1ellipticalFalseFalseFalseFalse.svg../_images/scenarioTAMcomparison2ellipticalFalseFalseFalseFalse.svg../_images/scenarioTAMcomparison3ellipticalFalseFalseFalseFalse.svg
show_plots = True, orbitCase = 'circular', useBias1 = False, useBounds1 = True, useBias2 = False, useBounds2 = False
../_images/scenarioTAMcomparison1circularFalseTrueFalseFalse.svg../_images/scenarioTAMcomparison2circularFalseTrueFalseFalse.svg../_images/scenarioTAMcomparison3circularFalseTrueFalseFalse.svg
scenarioTAMcomparison.run(show_plots, orbitCase, useBias1, useBias2, useBounds1, useBounds2)[source]

The scenarios can be run with the following 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’}

  • useBias1 (bool) – Flag to use a sensor bias on TAM 1

  • useBias2 (bool) – Flag to use a sensor bias on TAM 2

  • useBounds1 (bool) – Flag to use TAM 1 sensor bounds

  • useBounds2 (bool) – Flag to use TAM 2 sensor bounds