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 Module: simpleNav output message of type NavAttMsgPayload message at a certain period to 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
show_plots = True, useRefAttitude = False

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