scenarioFormationReconfig

Overview

This script sets up a formation flying scenario with two spacecraft. The deputy spacecraft reconfigures its relative orbit in one orbit from one initial orbital element difference to target orbital element difference. This script is found in the folder basilisk/examples and executed by using:

python3 scenarioFormationReconfig.py

The simulation layout is shown in the following illustration. Two spacecraft are orbiting the earth at close distance. No perturbation in assumed. Each spacecraft sends a C++ Module: simpleNav output message of type NavAttMsgPayload message at a certain period to C Module: spacecraftReconfig, where burn scheduling is executed to achieve reconfiguration.

../_images/test_scenarioFormationReconfig.svg

Illustration of Simulation Results

show_plots = True, useRefAttitude = False

In this case, reference attitude input is omitted. Therefore, attitude control is executed to achieve thruster burn. This resulting feedback control error is shown below.

../_images/scenarioFormationReconfig10.svg ../_images/scenarioFormationReconfig20.svg

The third figure shows the measured deputy-minus-chief element differences minus the commanded differences. Zero marks the target in each panel. The semimajor axis difference is normalized by the chief’s semimajor axis. Its error and the eccentricity error are shown in parts per million (ppm). The four angular errors are shown in microradians. The burns reduce all six errors over the maneuver, with a small residual remaining at the end.

../_images/scenarioFormationReconfig30.svg
show_plots = True, useRefAttitude = True

In this case, reference attitude input is included. Therefore, attitude control is executed to both achieve thruster burn and reference attitude. This resulting feedback control error is shown below.

../_images/scenarioFormationReconfig11.svg ../_images/scenarioFormationReconfig21.svg ../_images/scenarioFormationReconfig31.svg
scenarioFormationReconfig.run(show_plots, useRefAttitude)[source]

At the end of the python script you can specify the following example parameters.

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

  • useRefAttitude (bool) – Determines if reference attitude is used