Introduction
This document describes the core components of the CDH software architecture.
Block Diagram
The CDH Software Block Diagram
Telemetry Manager (TM)
The Telemetry Manager collects and packages telemetry data from subsystems and then sends the data to the Comms task for downlink.
- Receiving telemetry from subsystem tasks
- The subsystem tasks will periodically collect telemetry data and write the data to subsystem-specific telemetry files. These files will be uniquely identified by their file name (<subsystem task name>_<batch ID>).
- The batch ID groups together all the data that’ll be downlinked together. The TM will generate the telemetry file for each task and give them the file name.
- Packaging telemetry
- The TM will combine the telemetry files into a single telemetry batch file
- Sending telemetry to Comms task
- The TM will send the file name to the Comms task. The Comms task will read from this file and package it however they want.
Command Manager
The Command Manager deals with uplinked commands received from the Communications task.
- Uplinked commands are parsed to determine the required action and any associated data. The parsed command is then forwarded to the task responsible for the required action.
- For example, imagine we receive a command struct containing the
MOVE_CUBESAT
command and a (longitude, latitude)
coordinate. We’d parse the struct to extract the command and coordinate, then forward the parsed command to the ADCS task’s event queue to move the satellite.
- When an immediate command is received, it’s parsed and forwarded immediately.
- Using the above example, if the command packet is flagged as
Immediate
, then the parsed command would be sent to the ADCS task immediately after parsing.
- When a time-tagged command is received, there are a few more steps. The packet is parsed and added to a queue of received commands with the earliest command at the front. The timestamp of the earliest command is set as an RTC (real-time clock) alarm which, when triggered, forwards the parsed command.
- Using the above example, if the command packet was set to be triggered at
13:00:00
, we’d set an RTC alarm for that time (once the command is at the front of the queue). Then, once the time reaches 13:00:00
, the RTC triggers an interrupt which we’d handle by sending the parsed command to the ADCS task.
- The time-tagged commands should also be stored in FRAM. On reboot, all time-tagged commands will be loaded from FRAM into the queue.
Here’s a brief diagram of how this works if there’s no queue and only one command is received.
Health Manager
The Health Manager monitors the health of each subsystem and starts a recovery sequence depending on the issue.