Description
The Antenna class is used to represent a component that can facilitate the transfer of data packets from one entity in the simulation to another. An Antenna can be added to a Spacecraft or Ground Station in the form of the Transmitter or Receiver classes, which are classes that inherit from the base Antenna
class.
Example Use Cases
- Representing connections between two simulation objects: An Antenna can be added to two different objects in the simulation, one configured as a Transmitter and the other configured as a Receiver. If the Receiver and the Transmitter are compatible, they can be used to transfer data from the transmitting object to the receiving object.
Module Implementation
Adding Antennae to the Scene
When a new Antenna is added to the simulation, it will also be added to the Data Subsystem’s list of Antenna objects. The Telemetry System will then establish links between the new Antenna, and all compatible existing antennae. The requirements for compatibility are that the transmission type must be the same, the two Antenna must be opposite types (Transmitter and Receiver), and the difference between the frequencies must be less than half of the receiver’s bandwidth (whether the receiver is the new Antenna or the existing one). Each link between the Transmitter and the Receiver is also stored in a dictionary of the various connections in the scene, by creating a Link Block.
Transmission
The Transmitter stores a queue of packets called In_TelemetryMsgArray
, representing any data packets that are being transmitted by it. During each tick, any newly transmitted packets are added to a list of Telemetry Packets on the Link Block, and the Transmitter’s transmission queue is cleared. The distance between the receiver and the Transmitter is used to determine how long it will take for the packet to be received provided that the packet transmission is travelling at the speed of light:
If this time has elapsed, the Telemetry Packet will be transferred from the link’s In_TelemetryMsgArray
to its Out_TelemetryMsgArray
.
Receiver
The receiver stores a list of all the established links that it has to valid transmitters. During each update, the receiver will check for a Telemetry Packet in the Out_TelemetryMsgArray
**of the Link Block between it and the transmitter. If there is a packet available, the receiver will store it in a dictionary that stores received data by the data’s associated key. When the ReceiveMessage
or ReceiveObject
functions are called, the receiver will check this dictionary for the data that matches the key provided in the function call. If it exists, it will be returned and the data will have been successfully transferred from one entity to another through two antennae.