How sudochris/spacecraft-telemetry-control works
This C++ proof-of-concept simulates spacecraft thermal behavior and closes a telemetry/command loop between a simulator and a graphical ground station over MQTT. The simulator updates a thermal model, assembles thermal and randomized power readings, serializes and publishes telemetry; the ground station receives and displays it, and publishes heater commands back for simulator-side decoding and application. The README documents broader protocol types and SI-unit support; paths for several implementations are present in the tree but their details were not sampled, so their internal wiring is shown only where supported.
Main entry points: spacecraft_sim/main.cpp Spacecraft Simulator · mqtt_transport.cpp MQTT Transport · ground_station/main.cpp Ground Station Entry · text_telemetry_serializer.cpp Text Telemetry Serializer
Components 17
Applications
- Spacecraft Simulator
apps/spacecraft_sim/main.cpp - Ground Station Entry
apps/ground_station/main.cpp - Ground Station UI
apps/ground_station/src/ground_station_ui.cpp
Communication
- Topic Names
libs/communication/include/communication/topics.hpp - MQTT Transport
libs/communication/src/transport/mqtt_transport.cpp - Telemetry Publisher
libs/communication/src/downlink/telemetry_publisher.cpp - Text Telemetry Serializer
libs/communication/src/downlink/text_telemetry_serializer.cpp - Command Publisher
libs/communication/src/uplink/command_publisher.cpp - Text Command Serializer
libs/communication/src/uplink/text_command_serializer.cpp
Spacecraft Model
- Thermal Subsystem
libs/spacecraft/src/thermal/thermal_subsystem.cpp - Simulated Temperature Sensor
libs/spacecraft/src/thermal/simulated_temperature_sensor.cpp - Simulated Heater
libs/spacecraft/src/thermal/simulated_heater.cpp
Shared Protocol
- Telemetry Types
libs/protocol/include/protocol/telemetry.hpp - Command Types
libs/protocol/include/protocol/command.hpp - Typed SI Units
libs/protocol/include/protocol/si.hpp
Other components
- Operator
- MQTT Broker
Connections 29
- Operator → Ground Station UI: uses controls
- Spacecraft Simulator → Thermal Subsystem: updates model
- Thermal Subsystem → Simulated Temperature Sensor: reads and updates
- Thermal Subsystem → Simulated Heater: checks state
- Spacecraft Simulator → Simulated Heater: applies command
- Spacecraft Simulator → Telemetry Types: assembles readings
- Spacecraft Simulator → Text Telemetry Serializer: serializes
- Text Telemetry Serializer → Telemetry Types: encodes
- Spacecraft Simulator → MQTT Transport: publishes telemetry
- MQTT Transport → MQTT Broker: sends messages
- MQTT Broker → MQTT Transport: delivers messages
- MQTT Transport → Spacecraft Simulator: dispatches command
- Spacecraft Simulator → Text Command Serializer: decodes command
- Text Command Serializer → Command Types: produces typed command
- Ground Station Entry → MQTT Transport: subscribes telemetry
- MQTT Transport → Ground Station Entry: dispatches telemetry
- Ground Station Entry → Text Telemetry Serializer: decodes telemetry
- Text Telemetry Serializer → Telemetry Types: produces readings
- Ground Station Entry → Ground Station UI: updates display
- Ground Station UI → Command Publisher: requests command
- Command Publisher → Text Command Serializer: serializes command
- Text Command Serializer → Command Types: encodes typed command
- Command Publisher → MQTT Transport: publishes command
- Telemetry Publisher → Text Telemetry Serializer: serializes data
- Telemetry Publisher → MQTT Transport: publishes message
- Spacecraft Simulator → Topic Names: uses topics
- Ground Station Entry → Topic Names: uses topics
- Thermal Subsystem → Typed SI Units: uses quantities
- Telemetry Types → Typed SI Units: uses quantities