test_gravityGradient

test_gravityGradient.run(show_plots, cmOffset, planetCase, simTime)[source]

Call this routine directly to run the unit test.

test_gravityGradient.test_gravityGradientModule(show_plots, cmOffset, planetCase)[source]

Validation Test Description

This test creates a spacecraft in orbit about either Earth or Venus to check if the correct gravity gradient torque is evaluated. Multiple test scenario combinations are possible where either a single or multiple gravity bodies are included, using either zero planet ephemeris for the single planet case, or using SPICE for the multi-planet scenario.

Test Parameters

The following list discusses in detail the various test parameters used. These are test tested in all possible permutations (except show_plots of course) which is turned off for pytest usage.

Parameters:
  • show_plots – flag to show some simulation plots

  • cmOffset – center of mass offset vector in meters

  • planetCase

    integer flag with values (0,1,2,3). The cases consider the following simulation scenarios:

    • Case 0 indicates a simulation with only Earth present at (0,0,0).

    • Case 1 is a simulation with both Earth and Venus present using Spice, but the gravity gradient torque is only evaluated using Earth.

    • Case 2 is same as 1 but Venus is also included in the torque evaluation.

    • Case 3 is like 2 but here the spacecraft is orbiting venus.

Returns:

None

Description of Variables Being Tested

The gravity effector torque output message is compared against a python evaluated vector.