Description

The purpose of this module is to represent a receiver on a Spacecraft or Ground Station that may receive data from a Transmitter component on another object. This class inherits from the Antenna class, which allows it to create Link Block with compatible Transmitters in the Simulation, and receive Telemetry Packets through this link.


Example Use Cases

  • Receive a message from a spacecraft: A Receiver class may be added to a Ground Station or Spacecraft to receive Telemetry Packets from a Transmitter component on another entity. The transmitter may specify a key to transmit for a specific packet. If this is done, the Receiver must provide the same key when receiving the message. If no key is set during transmission or during reception, then they key will be determined by the class name of the object being transferred.
  • Receive a transmitted object: Any serializable object type can be transmitted and received using the Receive Object function. This can be used to share data between objects, regardless of the type of the data being transferred. No casting is applied to the object upon transmission or receipt, and will need to be applied by the caller of the function if the object is to be treated as the correct type.

Module Implementation

When a Receiver component is added to the Simulation, it will be automatically added to the Universe’s Telemetry System. This system will check through all of the Transmitters already in the Simulation, and create Link Blocks between the Receiver and all compatible Transmitters. If the difference between the frequencies of the transmitter and the receiver is less than or equal to 1/2 of the receiver’s bandwidth, the connection is valid:

Where and are the frequencies of the transmitter and the receiver respectively, and is the Bandwidth of the receiver. In addition, the Transmitter must also be the same transmission type (either radio or optical) for a valid connection to be established.

Each Link Block represents a connection between one Receiver to one Transmitter. During each update, the Receiver will attempt to downlink the most recently transferred packet from each of its Link Blocks’ Out_TelemetryMsgArray and transfer these packets into a Keyed Output Data dictionary, storing the data by the key associated with it. The time between the start and the end of the downlink is determined by the size of the packet being received and the Baud rate of the Receiver. The data will be transferred to the dictionary after this length of time has passed:

When a ReceiveMessage, ReceiveObject, or similar function is called, the Receiver will check the contents of the KeyedOutputData dictionary for any data that matches the specified key, and return this data. A Boolean value (”Recent”) is used in the function call to indicate if the Receiver should retrieve the most recently accessed message, or the first message received with a specific key. If the former is chosen, all previous data that was transferred under that key to this receiver will be lost.

The ReceiveMessage function will return a Boolean, indicating if the message data was successfully retrieved. The message that the data should be transferred into is instead passed as a parameter, with the specified message being overwritten with the new data once received. However, other similar functions will return the transmitted object itself, rather than a Boolean.


Assumptions/Limitations

  • The Receiver class will discard previous data associated with a specific key if the “recent” Boolean is set to true during a Receive function so that it can return the value from the back of the key’s queue. As such, the class assumes that the receiver will be used to either access the first or the last data for a key consistently, and will not access the most recent data, followed by the oldest data, as this data would have been discarded when retrieving the most recent data.