Data: Transmitter
Description
The purpose of this module is to represent a transmitter on a Spacecraft or Ground Station that may transmit data to a Receiver component on another object. This class inherits from the Antenna class, which allows it to create Link Blocks with compatible Receivers in the Simulation, and transmit Telemetry Packets through this link.
Example Use Cases
- Transmit a message from a spacecraft: Attaching a Transmitter component to a Spacecraft or Ground Station will allow that object to transmit Telemetry Packets representing data that it receives or generates. A key can be specified when the packet is transmitted. For the data to be accessed by a Receiver, the Receiver must use the same key when retrieving the data. If no key is specified, either during transmission or receipt, the packet will use the name of the transmitted object’s class as the key.
- Transmit an object: Any serializable object type can be transmitted using the
TransmitObject
function. This can allow for data other than messages to be shared between objects through the data transmission system.
Module Implementation
When a Transmitter component is added to the Simulation, it will be automatically added to the Universe’s Data Subsystem. This system will search through all of the existing Receivers in the Simulation, and create Link Blocks connecting the Transmitter to all compatible Receivers. Each Link Block will connect the Transmitter to exactly one Receiver, and represents a potential connection between the two Antenna components. For a connection to be established between a Receiver and a Transmitter, the following criteria must be met:
- Connections can only be made between a Receiver and a Transmitter. Receivers cannot connect to Receivers, and Transmitters cannot connect to Transmitters.
- The Connection Type (either Optical or Radio) of the Receiver and the Transmitter must match.
- The difference between the frequency of the two Antennae must be less than or equal to half of the Receiver’s bandwidth:
Where \(f_t\) and \(f_r\) are the frequencies of the transmitter and the receiver respectively, and \(B_r\) is the Bandwidth of the receiver.
The TransmitMessage or TransmitObject functions can be used to prepare messages or other data for transmission. Transmitting a message will convert the message into a Timestamped Payload before adding the data, along with a queue, to the In_TransmitterMsgQueue and In_TransmitterMsgKeyQueue respectively. Transmitting an object is much the same, but skips the creation of a Timestamped Payload, and instead adds the object data to the queue in its current form. Both of these functions have an optional “Key” string parameter, which can be used to specify what key should be associated with the data when it is transmitted. If this parameter is not given, the key will be set to the name of the transmitted object’s data type.
Data and keys in the Transmitter Message Queues are not immediately transmitted through the Link Block, and must first be uplinked by the transmitter. Only one object can be transmitted at a time. For an object to be uplinked, sufficient time in the simulation must have passed for the data to have been transmitted. The time taken for this depends on the number of bits in the message, as well as the Baud rate of the Transmitter:
Once this uplink time has elapsed, the data can be uploaded as a packet, which can be transmitted through this Transmitter’s Link Blocks to the connected Receivers. This is achieved by first converting the object into a list of Telemetry Packets using the Data Encoder class, and adding each of these packets to the Out_TelemetryMsgQueue. This queue can be accessed by the connected Link Blocks, which will begin to transfer the Telemetry Packets from the Transmitter to a connected Receiver.