scenarioInertialSpiral

Overview

This scenario demonstrates how to layer attitude references. It starts with an inertial pointing attitude and then adds a spiral scanning motion on top of it.

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

python3 scenarioInertialSpiral.py

The initial orientation is set to zero for all MRPs and rates, and the desired attitude is layered on top using Module: eulerRotation, which allows 3-2-1 Euler rotations to be specified. In this script, the first rotation is 0.02 radians per second about the 1-axis and the second is 0.0001 radians per second about the 2-axis. This creates an outward sweeping spiral motion. The inertial pointing module feeds its output message into the first rotation, which feeds into the second, which in turn gives the attitude error that is used by the control law.

Illustration of Simulation Results

show_plots = True

Five plots are shown. The first three show the attitude error, control torque, and rate tracking error, showing a transient response as the initial condition does not match the desired rates.

../_images/scenarioInertialSpiral1.svg../_images/scenarioInertialSpiral2.svg../_images/scenarioInertialSpiral3.svg

The final two show the logged MRP data, converted back into Euler angles. The pitch and yaw and plotted against time as well as against each other to show the resulting spiral.

../_images/scenarioInertialSpiral4.svg../_images/scenarioInertialSpiral5.svg
scenarioInertialSpiral.run(show_plots)[source]

The scenario can be run with the followings parameters:

Parameters

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