About Moonlander
Moonlander is a research-oriented C++ simulation platform for spacecraft dynamics, propulsion modeling, guidance and control. The project is evolving from a classical lunar landing simulation into a modular engineering environment for developing and testing spacecraft subsystems.
Rather than focusing on visualization or gameplay, the platform is designed around clear system boundaries, explicit physical modeling, and extensible software architecture. The goal is to provide a technically sound environment for experimentation with propulsion, control systems, and flight dynamics.
Research Platform Overview
The simulation backend is implemented as a modular C++ core with clearly separated subsystems for dynamics, propulsion, control, configuration, and telemetry. Spacecraft configurations are defined externally via JSON, allowing new vehicle concepts to be introduced without modifying the simulation code.
The current simulation supports three-dimensional translational spacecraft dynamics with vectorized force representation and is architecturally prepared for future extension toward full 6-DOF rigid-body dynamics.
System Architecture
Moonlander follows a modular architecture where each subsystem can be developed and extended independently. The backend simulation core is decoupled from the frontend through a thread-safe interface using Qt signal-slot communication.
- Dynamics: 3D translational spacecraft dynamics with vector-based force aggregation
- Propulsion: Multi-engine architecture with centralized Thrust Orchestrator
- Control: Manual and automated control via InputArbiter and controller modules
- Configuration: JSON-based spacecraft and simulation setup via ConfigManager
- Telemetry: Structured simulation output via SimData for UI and analysis
- Frontend: Qt-based cockpit interface with real-time visualization
Propulsion System
The propulsion subsystem is built around a centralized Thrust Orchestrator that manages multiple engines and fuel tanks. Each engine is modeled independently and contributes to the overall thrust vector through a unified interface.
A clear separation is made between command input, actuator state, and resulting physical thrust:
- Main Engine: Scalar thrust model with dynamic response (ME_ThrustState)
- RCS: Vector-based command structure for translational control (RCS_ThrustState)
- Engine Selection: EngineType-based interface for querying individual or aggregated thrust
- Fuel System: Multi-tank support with engine-specific fuel consumption
This architecture allows realistic modeling of propulsion behavior while remaining extensible for future actuator and control models.
Guidance and Control
Moonlander supports both manual and automated control paths. User input is processed through a dedicated InputMapper and combined with automated control commands via an InputArbiter.
The current control stack includes:
- Adaptive Descent Controller: Energy-based landing guidance with phase switching
- PD Velocity Control: Gravity-compensated velocity tracking with thrust limits
- Manual RCS Control: Discrete command mapping to 3D translational inputs
Configuration and Data Flow
Spacecraft are defined using external JSON configuration files, including mass properties, inertia, engine layouts, and fuel systems. This enables rapid prototyping of new vehicle configurations.
Simulation data is collected in structured output containers and transmitted to the frontend, enabling real-time visualization and future extensions toward data logging and analysis workflows.
Current Development Status
- 3D translational spacecraft dynamics implemented
- Multi-engine propulsion architecture with thrust aggregation
- Separation of main engine and RCS control models
- JSON-based spacecraft configuration system
- Manual input mapping for RCS and main engine control
- Adaptive descent guidance for automated landing
- Preparation for RCS actuator modeling and future 6-DOF dynamics
Goals and Vision
The long-term objective of Moonlander is to evolve into a flexible research platform for spacecraft propulsion, guidance, and control.
- Extension toward full 6-DOF rigid-body dynamics
- Detailed RCS thruster modeling and actuator dynamics
- Advanced guidance and control strategies
- Support for multi-phase missions including orbital operations
- Improved telemetry, logging, and analysis capabilities
The focus remains on building a technically robust simulation environment that enables structured experimentation with spacecraft systems rather than a fixed, scenario-specific application.