test_antennaProducerScheduling

Exercise antenna initialization through the simulation scheduler.

Real spacecraft, ground, antenna, link-budget, downlink and storage modules run on ordered tasks. Delaying either the ground or antenna task exercises the waiting state over multiple timestamps. Reinitializing the same simulation after an altitude change exercises previously written producer messages.

Bases: object

Keep the scheduled producer chain and its recorders alive together.

assert_ready(first_sample, ground_first)[source]

Compare scheduled results with an explicitly primed link reference.

The reference uses published RF properties but independently supplied positions and surface normal. Existing unit tests validate the RF and atmospheric formulas; this test validates their scheduled initialization.

Parameters:
  • first_sample – First recorder index with ready producer inputs.

  • ground_first – Whether the ground antenna uses link input one.

Returns:

Reference atmospheric attenuation in decibels.

assert_reset_output()[source]

Check that reset publishes zero service even before the first tick.

run_until(time_seconds)[source]

Advance the scheduler without manually updating any producer.

Parameters:

time_seconds – Absolute stop time in seconds.

set_geometry(altitude)[source]

Set stationary geometry with the spacecraft boresight at the station.

Parameters:

altitude – Ground station altitude in meters.

test_antennaProducerScheduling.configure_antenna(antenna, name, state)[source]

Configure an antenna without sky-map or ephemeris dependencies.

Parameters:
  • antenna – Antenna module to configure.

  • name – Published antenna identifier.

  • state – Transmit or receive antenna state.

test_antennaProducerScheduling.test_scheduled_antenna_initialization(ground_first, delayed_task)[source]

Validate initialization, waiting, downstream service and reset scheduling.

Validation Test Description

Delayed tasks remain disabled for two ticks while consumers keep running, then resume in producer order. A full simulation reset must subsequently rebuild the atmosphere at the changed altitude on its first scheduled tick.

Test Parameter Discussion

Both link input orders are exercised with normal startup, delayed antenna publication, and antennas publishing before the ground position is ready.

Description of Variables Being Tested

Check CNR, atmospheric and pointing loss, ground normal and position, message timestamps, downlink service and integrated storage removal.

param ground_first:

Whether the ground antenna uses link input one.

param delayed_task:

Producer task to delay, or None for normal startup.