# duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn architecture

> Architecture diagram of the GitHub repository duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn
- Repository: https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn
- Video tour (about a minute): https://gitdiagram.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/video

## Overview

This repository is a Nuclear Option flight-controls overhaul for the Su-30VXN. The documented workflow replaces stock control handling with an INDI flight controller and an allocator that commands aerodynamic surfaces and 3D TVC; it also adds carefree handling, departure tolerance, and asymmetric-load compensation. Plugin and Harmony hooks provide the game integration, while registry and aircraft-model helpers support setup. Other documented and indexed subsystems include stall shaping, fuel balance, countermeasures, and native compute. Unsampled implementation details are represented conservatively; unverified internal links are omitted or dashed.

Main entry points: [`Su30_VXN.FCS/Registry.cs`](https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/Registry.cs) (Aircraft registry), [`Su30_VXN.FCS/Plugin.cs`](https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/Plugin.cs) (Plugin setup), [`Su30_VXN.FCS/FcsController.cs`](https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/FcsController.cs) (FCS controller), [`Su30_VXN.FCS/Hooks.cs`](https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/Hooks.cs) (Harmony hooks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_integration["Game integration"]
  node_plugin["Plugin setup<br/>[Plugin.cs]"]
  node_hooks["Harmony hooks<br/>[Hooks.cs]"]
  node_registry["Aircraft registry<br/>[Registry.cs]"]
end

subgraph group_control["Flight control"]
  node_controller["FCS controller<br/>[FcsController.cs]"]
  node_allocator["Control allocator<br/>[Allocator.cs]"]
  node_effector["Surface effectors<br/>[SurfaceEffector.cs]"]
  node_tvc["TVC effectors<br/>[TvcEffector.cs]"]
end

subgraph group_aircraft["Aircraft response"]
  node_airfoil["Airfoil model<br/>[AirfoilTable.cs]"]
  node_stall["Stall shaping<br/>[StallStagger.cs]"]
  node_drag["Drag relief<br/>[DragRelief.cs]"]
end

subgraph group_support["Flight systems"]
  node_fuel["Fuel balance<br/>[FuelBalance.cs]"]
  node_countermeasures["Countermeasures<br/>[Countermeasures.cs]"]
end

subgraph group_native["Native compute"]
  node_nativebridge["Native bridge<br/>[FcsNative.cs]"]
  node_nativecore["Native solver<br/>[lib.rs]"]
end

node_pilot(("Pilot input"))
node_game["Nuclear Option"]

node_pilot -->|"provides input"| node_game
node_plugin -->|"patches"| node_hooks
node_hooks -->|"ticks"| node_controller
node_hooks -->|"ensures setup"| node_registry
node_plugin -->|"configures"| node_registry
node_plugin -->|"configures"| node_stall
node_plugin -->|"configures"| node_fuel
node_plugin -->|"configures"| node_countermeasures
node_registry -->|"creates"| node_controller
node_registry -->|"sets up"| node_effector
node_registry -->|"sets up"| node_stall
node_registry -->|"sets up"| node_drag
node_controller -.->|"allocates commands"| node_allocator
node_allocator -->|"commands"| node_effector
node_allocator -->|"commands"| node_tvc
node_effector -->|"evaluates lift"| node_airfoil
node_stall -->|"remaps curves"| node_airfoil
node_fuel -.->|"feeds compensation"| node_controller
node_nativebridge -.->|"calls solver"| node_nativecore

click node_plugin "https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/Plugin.cs"
click node_hooks "https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/Hooks.cs"
click node_registry "https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/Registry.cs"
click node_controller "https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/FcsController.cs"
click node_allocator "https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/Allocator.cs"
click node_effector "https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/SurfaceEffector.cs"
click node_tvc "https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/TvcEffector.cs"
click node_airfoil "https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/AirfoilTable.cs"
click node_stall "https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/StallStagger.cs"
click node_drag "https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/DragRelief.cs"
click node_fuel "https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/FuelBalance.cs"
click node_countermeasures "https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/Countermeasures.cs"
click node_nativebridge "https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/FcsNative.cs"
click node_nativecore "https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/native/fcs_core/src/lib.rs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_plugin,node_hooks,node_registry toneBlue
class node_controller,node_allocator,node_effector,node_tvc toneAmber
class node_airfoil,node_stall,node_drag toneMint
class node_fuel,node_countermeasures toneRose
class node_nativebridge,node_nativecore,node_pilot,node_game toneIndigo
```

## Components

### Game integration

- [Plugin setup](https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/Plugin.cs): `Su30_VXN.FCS/Plugin.cs`
- [Harmony hooks](https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/Hooks.cs): `Su30_VXN.FCS/Hooks.cs`
- [Aircraft registry](https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/Registry.cs): `Su30_VXN.FCS/Registry.cs`

### Flight control

- [FCS controller](https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/FcsController.cs): `Su30_VXN.FCS/FcsController.cs`
- [Control allocator](https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/Allocator.cs): `Su30_VXN.FCS/Allocator.cs`
- [Surface effectors](https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/SurfaceEffector.cs): `Su30_VXN.FCS/SurfaceEffector.cs`
- [TVC effectors](https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/TvcEffector.cs): `Su30_VXN.FCS/TvcEffector.cs`

### Aircraft response

- [Airfoil model](https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/AirfoilTable.cs): `Su30_VXN.FCS/AirfoilTable.cs`
- [Stall shaping](https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/StallStagger.cs): `Su30_VXN.FCS/StallStagger.cs`
- [Drag relief](https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/DragRelief.cs): `Su30_VXN.FCS/DragRelief.cs`

### Flight systems

- [Fuel balance](https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/FuelBalance.cs): `Su30_VXN.FCS/FuelBalance.cs`
- [Countermeasures](https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/Countermeasures.cs): `Su30_VXN.FCS/Countermeasures.cs`

### Native compute

- [Native bridge](https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/Su30_VXN.FCS/FcsNative.cs): `Su30_VXN.FCS/FcsNative.cs`
- [Native solver](https://github.com/duythinh2022-ui/better-fbw-for-su-30vxn-flanker.-advanced-flight-control-system-for-stock-nuclear-option-su-30vxn/blob/main/native/fcs_core/src/lib.rs): `native/fcs_core/src/lib.rs`

### Other components

- **Pilot input**
- **Nuclear Option**

## Connections

- Pilot input → Nuclear Option: provides input
- Plugin setup → Harmony hooks: patches (evidence: `Su30_VXN.FCS/Plugin.cs`)
- Harmony hooks → FCS controller: ticks (evidence: `Su30_VXN.FCS/Hooks.cs`)
- Harmony hooks → Aircraft registry: ensures setup (evidence: `Su30_VXN.FCS/Hooks.cs`)
- Plugin setup → Aircraft registry: configures (evidence: `Su30_VXN.FCS/Plugin.cs`)
- Plugin setup → Stall shaping: configures (evidence: `Su30_VXN.FCS/Plugin.cs`)
- Plugin setup → Fuel balance: configures (evidence: `Su30_VXN.FCS/Plugin.cs`)
- Plugin setup → Countermeasures: configures (evidence: `Su30_VXN.FCS/Plugin.cs`)
- Aircraft registry → FCS controller: creates (evidence: `Su30_VXN.FCS/Registry.cs`)
- Aircraft registry → Surface effectors: sets up (evidence: `Su30_VXN.FCS/Registry.cs`)
- Aircraft registry → Stall shaping: sets up (evidence: `Su30_VXN.FCS/Registry.cs`)
- Aircraft registry → Drag relief: sets up (evidence: `Su30_VXN.FCS/Registry.cs`)
- FCS controller → Control allocator: allocates commands
- Control allocator → Surface effectors: commands (evidence: `Su30_VXN.FCS/Allocator.cs`)
- Control allocator → TVC effectors: commands (evidence: `Su30_VXN.FCS/Allocator.cs`)
- Surface effectors → Airfoil model: evaluates lift (evidence: `Su30_VXN.FCS/SurfaceEffector.cs`)
- Stall shaping → Airfoil model: remaps curves (evidence: `Su30_VXN.FCS/StallStagger.cs`)
- Fuel balance → FCS controller: feeds compensation (evidence: `Su30_VXN.FCS/FuelBalance.cs`)
- Native bridge → Native solver: calls solver
