test_PrescribedMotionStateEffector

test_PrescribedMotionStateEffector.PrescribedMotionTestFunction(show_plots, rotTest, thetaInit, theta_Ref, posInit, posRef, accuracy)[source]

Call this routine directly to run the unit test.

test_PrescribedMotionStateEffector.test_PrescribedMotionTestFunction(show_plots, rotTest, thetaInit, theta_Ref, posInit, posRef, accuracy)[source]

Validation Test Description

The unit test for this module is an integrated test with two flight software profiler modules. This is required because the dynamics module must be connected to a flight software profiler module to define the states of the prescribed secondary body that is connected to the rigid spacecraft hub. The integrated test for this module has two simple scenarios it is testing. The first scenario prescribes a 1 DOF rotation for the prescribed body using the Module: prescribedRotation1DOF flight software module. The second scenario prescribes linear translation for the prescribed body using the Module: prescribedLinearTranslation flight software module.

This unit test ensures that the profiled 1 DOF rotational attitude maneuver is properly computed for a series of initial and reference PRV angles and maximum angular accelerations. The final prescribed attitude and angular velocity magnitude are compared with the reference values. This unit test also ensures that the profiled translational maneuver is properly computed for a series of initial and reference positions and maximum accelerations. The final prescribed position and velocity magnitudes are compared with the reference values. Additionally for each scenario, the conservation quantities of orbital angular momentum, rotational angular momentum, and orbital energy are checked to validate the module dynamics.

Test Parameters

Parameters:
  • rotTest (bool) – (True) Runs the rotational motion test. (False) Runs the translational motion test.

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

  • theta_Ref (float) – [rad] Reference PRV angle of the F frame with respect to the M frame

  • thetaDDotMax (float) – [rad/s^2] Maximum angular acceleration for the attitude maneuver

  • scalarPosInit (float) – [m] Initial scalar position of the F frame with respect to the M frame

  • scalarPosRef (float) – [m] Reference scalar position of the F frame with respect to the M frame

  • scalarAccelMax (float) – [m/s^2] Maximum acceleration for the translational maneuver

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

Description of Variables Being Tested

This unit test ensures that the profiled 1 DOF rotational attitude maneuver is properly computed for a series of initial and reference PRV angles and maximum angular accelerations. The final prescribed angle theta_FM_Final and angular velocity magnitude thetaDot_Final are compared with the reference values theta_Ref and thetaDot_Ref, respectively. This unit test also ensures that the profiled translational maneuver is properly computed for a series of initial and reference positions and maximum accelerations. The final prescribed position magnitude r_FM_M_Final and velocity magnitude rPrime_FM_M_Final are compared with the reference values r_FM_M_Ref and rPrime_FM_M_Ref, respectively. Additionally for each scenario, the conservation quantities of orbital angular momentum, rotational angular momentum, and orbital energy are checked to validate the module dynamics.