test_simpleAntenna

test_simpleAntenna.simpleAntennaTestFunction(antennaState, env_type, T_AmbientSet, useHaslamMap, T_sky_true, eclipseValue, sigma_AB, scPosUnit, ACCURACY)[source]

Test method

test_simpleAntenna.test_simpleAntenna(antennaState, env_type, T_AmbientSet, useHaslamMap, T_sky_true, eclipseValue, sigma_AB, scPosUnit, ACCURACY)[source]

Validation Test Description

This unit test validates the thermal noise temperature and sky contribution computed by the simpleAntenna module under a variety of antenna operating modes, environmental configurations, and pointing geometries. The test verifies correct behavior when the antenna is transmitting, receiving, both transmitting and receiving, or turned off, as well as when different celestial bodies (Earth, Sun, Moon) are inside or outside the antenna field of view.

The test also exercises eclipse handling, ambient temperature settings, and antenna orientation effects using direction cosine matrices.

Test Parameters

The test is fully parameterized to cover multiple combinations of antenna state, environment type, ambient temperature configuration, and antenna pointing geometry.

Parameters:
  • antennaState (int) – Antenna operational mode. One of ANTENNA_OFF, ANTENNA_RX, ANTENNA_TX, or ANTENNA_RXTX.

  • env_type (int) – Environment selection flag. This controls where antenna is attached: - 0: Spacecraft environment - 1: Ground station environment

  • T_AmbientSet (float or None) – Ambient antenna temperature in Kelvin. If None, the module computes the ambient temperature internally using environmental models.

  • useHaslamMap (bool) – Flag indicating whether the Haslam sky map is used to model galactic background noise.

  • T_sky_true (float) – Truth value for the expected sky noise temperature (K) used for validation.

  • eclipseValue (float) – Eclipse factor in the range [0, 1], where 0 indicates full eclipse (Sun completely blocked) and 1 indicates no eclipse.

  • sigma_AB (array-like or Eigen::MRP) – Antenna orientation relative to the spacecraft body frame, expressed as Modified Rodrigues Parameters (MRPs). This defines the antenna boresight direction used to determine which celestial bodies fall within the antenna cone.

  • scPosUnit (array-like, shape (3,)) – Unit vector of the spacecraft position expressed in the inertial frame. This is used to define the relative geometry between the spacecraft, Earth, Sun, and Moon.

  • ACCURACY (float) – Absolute numerical tolerance used when comparing the computed sky temperature against the truth value.

Description of Variables Being Tested

This test validates: - Correct handling of antenna operational modes (OFF, RX, TX, RXTX) - Ground station vs. spacecraft environment configurations - Proper eclipse handling when the Sun is partially or fully blocked - Correct use of antenna pointing geometry via DCM/MRP transformations - Robust behavior when ambient temperature is user-specified or internally computed - Numerical ACCURACY of sky temperature computation within the specified tolerance

test_simpleAntenna.test_simpleAntenna_haslamMap_three_runs_and_pointing_difference()[source]

Haslam map coverage: Run one sim instance and change pointing while Haslam is enabled. Verify that sky temperature changes with pointing direction.