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.
- class test_antennaProducerScheduling.ScheduledLink(ground_first)[source]
Bases:
objectKeep 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.
- 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
Nonefor normal startup.