Table of Contents

Editor: Basic Data Transmission

Description

This guide demonstrates how to transmit a message from one entity to another using the message transmission system. This is used to simulate data being generated by an entity such as a spacecraft, transmitted from an attached transmitter, and received by a receiver on another entity, such as a ground station or another spacecraft. The message transmission system can transmit any message payload, making it usable for a variety of purposes.

Untitled

An example scenario for this can be found in the Data/Demo_SpacecraftToSpacecraftComms, where a Nav Trans Message is generated by a transmitter spacecraft and received by a receiver spacecraft. The receiver spacecraft will use this message data to determine the direction to point to face towards the transmitter spacecraft via a Relative Pointing Software Chain.


Creating the Transmitter Spacecraft

Configure a level for a spacecraft to be spawned in orbit around a gravity body. The spacecraft is required to have the following essential components:

  • Computer: Used for storing the software components that will generate messages.
  • Transmitter: Used for transmitting the generated message

The BP_Spacecraft_Transmitter_1U object is used in this example scenario and represents the baseline requirements for the transmitter spacecraft. However, this entity could include any number of additional components, and could also transmit out messages from other components that are not stored in the computer. The image below displays the transmitter spacecraft used in this example scenario.

Untitled

Alternatively, a ground station could be used as the transmitter, provided that it contains a transmitter component. The BP_NS_GroundStation_Base blueprint is an example of this, containing a receiver and transmitter that can be used for transmitting or receiving messages. However, for simplicity, this guide will assume that you are creating a spacecraft, as is demonstrated in the example scenario.


Creating the Receiver Spacecraft

A second spacecraft should be added to the level. In this example scenario, the receiver spacecraft has been given the same orbit as the transmitter spacecraft, but with a different Semi-Major Axis value to place it slightly ahead of the transmitter. However, the transmitter can be placed in other positions as well to simulate other scenarios. The required components for the Receiver Spacecraft are as follows:

  • Computer: Used for storing software components that will process the received message data.
  • Receiver: Used for receiving transmitted message payloads.

In the example scenario, the BP_Spacecraft_Receiver_3U blueprint is utilized for the Receiver Spacecraft. This blueprint contains a number of additional components that are not utilized in this example, are not required for receiving messages and may be omitted if preferred. An image of the Receiver Spacecraft used in the example is displayed below.

Untitled

The receiver is not required to be attached to a spacecraft and may be attached to a ground station instead if preferred.


Configuring the Antennae

Both the transmitter and receiver spacecraft in this example contain software that creates or uses message data that can be transmitted using the message transmission system. For the Transmitter Spacecraft, this software consists of a Navigator software component which is added to the spacecraft’s computer. This software is used for generating a NavTransMessage, which is transmitted by the spacecraft. In this example, the navigator is added by the spacecraft’s blueprint when the simulation begins, but this can also be done in a level blueprint if preferred.

Untitled

In addition to this, the frequency of the transmitter can also be set using blueprints. This should be set on both the transmitter and the receiver to the same value, but is not used in this example, and is therefore not required to be set.

The receiver spacecraft in this example also contains a variety of software components that construct a Relative Pointing Software Chain. For information on what this software chain does and how to create one, view a pointing chain operator guide. The Relative Pointing Software Chain software is not required for the data to be received but is used in this example to demonstrate that transmitted data is being received, as the Transmitter’s NavTransMessage is used as input to this software chain.

The receiver’s frequency must also be set at this time to match the transmitter’s frequency.

Untitled


Transmitting Messages

Messages can be transmitted using the Transmit Message method, associated with the Transmitter component. This function has three parameters that can be set by the user:

  • Message: The message reference to transmit. This must be valid and fetched from the message of the target.
  • Key: The key used to store the message for the receiver to be able to access it. Leaving the key empty will result in the message type’s name being used as the key.
  • Seconds: The time associated with the transmission of the message in seconds. If seconds are not set, 0 will be used as the default value. For most simulations, this field is not required.

The function will return a boolean, indicating if the message was successfully transmitted.

Untitled


Receiving Messages

Receiving a message with the transmitter is performed using the Receive Message method, associated with the Receiver component. The Receive Message method has three parameters:

  • Message: The message that the data should be copied into. This will replace the data inside of this message with the data that is received by the receiver in the buffer.
  • Key: The key that the message was transmitted using. If this is left empty, the key will be set to the name of the message type that is receiving the message payload.
  • Recent: Indicates if the most recent payload transmitted with this key should be accessed. If this is set to false, the first payload transmitted with the specified key that has not yet been received will be returned instead. If this value is set to true, all previous messages with this key that were transmitted will be discarded.

The function will return a Boolean indicating if the message was successfully retrieved.

Untitled

This method will update the values of the provided message to match the data received from the transmission. Transmitted data represents a copy of the original message at the time of transmission. For the receiver to have an up-to-date copy of the transmitter’s message, the message will have to be transmitted and received frequently.