Data Downlink: Configuring User Interface
Adding the UI
Similar to the previous tutorial, the user interface (UI) can be added by creating a new function called Configure UI
and by adding the Nom UI
scene component to the level blueprint. Additionally, the demo will have the simulation clock added by adding in the clock widget to the user interface.
Adding a Map
The second widget to add to the screen is a map. A map widget will display the location of a particular spacecraft on the Earth along with the locations of any ground stations and the sun's shadow. The map widget can be added in the same way as the previous components and has several properties that can be configured.
- Show Grid: This will display latitude and longitude lines on the map if enabled. Otherwise, a flat image of the map will be shown.
- Show Labels: A flag for whether to show the names of the ground stations and spacecraft on the map widget.
- Spacecraft: This is the spacecraft that will be tracked on the map widget and display the updated coordinates over time.
Tracking a Spacecraft
Ground stations can track spacecraft. This means that they can determine the relative azimuth, elevation and slant range from the station. Provided the values fit within the ground station’s configuration, an access flag will be enabled. Using this tracking, the TT&C system will be overridden to ensure that only when the ground station to spacecraft has access will the transmitter be able to communicate with the receiver. The Track Spacecraft
function on the ground station will enable tracking of the spacecraft and will produce a message.
Messages are the backbone of the Nominal simulation. They can connect data flows between components and store a structure of data embedded within the message. Messages have a light green coloured pin. This system will be covered in more detail in later tutorials.
Note
Messages can either be an output message or an input message. Output messages are created by the component and managed by that component. A message should have a single output point. Input messages are used to connect data to other components to be read, but should not be written by those components. Messages have a one-to-many design, as a single output message can be connected to multiple other component input messages.
Adding a Log
A log widget can display some text on the screen over time. The text can either be written and updated by the user or it can automatically be updated with a message. If a message is parsed into the message parameter, the log will keep track of the message and each frame will print out the converted text of the message, outputting the state of all of the values within the structure. In the case of the access message, this will include the access flag, elevation angle, azimuth angle and slant range.
The log can also be given a key, which acts as the title as well as a key for updating the text within the message and a colour for the text. If the message is left blank, the log must be written manually by calling the Print
function on the user interface. Since this will be displaying the access message, the message can be connected from the track spacecraft function.
Visualizing the User Interface
Once the three widgets have been added to the simulation, running the simulation will show the widgets working and changing over time. The text within the log should be constantly updated and the spacecraft should be in access with the ground station at around 150 simulated seconds.