Soyuz-TMA Simulator - Realistic C++ Systems & Clickable Cockpit

VSoyuz — A Soyuz and ISS Spaceflight Simulator Built with Unreal Engine 4.27

Hello everyone!

I’d like to share a few screenshots from my project, VSoyuz, a spaceflight simulator I’ve been working on.

The project focuses on simulating the Soyuz spacecraft and the International Space Station (ISS). The goal is not simply to create a visually appealing space environment, but to bring together 3D visualization, spacecraft orbital dynamics, mathematical models of motion, and the simulation of real onboard systems.

The project is being developed step by step. Some components are already functional, while others are still undergoing development, research, and validation.

I’d like to give you a brief overview of how several parts of the project work.


1. Earth, Atmosphere and the International Space Station

The first screenshots show the ISS against the background of Earth.

Earth is represented as a separate 3D object within the space environment. Its visualization uses spherical geometry, textured materials, and dedicated cloud components.

For atmospheric rendering, the project uses the built-in Sky Atmosphere system in Unreal Engine 4.27.

It is responsible for visual atmospheric light scattering, the atmospheric limb, and the transition between ground-level and orbital views.

The implementation uses:

  • Rayleigh scattering — molecular scattering of sunlight;
  • Mie scattering — scattering caused by aerosols and atmospheric particles;
  • atmospheric light absorption and scattering;
  • interaction between the atmosphere and the directional light source.

The current Sky Atmosphere configuration uses an Earth radius of 6,371 km and an atmospheric shell height of 60 km.

The Sun’s direction is calculated separately. The mathematical part of the project includes the sun_direction_j2000() function, which determines the Sun’s direction in the J2000 inertial reference frame.

This direction is then used to synchronize the Unreal Engine Directional Light with the calculated solar position.

A geometric model of Earth’s shadow is also implemented, including the umbra and penumbra.

One important distinction: I am currently working on verifying the physical consistency of the visual atmosphere. A convincing atmospheric limb does not necessarily mean that the underlying optical model is fully calibrated.

ISS Positioning

The station’s position in space is treated as part of the mathematical simulation rather than as an arbitrary movement of a 3D object within the scene.

The project is designed to work with the station’s orbital state, including its position, velocity, and attitude.

The calculated state is transformed into Unreal Engine coordinates and then used to position and orient the corresponding 3D representation.

The rotational dynamics model includes a quaternion-based attitude representation, angular velocity, and an inertia tensor.

I am also developing a model of the ISS gravity-gradient torque. This is an interesting physical effect in which the non-uniformity of Earth’s gravitational field produces a torque on an extended spacecraft structure.

In the future, I want to simulate how this torque changes with different station configurations, including docked visiting spacecraft.


2. The Neptune Cosmonaut Control Panel

The next screenshots show another interesting part of the project: the recreation of the Neptune onboard cosmonaut control panel.

This is not simply a control panel drawn in a 3D editor.

The goal is to reproduce the software architecture of a real onboard display system used to present information and allow cosmonauts to interact with spacecraft systems.

The underlying concept is based on a screen-format architecture.

How Screen Formats Work

The screen should not be a collection of predefined static images.

Its contents are determined by format descriptions that define the positions of elements, text areas, graphical objects, buttons, indicators, and other components.

The project involves studying and porting the original Neptune resource system, including the RUNTIME.SFT file, fonts, and graphical resources.

A dedicated C++ system called SFS is being developed to interpret these resources.

Its architecture includes:

  • ScreenFormat — representation of a screen format;
  • ScreenFormatRT — runtime resource format handling;
  • SFitem — individual screen elements;
  • a screen-format registry;
  • cluster activation and deactivation logic;
  • a dedicated graphics rendering layer.

Bitmap fonts, palettes, and graphical primitives are handled separately.

The screen area is designed around the original 640 × 480 resolution.

How the Image Is Generated

Instead of manually creating every screen, the system reads the format description, interprets its elements, and generates the resulting image in a graphics buffer.

The buffer is then rendered within the application interface.

This approach makes it possible to support multiple screen formats while preserving their original structure and rendering principles.

At the current stage, the project has a working foundation for the screen system, a resource-handling layer, and a partial implementation of the first screen format, F1.

Loading RUNTIME.SFT and activating selected clusters are already implemented in a separate integration path.

However, universal support for all screen formats and full functional equivalence with the original onboard system are still ongoing development tasks.

Camera and Display Architecture

An important design principle is the separation between the data source, screen-format logic, and visual representation.

The rendering system should receive the already-generated screen state rather than contain the operational logic of every onboard subsystem.

This makes it possible to develop the display interface independently of the underlying mathematical models and telemetry sources.


3. The Soyuz Spacecraft

The next series of screenshots focuses on the spacecraft itself.

The 3D Soyuz model serves as the visual representation of an individual spacecraft within the shared space environment.

It is important to me that the spacecraft does not simply look good next to the station. It should have its own calculated physical state.

Position and Attitude

The spacecraft’s mathematical model separates several fundamental quantities:

  • center-of-mass position;
  • linear velocity;
  • attitude;
  • angular velocity;
  • mass properties;
  • control inputs.

The spacecraft’s position is linked to its orbital state, while its attitude is determined by rotational dynamics and control inputs.

Quaternion-based attitude representation is used to describe its orientation.

This allows arbitrary three-dimensional orientations to be handled without the singularities associated with directly using Euler angles.

Spacecraft Control

Another major development area is the simulation of spacecraft onboard control systems.

The project investigates and implements mathematical models of onboard systems, including:

  • КДУ — propulsion system;
  • ДПО — docking and attitude-control thrusters;
  • КУРС — rendezvous and approach system;
  • БЦВК — onboard computer complex;
  • ССВП — docking and internal transfer system.

Particular attention is paid to ensuring that control inputs are connected to the spacecraft’s mathematical model of motion.

For example, when attitude-control thrusters fire, the spacecraft’s rotational state must change according to the actual forces and torques applied, rather than merely changing the visual appearance of the vehicle.

The DPO system includes 28 individual thruster nozzles, each with its own position and thrust direction defined in the spacecraft’s body-fixed coordinate system.

This provides the foundation for independently simulating nozzle activation and subsequently visualizing the corresponding exhaust plumes.

Further development will focus on manual control modes, rendezvous, approach, and docking procedures.


4. The Overall Project Concept

The main objective of VSoyuz is to combine several levels of simulation within a single environment.

Level 1 — Mathematical Simulation

This includes orbital calculations, coordinate reference frames, kinematics, and the dynamics of spacecraft motion.

Level 2 — Onboard Systems

This covers models of spacecraft equipment, onboard computers, propulsion systems, attitude control, rendezvous, and docking systems.

Level 3 — Visualization

The visualization layer should represent the state of the mathematical simulation: spacecraft positions, attitudes, lighting, atmospheric effects, and physical processes.

I also plan to develop a dedicated Verification and Validation (V&V) system to check the mathematical models against independent reference data and technical documentation.

My goal is to gradually move beyond visually convincing graphics towards scientifically and engineering-grounded simulation.


Conclusion

VSoyuz is currently under active development. Some subsystems already have a substantial software foundation, while others are still going through research, implementation, and validation.

This is a project I am developing out of a strong interest in space exploration, spacecraft engineering, and the technical side of human spaceflight.

In particular, I am interested in feedback on:

  • Earth and atmospheric visualization from orbit;
  • large-scale spatial coordinate systems;
  • orbital dynamics;
  • lighting and eclipse simulation;
  • recreating complex technical onboard interfaces.

Thank you for taking the time to check out my project!

VSoyuz — November Development Update

So, we’ve just rolled out a new update!

November DevLog

Here’s what we’ve accomplished this month:

  • Soyuz onboard software: Implemented and refined the spacecraft’s onboard software, bringing its systems and operational logic to the required level of consistency and functionality.

  • Automated docking: Implemented the docking algorithms. The Soyuz spacecraft can now perform an autonomous docking procedure.

  • Orbital mechanics: Improved the accuracy of the orbital flight dynamics mathematical model by four orders of magnitude.

  • 3D spacecraft and ISS models: Created a detailed 3D model of the Soyuz-TMA spacecraft and completed the International Space Station (NASA edition) model to bring it closer to its actual configuration.

1. Spacecraft Dynamics and Orbital Mechanics

The core of VSoyuz is built around a dedicated mathematical model of the Soyuz spacecraft, separated from the Unreal Engine presentation layer.

The SoyuzModel and SoyuzContext components provide the foundation for spacecraft state calculations and simulation logic.

The simulation includes:

  • Orbital motion and spacecraft state propagation.

  • Translational and rotational dynamics.

  • Mass properties and center-of-mass calculations.

  • Forces and torques generated by the propulsion system.

  • Integration between spacecraft dynamics and onboard control systems.

  • Initial condition handling and simulation time management.

The mathematical model has undergone a major accuracy improvement, with a reported four-order-of-magnitude increase in orbital propagation accuracy.

An important architectural decision is the separation of physical calculations from visual representation. Unreal Engine is responsible for rendering and interaction, while the underlying C++ models handle the simulation logic.

2. Onboard Control Systems

A substantial part of this update has focused on implementing the spacecraft’s onboard systems and their interaction.

SUD — Automatic Docking Control System

The SUD (Система управления движением) is responsible for controlling the spacecraft during rendezvous and docking.

Its implementation includes:

  • Automatic and manual control modes.

  • Control authority and command ownership management.

  • Orbital reference frames.

  • Approach corridor geometry.

  • Trajectory and waypoint planning.

  • Final approach guidance.

  • Safety holds and abort procedures.

  • Manual control through the spacecraft’s control interfaces.

  • Integration with the KURS navigation system.

The control architecture explicitly manages ownership of control outputs, preventing automatic and manual control channels from issuing conflicting commands.

The automatic docking procedure includes an intermediate holding phase at approximately 100–200 metres. Final approach requires an explicit authorization signal, rather than automatically proceeding directly to contact.

KURS — Rendezvous and Navigation System

The KURS subsystem has its own mathematical model (KursModel) and program logic (KursProgram).

Its responsibilities include:

  • Target acquisition and tracking.

  • Circular search and automatic tracking.

  • Range and relative velocity measurements.

  • Angular measurements and relative roll determination.

  • Antenna and transponder operation.

  • Multiple antenna sets and independent failure states.

  • Signal validity and target availability monitoring.

  • Final approach readiness signals.

  • Navigation system diagnostics.

The model also includes measurement limitations, signal failures, noise simulation and loss-of-lock handling.

KDU — Propulsion System

The KDU (KduModel) simulates the spacecraft propulsion system.

The implementation covers:

  • Main and attitude-control thrusters.

  • DPO thruster operation.

  • SKD main engine operation.

  • Propellant and oxidizer consumption.

  • Tank and system pressure.

  • Propulsion system configuration and valve states.

  • Engine gimbal movement.

  • Startup and shutdown sequences.

  • Failure conditions.

  • Generated forces, moments and mass flow.

A particularly important feature is the central БА ДПО compensation algorithm.

It calculates additional thruster impulses to compensate for unwanted forces and moments generated by the selected main propulsion commands.

The model also distinguishes between continuous valve operation and fixed-width impulse operation. The RUO pulse implementation uses approximately 35 ms full-thrust pulses, rather than treating the thrusters as continuously throttleable engines.

ССВП — Docking Mechanism

The SSVP subsystem models the mechanical docking process rather than simply switching the spacecraft into a docked state when two visual models touch.

It includes:

  • Docking contact detection.

  • Axial and lateral alignment.

  • Contact velocity checks.

  • Mechanical capture geometry.

  • Latch engagement.

  • Physical coupling confirmation.

  • Post-capture stability.

The implementation distinguishes between visual/geometric contact, successful capture and actual mechanical coupling.

This prevents a false docking indication when the spacecraft merely touches the station without completing the mechanical capture sequence.

3. Autonomous Rendezvous and Docking

One of the most important milestones is the implementation of a closed-loop autonomous rendezvous and docking sequence.

The automatic control system can:

  1. Acquire the target and begin tracking.

  2. Calculate the relative position and velocity.

  3. Control the approach trajectory.

  4. Enter the 100–200 m holding region.

  5. Wait for crew authorization.

  6. Begin the final approach.

  7. Maintain alignment and closing velocity.

  8. Perform the docking contact and mechanical capture.

  9. Confirm the physically coupled state.

Abort and retreat logic is also implemented, allowing the spacecraft to stop the approach and return to a safe holding condition.

The system supports different ISS docking nodes, including SMpx, MIM1, MIM2 and SO1, with node-specific approach corridor geometry.

4. NEPTUN — Onboard Displays and Crew Interfaces

VSoyuz includes the NEPTUN subsystem, which recreates the spacecraft’s onboard display and control environment.

It is implemented as a separate Unreal Engine module (NeptunME).

The subsystem includes:

  • VKU (ВКУ) display rendering.

  • Multiple display formats.

  • БФИ telemetry presentation.

  • УСО command processing.

  • КСП-related command interfaces.

  • ПРВИ input and command processing.

  • Control word editing.

  • Time input and alarm interfaces.

  • System diagnostics.

  • Communication bridges between the onboard interfaces and simulation models.

The display system uses its own rendering and font infrastructure, rather than relying entirely on standard Unreal Engine text rendering.

Several additional diagnostic formats have been integrated, including:

  • 3F41 — SPS diagnostics.

  • 3F43 — RS-232 diagnostics.

  • 3F44 — MIL-1553 diagnostics.

  • 3F45 — Software diagnostics.

  • 3F46 — УСО diagnostics.

The interface architecture is designed to connect onboard commands and telemetry with the actual simulation subsystems.

5. Space Environment and Visual Simulation

The Unreal Engine scene is responsible for presenting the spacecraft, the ISS and the surrounding space environment.

The scene implementation includes:

  • Soyuz spacecraft representation.

  • ISS geometry and docking nodes.

  • Earth rendering.

  • Atmospheric scattering.

  • Procedural cloud generation.

  • Night-side illumination.

  • Sun illumination and shadows.

  • Earthshine.

  • Star field rendering.

  • Cockpit and external camera systems.

  • VSK and VKU camera systems.

  • Docking-related visual diagnostics.

The Earth rendering system includes procedural cloud generation, atmospheric parameters, night lighting and illumination effects.

The scene also includes dedicated camera mounting positions and field-of-view parameters for the spacecraft and station cameras.

Visual rendering and physical simulation are kept as separate concerns, with the scene receiving the calculated spacecraft state from the simulation models.

6. Verification and Regression Testing

A separate collection of standalone C++ test environments has been created to verify important simulation components without requiring Unreal Engine.

The latest supplied regression evidence contains the following results:

Test suite Result
КДУ operating modes 6/6 PASS
СУД/KКДУ/ССВП unit tests 98/98 PASS
Autonomous rendezvous closed-loop scenarios 11/11 PASS
Final docking physical-model scenarios 4/4 PASS
КУРС model tests 65/65 PASS
КУРС A19-to-VKU bridge tests 4/4 PASS
Total 188/188 PASS

These results demonstrate that the tested standalone model components pass their supplied regression scenarios.

The tests cover:

  • Automatic and manual control ownership.

  • Propulsion compensation.

  • Thruster pulse timing.

  • Approach corridor geometry.

  • Docking node selection.

  • Safety conditions.

  • Navigation signal failures.

  • Target acquisition and tracking.

  • Range and velocity measurement boundaries.

  • Mechanical capture conditions.

  • Abort and retreat behavior.

  • Correct transfer of raw КУРС A19 data into ВКУ formats 43 and 44.

The КУРС bridge tests also verify that the original 16-bit А19 data is transferred without replacing it with an internal diagnostic word.

1 Like

First automation docking with Radio system KURS