# \[WIP\] Soyuz-TMA Spacecraft Simulator | Procedural Onboard Systems Simulator in C++ 

**URL:** <https://forums.unrealengine.com/t/wip-soyuz-tma-spacecraft-simulator-procedural-onboard-systems-simulator-in-c/2853460>\
**Category:** Game Development\
**Tags:** unreal-engine\
**Created:** [November 10, 2026, 5:28pm UTC](https://forums.unrealengine.com/t/wip-soyuz-tma-spacecraft-simulator-procedural-onboard-systems-simulator-in-c/2853460 "2026-11-10T17:28:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDT.misha](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sdt.misha/32/1219843_2.png) [@SDT.misha](https://forums.unrealengine.com/u/SDT.misha)\
**Post date:** [November 10, 2026, 5:28pm UTC](https://forums.unrealengine.com/t/wip-soyuz-tma-spacecraft-simulator-procedural-onboard-systems-simulator-in-c/2853460/1 "2026-11-10T17:28:29Z")

</div>

Hello, everyone!

I’d like to show you a project I’ve been working on: a procedural simulator of the Soyuz-TMA transport spacecraft. This is not a “space game”. It is an attempt to reproduce the algorithms and logic of the real onboard systems, so that a flight can be carried through from launch to landing:

- Ascent

- Orbital flight

- Far and near rendezvous

- Final approach and docking

- Docked flight

- Undocking and descent

The flight can be flown automatically, following the standard flight sequence, where the cosmonaut issues commands according to the onboard documentation. It can also be flown manually (discrete and analog control loops). Off-nominal situations can be set up in advance: an equipment failure will force you to switch to manual control.

Onboard systems:

This is the largest part of the project. Each system is built as a separate, portable C++98 model with no dependency on the engine.

СУД: Motion Control System (Чайка-3/Argon-16 onboard computer):

- The kinematic loop is built as a corrected strapdown inertial navigation system (БИНС): the instrument basis is propagated with quaternions and integrated from the correction rates.

- The dynamic loop produces relay-type firing programs for the attitude thrusters (ДПО): dead zone, minimum pulse length, pauses between pulses, and the hand controller (РУО) characteristic.

- All nominal ISS attitude modes: ОСК (orbital frame), ИСК (inertial frame), ИСК+ТП. For ОСК there is a geometric construction of the basis from the position and velocity vectors.

- Programmed turn to a Lпр setpoint, the «ПСК запом» command, and detection of an invalid setpoint.

- The ПЛУ (program-logic control) executes the propulsion timing cycle: single and double burns, using either the main engine (СКД) or the ДПО-Бт thrusters, predictive cutoff that accounts for the thrust “tail”, and an emergency stop at the guaranteed fuel reserve (ГОТ).

- A БДУС-I model with two sets: startup and self-test sequencer, gyro noise and drift, hot reserve and switchover.

- An onboard computer (БЦВК) model: RAM, control words, flags, КСП commands, and ПРВИ code exchange.

КДУ: Combined Propulsion System:

- Main engine СКД (about 300 kgf, Isp about 302 s) with a ±5° gimbal in pitch and yaw.

- 28 ДПО thrusters (ДПО-Б and ДПО-М), each with its own geometry, firing-count lifetime, and thrust rise and decay time constants.

- Two sections: pneumatic system, tanks, ЭПКН, КО, pyro valves, collector merging (ПК1, ПК2, ПК3/ПК4), and selection of the ДПО-Б1/Б2 sets.

- The full sequence of pre-start operations and telemetry signals (for example, ТС3-4 «Наддув КДУ ММА»).

- Propellant consumption, mass held in the lines, and forces and moments about the current center of mass.

- Failures: stuck СКД cover, failure to start, tank and line leaks, ДПО valves stuck open or closed, accelerometer failure.

- A ring-buffer event log and state serialization.

КУРС: Radio Rendezvous System:

- Modes: search, auto-tracking, ЗАО/ЗАС, pointing, final approach, and control test.

- Range up to 400 km with a 100 km phase ambiguity, and 7° and 5° capture zones.

- Measures range, closing rate, line-of-sight angles, bearing, and relative roll (taking the roll-base flag into account).

- Validity word, channel failures, a check of the retracted 2АО antenna position at short range, and deterministic noise for regression tests.

In local tests in C++ Builder 2006, the control loop is closed with a result of 387 PASS / 0 FAIL. The models were built from documentation I found, with consultations from specialists who developed these systems.

Orbital motion model:

- Integrators: RK4 with a sub-step of at most 0.01 s, and adaptive RKF45.

- Gravity: central field + J2-J8, or the full EGM96 8x8 model, with solar and lunar perturbations and gravity-gradient torques.

- Atmosphere: 19 density layers (US Std 1976 + MSISE-90) driven by F10.7 and Ap. Solar radiation pressure with a smooth shadow function.

- Earth orientation: J2000 to ECEF transformation with IAU-1976 precession, IAU-1980 nutation, GAST, and polar motion.

- The ISS as an active target: with the real docking ports (СМ, МИМ1, МИМ2, СО1) and contact forces (Contact Wrenches).

The model is currently being tuned to meet NASA-STD-7009 and other aerospace standards (US/EU).

Graphics:

- Earth: 16K textures (Blue Marble), with 60K and adaptive quality planned.

- Stars: generated procedurally from the Hipparcos catalog.

- Atmosphere: I wrote my own physically based procedural shader. In the first tests, sunrises and sunsets already look very close to the real thing.

- The «Нептун-МЭ» control panel (НИИАО СОКБ КТ ЛИИ, led by Yu. Tyapchenko): all display formats needed for every flight phase are implemented. The fonts match the original pixel for pixel.

- Spacecraft cameras: positions are reconstructed to within 0.1 mm, including the camera characteristics, filters, and the VS-Progress board (5x7 filter). The picture is not yet 1:1 with the real spacecraft.

Architecture and current stage:

This is my first project in Unreal Engine. All code is pure C++, with no Blueprints. The models are separated from the simulator by bridges and strictly follow a “command - receipt” logic, so they can be worked with standalone, and you can even plug in your own space objects with arbitrary initial conditions.

Right now I’m working on rendezvous from a range of 1 km, in both automatic and manual modes. In parallel, I’m writing a large test suite covering the systems, 3D graphics, and full integration scenarios. Controls are keyboard or joystick for now.

I’ll post a video soon demonstrating the mechanics. Feel free to ask questions, and I’ll answer whatever I can.

In the meantime, join our Discord channel to follow news and development: [https://discord.com/invite/GWXzjFD](https://discord.com/invite/GWXzjFD)
