test_oneAxisSolarArrayPoint

test_oneAxisSolarArrayPoint.test_oneAxisSolarArrayPointTestFunction(show_plots, alpha, delta, bodyAxisInput, inertialAxisInput, alignmentPriority, accuracy)[source]

Validation Test Description

This unit test script tests the correctness of the reference attitude computed by Module: oneAxisSolarArrayPoint. The correctness of the output is determined based on whether the reference attitude causes the solar array drive axis \(\hat{a}_1\) to be at an angle \(\gamma\) from the Sun direction \(\hat{r}_{S/B}\).

Test Parameters

This test generates an array ang of linearly-spaced points between 0 and \(\pi\). Values of \(\alpha\) and \(\delta\) are drawn from all possible combinations of such lineaarly spaced values. In the test, values of \(\alpha\) and \(\delta\) are used to set the angular distance between the vectors \({}^\mathcal{N}\hat{r}_{S/B}\) and \({}^\mathcal{N}\hat{h}_\text{ref}\), and \({}^\mathcal{B}\hat{h}_1\) and \({}^\mathcal{B}\hat{a}_1\). All possible inputs are provided to the module, in terms of input parameters and input messages, using the same combinations of inertial and body-fixed direction vectors.

Parameters:
  • alpha (rad) – angle between \({}^\mathcal{N}\hat{r}_{S/B}\) and \({}^\mathcal{N}\hat{h}_\text{ref}\)

  • delta (rad) – angle between \({}^\mathcal{B}\hat{h}_1\) and \({}^\mathcal{B}\hat{a}_1\)

  • bodyAxisInput (int) – passes the body axis input as parameter or as input msg

  • inertialAxisInput (int) – passes the inertial axis input as parameter, as input msg, or with NavTransMsgPayload and EphemerisMsgPayload

  • alignmentPriority (int) – 0 to prioritize body heading alignment, 1 to prioritize solar array power; if 1, correct result is \(\gamma = 0\).

Description of Variables Being Tested

The angle \(\gamma\) is a function of the angles \(\alpha\) and \(\delta\), where \(\alpha\) is the angle between the Sun direction \({}^\mathcal{N}\hat{r}_{S/B}\) and the reference inertial heading \({}^\mathcal{N}\hat{h}_\text{ref}\), whereas \(\delta\) is the angle between the body-frame heading \({}^\mathcal{B}\hat{h}_1\) and the solar array axis drive \({}^\mathcal{B}\hat{a}_1\). The angle \(\gamma\) is computed from the output reference attitude and compared with the results of a python function that computes the correct output based on the geometry of the problem. For a description of how such correct result is obtained, see R. Calaon, C. Allard and H. Schaub, “Attitude Reference Generation for Spacecraft with Rotating Solar Arrays and Pointing Constraints”, in preparation for Journal of Spacecraft and Rockets.

General Documentation Comments

This unit test verifies the correctness of the generated reference attitude. It does not test the correctness of the reference angular rates and accelerations contained in the attRefOutMsg, because this would require to run the module for multiple update calls. To ensure fast execution of the unit test, this is avoided.