Editor: Data Storage Manager
Description
The Partitioned Storage System
is used to store binary data on a spacecraft or ground station for use with the TT&C system. By itself, it does not have any logic or software for controlling when data can be entered into the system. It only handles the reading and writing of data and converts it into the required formats. The Data Storage Manager
is a component model that can be added to the storage system. This is a model that can handle tracking messages, downlinking the data and connecting to the telemetry subsystem onboard the spacecraft.
This guide demonstrates how to use this model and how to add it to a storage system. For examples of how to use the model, check out the scenario Demo_CustomDataTM
in the Data
folder of the demos in Nominal Editor.
Adding the Model
Once a storage system has been added to the entity required (both spacecraft and ground stations can access the storage), to add the manager, use the Add Component by Class
Blueprint node and find the Data Storage Manager
. The target must be connected to the storage system.
When creating the storage manager, there is a field named Write Period
. This defines the time in simulation seconds between writing the data from the stored messages to the data storage system. This will apply the write action to every single message that is being tracked.
Registering Messages
To track messages in the storage manager, this can be done using the Register Message
function which takes in the reference to the message. Any number of messages can be registered and these are directly written into the data storage system whenever the period in simulation seconds is reached. The return value from the function will output whether the message can be registered.
Once registered, the messages will be saved in the database until the simulation ends. However, they can be unregistered using a similar function Deregister Message
. Additionally, to unregister all the messages, use the Deregister All
function.
Transmitting Data
When it is time to upload the data to the TT&C system, this function will transmit data from the system over the network via a transmitter. This can be found on the manager under Transmit Stored Data
. It takes in a transmitter and a message name.
The Message Name
field will attempt to find a message with a particular name that exists to transmit. This will be the name of the message type (for example, BodyStatesMessage
). If it is left blank, all messages that have been tracked will be uploaded over the network and removed from the storage system.
Note
When using the Operating Computer
, this may be done automatically and the system may find the storage manager and handle transmitting the data over a valid connection.
Metrics
There are a number of ways to gather metrics from the storage manager system. This includes the number of messages stored, the number of registered messages and the number of messages received.
Exporting Data as CSV
Once the data has been stored after some time in the storage system (either from the transmitter or receiving object), it can be exported to a CSV table. This will format the messages from the storage system into a CSV file with all the parameters listed in a file path. The Path
has to be a full file path to a new CSV file that will be created. This can be done by calling Export Messages to CSV
.
Note
For this CSV file, a pipe ( | ) will be used instead of a comma, to avoid issues with the JSON parameters.
The field Use Formatted Time
will turn the raw timestamp (in UNIX seconds since the 1st Jan 1970 epoch) to a formatted date-time in the YYYY/MM/DD hh:mm:ss
format. The Delete
field will remove all data from the storage system once exported if enabled. The data may look like the following:
Warning
Depending on the amount of data and if the data has been broken due to error models, the process of exporting the data may take some time.