Data Downlink: Configuring Antennae
Accessing Components
In the level blueprint, accessing components from a spacecraft can be done in a couple of ways. In the designing spacecraft document, a function was exposed to return the transmitter from the spacecraft. This was a pure function and can be accessed from the level blueprint’s spacecraft variable (provided the type of the spacecraft was changed to the BP_Spacecraft_DataDownlink
class). This will return a reference to the transmitter of the correct type.
Note
In the above code block, the bottom ‘Get Transmitter’ option will return a child actor component. This can also be shown by the parent-child icon to the left of the text. This will not be of the correct type. By selecting the child component, the child actor from it will need to be cast to the correct type. It is easier to move this to a function on the spacecraft as it was done before.
An alternative method is to search for a particular class on-board the spacecraft and return the result of the object that was found (if it exists). This method is slow but quick to implement and can be used temporarily when building up simulations. The function is named Get Universe Child
from the spacecraft. This will return an instance of an object of the particular type. If the object does not exist on the spacecraft, a nullptr will be returned. If multiple objects exist, the first one in the hierarchy stack will be returned. Similarly, Get Universe Children
will return a list of all objects that are either the type or inherited from the type entered as the parameter.
Changing Frequency
The TT&C system uses the frequency of transmitters and receivers in the simulation as a way of communication. In the back end, a system tracks all of the antennae and each time the frequencies change, it determines which antennae are on the same frequency and adds them to a map. This allows two antennae (provided one is a transmitter and one is a receiver) to communicate with each other provided the other conditions are met, such as distance or angle. For this tutorial, we will assume both the transmitter on the spacecraft and the receiver on the ground station will have a frequency of 900 MHz. This can be done by using the Set Frequency
function on both antennae.
The bandwidth property on the antennae specifies the range of frequencies about the desired mean frequency it can listen to. If the transmitting frequency is not the same, provided it is within a suitable range of the bandwidth, the antennae may still be able to communicate. A normal distribution curve is applied to this frequency range. In this example, as the two frequencies match, there is no requirement for the bandwidth to change from the default.