test_thrusterPlatformReference
- test_thrusterPlatformReference.test_platformRotation(show_plots, delta_CM, K, thetaMax, seed, accuracy)[source]
Validation Test Description
This unit test script tests the correctness of the tip and tilt reference angles computed by Module: thrusterPlatformReference. The correctness of the output is determined based on whether the thruster is aligned with the system’s center of mass, when the momentum dumping control gain \(\kappa = 0\). Moreover, the other module output messages,
bodyHeadingOutMsg
andthrusterTorqueOutMsg
are checked versus equivalent python code.Test Parameters
This test randomizes the position of the center of mass and runs the test 10 times for any other combination of test parameters.
- Parameters:
delta_CM (m) – magnitude of the center of mass shift, whose direction is generated randomly
K (Hz) – proportional gain of the momentum dumping control law
seed – seed is varied to randomly change the shift in the center of mass
accuracy (float) – accuracy within which results are considered to match the truth values.
Description of Variables Being Tested
For \(\kappa = 0\), the correctness of the result is assessed based on the norm of the cross product between the thrust direction vector \({}^\mathcal{F}\boldsymbol{t}\) and the relative position of the center of mass with respect to the thruster application point \(T\). For \(\kappa \neq 0\) this test is not performed, as the thruster is not aligned with the center of mass. This script does not test the integral feedback term, which would require running a simulation for an extended period of time.
The python code also computes equivalently the thrust direction in body frame coordinates \({}^\mathcal{B}\boldsymbol{t}\) and the net torque on the system \({}^\mathcal{B}\boldsymbol{L}\), and compares them to the respective output messages for all values of \(\kappa = 0\) tested.
General Documentation Comments
The offset vectors provided as input parameters ensure that a solution exists, such that the Unit Test can correctly assess the alignment of the thruster. This is, in general, not guaranteed.