test_facetedSpacecraftModel

test_facetedSpacecraftModel.test_facetedSpacecraftModel(show_plots, articulated_facet_1_initial_angle, articulated_facet_1_intermediate_angle, articulated_facet_1_final_angle, fixed_facet_2_initial_angle)[source]

Verification Test Description

This unit test verifies that the faceted spacecraft BSK module correctly transforms facet geometry data from the local facet frames to the spacecraft hub body frame. The module is configured to map either fixed or single-axis articulating facets to the spacecraft hub frame. The facet geometry input data to the BSK module is provided in each local facet frame. The facet geometry data is transformed and output from the BSK module in the spacecraft hub body frame. Articulating facets must be configured by calling the method addArticulatedFacet(Message<HingedRigidBodyMsgPayload> *tmpMsg) with a HingedRigidBodyMsgPayload message for each articulating facet. The module assumes the articulating facets are added first to the module, followed by any fixed facets.

This test sets up the faceted spacecraft BSK module with two facets. The first facet articulates while the second is fixed. A stand-alone HingedRigidBodyMsgPayload is provided for the articulated facet. To ensure the module correctly handles articulating facets, the simulation is broken up into two segments. The first segment provides an intermediate articulation angle while the second segment provides a final articulation angle. The test varies the articulated facet initial angle, intermediate angle, and final angle. The initial angle for the initial facet is also varied in the test.

Test Parameters

Parameters:
  • articulated_facet_1_initial_angle (float) – [rad] Initial articulated facet 1 angle

  • articulated_facet_1_intermediate_angle (float) – [rad] Intermediate articulated facet 1 angle

  • articulated_facet_1_final_angle (float) – [rad] Final articulated facet 1 angle

  • fixed_facet_2_initial_angle (float) – [rad] Initial fixed facet 2 angle

Description of Variables Being Tested

The test checks that the facet geometry data is correctly transformed to the spacecraft hub body frame. The specific variables checked are the facet center of pressure locations r_CopB_B, the facet normal vectors nHat_B, and the facet articulation axes rotHat_B.