Module: spaceToGroundTransmitter¶
Executive Summary¶
This module provides a model of access-dependent data downlink from a simple transmitter at a fixed baud rate. Specifically, the transmitter reads a DataStorageStatusMsgPayload from the storage unit it is subscribed to, searches for the data buffer with the maximum amount of data, and downlinks a packet of data at a fixed baud rate. The transmitter writes out a DataNodeUsageMsgPayload describing the data name and baud rate of the data it wants to downlink.
In comparison to Module: simpleTransmitter, downlink is only enabled when a AccessMsgPayload indicates that the spacecraft for which the transmitter is associated has access to an object that can provide it (such as a Module: groundLocation.)
For more information on how to set up and use this module, see the simple data system example: scenarioDataDemo
Module Assumptions and Limitations¶
This module makes no additional assumptions outside of those already made in the Module: dataNodeBase base class.
Message Connection Descriptions¶
This module uses the input and output messages of the Module: dataNodeBase base class, plus an additional DataStorageStatusMsgPayload input message subscribed to and read customRead() method.
| Msg Variable Name | Msg Type | Description | 
|---|---|---|
| storageUnitInMsgs | Vector of storage units that are connected to the transmitter. Add storage unit with the  | |
| groundAccessInMsgs | Vector of access messages available to the transmitter. Add input messages with the  | 
User Guide¶
This module inherits the user guide from the Module: dataNodeBase base class, but there are several key differences from other Module: dataNodeBase child classes:
- Unlike other child classes of Module: dataNodeBase, this module does not require a user to set a nodeDataName 
- The nodeBaudRate variable should be set to a negative value in order to remove data from the storage unit. 
- The user must specify a packetSize variable (negative value) in addition to the nodeBaudRate variable 
- The user must specify the number of buffers numBuffers variable so the transmitter knows how many buffers to search through 
- The user must specify the storage unit the transmitter should subscribe to using the addStorageUnitToTransmitter()` method 
To set up this module users must create a SimpleTransmitter instance:
transmitter = spaceToGroundTransmitter.SpaceToGroundTransmitter()
transmitter.ModelTag = "transmitter"
Set the nodeBaudRate, packetSize, and numBuffers variables:
transmitter.nodeBaudRate = -16000. # baud
transmitter.packetSize = -1E6 # bits
transmitter.numBuffers = 2
The next step is to attach one or more DataStorageStatusMsgPayload instances to it using the addStorageUnitToTransmitter() method:
transmitter.addStorageUnitToTransmitter(storageMsg)
Next, attach available AccessMsgPayload instances using the addAccessMsgToTransmitter() method:
transmitter.addAccessMsgToTransmitter(accessMsg)
The final step is to add the model to task:
scenarioSim.AddModelToTask(taskName, transmitter)
Follow the Module: partitionedStorageUnit or Module: simpleStorageUnit instructions to add the transmitter to a storage unit.
For more information on how to set up and use this module, see the simple data system example: scenarioDataDemo
- 
class SpaceToGroundTransmitter : public DataNodeBase¶
- #include <spaceToGroundTransmitter.h>space to ground data transmitter class Public Functions - 
SpaceToGroundTransmitter()¶
- Constructor, which sets the default nodeDataOut to zero. 
 - 
~SpaceToGroundTransmitter()¶
 - 
void addStorageUnitToTransmitter(Message<DataStorageStatusMsgPayload> *tmpStorageUnitMsg)¶
- Adds a dataStorageStatusMsgPayload name to be accessed by transmitter. - Parameters
- tmpStorageUnitMsg – A spacecraft state message name. 
- Returns
- void 
 
 - 
void addAccessMsgToTransmitter(Message<AccessMsgPayload> *tmpAccessMsg)¶
- Adds a msg name to ground location access list - Parameters
- tmpAccessMsg – input name. 
- Returns
- void 
 
 Public Members - 
double packetSize¶
- Size of packet to downklink (bytes) 
 - 
int numBuffers¶
- Number of buffers the transmitter can access. 
 - 
std::vector<ReadFunctor<DataStorageStatusMsgPayload>> storageUnitInMsgs¶
- vector of input messages for storage unit messages 
 - 
std::vector<ReadFunctor<AccessMsgPayload>> groundLocationAccessInMsgs¶
- vector of input message for ground location access 
 - 
std::vector<DataStorageStatusMsgPayload> storageUnitMsgsBuffer¶
- local copy of data storage messages 
 - 
uint64_t hasAccess¶
- class variable 
 - 
BSKLogger bskLogger¶
- class variable 
 Private Functions - 
void evaluateDataModel(DataNodeUsageMsgPayload *dataUsageMsg, double currentTime)¶
- Loads the nodeDataOut attribute into the dataUsageMessagePayload instance. - Parameters
- dataUsageSimMsg – 
- currentTime – 
 
 
 - 
bool customReadMessages()¶
 Private Members - 
double packetTransmitted¶
- Amount of packet downlinked (bytes) 
 - 
double currentTimestep¶
- Current timestep tracked for data packet integration. 
 - 
double previousTime¶
- Previous timestep tracked for data packet integration. 
 - 
std::vector<AccessMsgPayload> groundLocationAccessMsgs¶
- local copy of ground access messages 
 
- 
SpaceToGroundTransmitter()¶