test_cmdTorqueBodyToTorqueAtSite
- test_cmdTorqueBodyToTorqueAtSite.runModule(torque_B, dcm_SB=None)[source]
Run the module for one second in a simulation and return the module and an output reader.
- test_cmdTorqueBodyToTorqueAtSite.test_dcm_setter_copies_input_matrix()[source]
Changing the caller’s matrix must not alter the rotation or output torque.
Assign an identity rotation, then invalidate the original NumPy array. The module must retain the validated rotation and preserve the commanded torque on its next update.
- test_cmdTorqueBodyToTorqueAtSite.test_dcm_setter_rejects_invalid_rotation(badDcm)[source]
Validation Test Description
This unit test verifies that
dcm_SBonly accepts 3x3 proper rotation matrices.Description of Variables Being Tested
This unit test checks that a wrong shape, a non-orthonormal matrix, and a reflection each raise
ValueError.
- test_cmdTorqueBodyToTorqueAtSite.test_output_torque_and_header(useRotation)[source]
Validation Test Description
This unit test verifies that
cmdTorqueBodyToTorqueAtSite.CmdTorqueBodyToTorqueAtSitemaps a body-frame torque command into the site frame, both for the default aligned frames and for a general body-to-site rotation, and that the output message header carries the write time and the module ID.Description of Variables Being Tested
This unit test checks
torque_Sagainstdcm_SB @ torqueRequestBody, the output message write time, and the output message module ID.
- test_cmdTorqueBodyToTorqueAtSite.test_reset_rejects_missing_input_message()[source]
Validation Test Description
This unit test verifies that
cmdTorqueBodyToTorqueAtSite.CmdTorqueBodyToTorqueAtSiterejects reset calls when the required command torque message is not connected.Description of Variables Being Tested
This unit test checks the
cmdTorqueInMsglink validation.