test_prescribedRot2DOF

test_prescribedRot2DOF.PrescribedRot2DOFTestFunction(show_plots, thetaInit, thetaRef1a, thetaRef2a, thetaRef1b, thetaRef2b, phiDDotMax, accuracy)[source]

Call this routine directly to run the unit test.

test_prescribedRot2DOF.test_PrescribedRot2DOFTestFunction(show_plots, thetaInit, thetaRef1a, thetaRef2a, thetaRef1b, thetaRef2b, phiDDotMax, accuracy)[source]

Validation Test Description

The unit test for this module simulates TWO consecutive 2 DOF rotations for a secondary rigid body connected to a rigid spacecraft hub. Two rotations are simulated to ensure that the module correctly updates the required relative PRV attitude when a new attitude reference message is written. This unit test checks that the prescribed body’s MRP attitude converges to both reference attitudes for a series of initial and reference attitudes and maximum angular accelerations. (sigma_FM_Final1 is checked to converge to sigma_FM_Ref1, and sigma_FM_Final2 is checked to converge to sigma_FM_Ref2). Additionally, the prescribed body’s final angular velocity magnitude thetaDot_Final is checked for convergence to the reference angular velocity magnitude, thetaDot_Ref.

Test Parameters

Parameters
  • thetaInit (float) – [rad] Initial PRV angle of the F frame with respect to the M frame

  • thetaRef1a (float) – [rad] First reference PRV angle for the first rotation

  • thetaRef2a (float) – [rad] Second reference PRV angle for the first rotation

  • thetaRef1b (float) – [rad] First reference PRV angle for the second rotation

  • thetaRef2b (float) – [rad] Second reference PRV angle for the second rotation

  • phiDDotMax (float) – [rad/s^2] Maximum angular acceleration for the rotation

  • accuracy (float) – absolute accuracy value used in the validation tests

Description of Variables Being Tested

The prescribed body’s MRP attitude at the end of the first rotation sigma_FM_Final1 is checked to converge to the first reference attitude sigma_FM_Ref1. The prescribed body’s MRP attitude at the end of the second rotation sigma_FM_Final2 is checked to converge to the second reference attitude sigma_FM_Ref2. Additionally, the prescribed body’s final angular velocity magnitude thetaDot_Final is checked for convergence to the reference angular velocity magnitude, thetaDot_Ref.