test_WaypointReference¶
- test_WaypointReference.test_waypointReference(show_plots, attType, MRPswitching, useReferenceFrame, accuracy)[source]¶
- Validation Test Description - This unit test script tests the capability of the WaypointReference module to correctly read time-tagged attitude parameters, angular rates and angular accelerations from a text file. First a text file is generated that contains a sequence of time-tagged attitude parameters, angular rates and angular accelerations; subsequently, the same file is fed to the waypointReference module. The module is tested against all the attitude types that it supports: - MRPs - Euler Parameters (quaternion) [q0, q1, q2, q3] - Euler Parameters (quaternion) [q1, q2, q3, qs] and with angular rates and accelerations that can be expressed either in the inertial frame N or in the reference frame R. This unit test writes 5 time-tagged attitudes at times t = [1.0, 2.0, 3.0, 4.0, 5.0]s. Real values of attitude parameters, angular rates and angular accelerations in inertial frames are stored in - attReal_RN,- omegaReal_RN_Nand- omegaDotReal_RN_Nrespectively.- Test Parameters - Parameters
- attType (int) – 0 - MRPs; 1 - EP [q0, q1, q2, q3]; 2 - [q1, q2, q3, qs] 
- MRPswitching – False: every waypoint is within 180 deg from the inertial frame; True: some waipoints exceed 180 deg rotation from the inertial frame and - attRefOutMsg.sigma_RNpresents a discontinuity in correspondence of MRP switching;
- useReferenceFrame (bool) – False: ang. rates and accelerations expressed in inertial frame; True: ang. rates and accelerations expressed in reference frame; 
- accuracy (float) – absolute accuracy value used in the validation tests 
 
 - Description of Variables Being Tested - This unit test checks the correctness of the output attitude reference message - attRefMsg
 - compared to the real values stored in the data file - attReal_RN,- omegaReal_RN_Nand- omegaDotReal_RN_N. The simulation is run with a sampling frequency of 0.25 s, which is higher than the frequency with which the attitude waypoints are saved in the data file (1.0 s), starting at t = 0.- For t < 1.0 s we check that the attitude in - attRefMsgcoincides with- attReal_RNat time t = 1.0 s, while rates and accelerations in- attRefMsgare zero.- For t > 5.0 s we check that the attitude in - attRefMsgcoincides with- attReal_RNat time t = 5.0 s, while rates and accelerations in- attRefMsgare zero.- For 1.0 s <= t <= 5.0 s we check that the attitude, rates and accelerations in - attRefMsgcoincide with the linear interpolation of- attReal_RN,- omegaReal_RN_Nand- omegaDotReal_RN_N.