Simulation
The simulation environment of the Spaceflight Dynamics Framework (SDF) is designed as a modular spacecraft dynamics and research platform implemented in modern C++.
SDF combines propulsion modeling, guidance and control logic, telemetry generation, subsystem-oriented architecture design, and real-time visualization within a reproducible simulation workflow.
The current development milestone focuses on establishing a complete full-state 6DOF-capable simulation architecture while maintaining clean separation between frontend, backend, command flow, physics propagation, propulsion systems, and telemetry transport layers.
Rather than targeting a single fixed scenario, the framework is intended to evolve toward a reusable research environment for future spacecraft dynamics experimentation and autonomous flight studies.
Simulation Demonstration
The following example shows a representative research-oriented simulation scenario including spacecraft motion, propulsion response, RCS activity, fuel state, and real-time telemetry visualization in the cockpit interface.
Architecture & Data Flow
The simulation is built around a modular C++ backend with a clear separation between physics, propulsion, control, configuration, telemetry, visualization, and frontend/backend interface boundaries.
- Simulation Core: C++ backend for dynamics, propulsion, control, sensors, optimization, and telemetry
- Command Flow: Separation of operator input, structured flight commands, actuator commands, and physical force output
- Propulsion System: Central Thrust Orchestrator managing main engine, RCS thrusters, thrust allocation, and fuel tanks
- Telemetry Interface: Current Qt signal-slot communication between backend worker thread and frontend
- Frontend Architecture: Refactored Qt-based application shell with centralized page routing, telemetry visualization, and modular cockpit pages
- Future Interface: DTO mapping and ROS-based communication layer for frontend/backend decoupling
- Frontend: Qt-based cockpit for real-time visualization, operator input, and presentation-oriented feedback
Propulsion Modeling
The propulsion subsystem is based on a multi-engine architecture with a centralized Thrust Orchestrator. Each engine model owns its own actuator state and contributes to the resulting spacecraft thrust vector through its configured direction.
- Main Engine: Scalar thrust force model with dynamic response, target tracking, direction handling, and fuel consumption
- RCS Thrusters: Individual binary thruster models with command delay, first-order actuator dynamics, scalar thrust output, and propellant consumption
- RCSControlAllocator: Maps translational axis commands to the corresponding individual RCS thrusters
- Engine Selection: EngineType-based interface for querying total propulsion output, main engine output, or RCS output
- Fuel System: Multi-tank support with engine-to-tank assignment and engine-specific mass flow
This separation keeps actuator dynamics, command allocation, fuel consumption, and force aggregation modular, traceable, and testable.
Telemetry and Research Data
Runtime data is collected for cockpit visualization and future analysis workflows. The cockpit presents selected operational data, while the underlying telemetry path is being prepared for full export, post-processing, and frontend-independent transport.
- Cockpit Telemetry: Position, velocity, thrust, target thrust, fuel state, g-load, hull state, and active RCS thrusters
- Engine-Level RCS Data: Individual RCS engine identification, axis assignment, current thrust, target thrust, and actuator state
- Frontend DTOs: Frontend-specific telemetry structures such as RCSCockpitTelemetry reduce dependency on backend domain structs
- Telemetry Mapping Layer: Dedicated frontend telemetry DTO mapping prepared for future backend/frontend decoupling
- Future Export: XML/CSV-style telemetry output for reproducible research runs, plotting, and validation
- Future Transport: ROS-based interface for replacing the frontend without changing backend simulation logic
Model Scope & Assumptions
- Three-dimensional translational spacecraft dynamics
- Central-body lunar gravity model
- Discrete-time numerical integration
- Vectorized force and thrust representation
- Multi-engine propulsion with main engine and RCS thrusters
- Individual RCS actuator dynamics for translational control
The current simulation milestone intentionally focuses on translational spacecraft dynamics while the surrounding software architecture is already prepared for future rigid-body 6DOF extension.
Engine positions, thrust directions, RCS states, and torque-relevant architecture are already being prepared for future rotational dynamics, attitude stabilization, and full spacecraft state propagation.
A detailed mathematical formulation is provided in the Mathematics section.
Research Direction
SDF is currently transitioning from a dedicated lunar landing simulation toward a broader spaceflight dynamics research framework.
The architectural focus is shifting toward modularity, subsystem separation, telemetry abstraction, frontend/backend decoupling, and extensibility for future simulation workflows.
- Current milestone: M1 - Full 6DOF Simulation
- Current state: Pre-release development build
- Planned release line: v0.2 - SDF Research Release
- Future direction: Extensible spacecraft dynamics and control research environment
