Flight Software Architecture & Case Study

10-State Guarded FSM • Latching FDIR • 13-State Quaternion 6-DOF Kernel • 100-Run Monte Carlo Verification


1. Mission Requirements & Architecture Overview

The SwarmGNC C++ flight software stack provides hard real-time execution guarantees, bounded memory usage (zero heap allocation in main loop), and fault isolation for multi-UAV autonomous missions.

SysML Block Definition Diagram (BDD)

SysML BDD Diagram

SysML Internal Block Diagram (IBD) Data Flow

SysML IBD Data Flow

Flight State Machine Statechart (10 Hand-Rolled States)

State Machine Statechart

C++ Class Hierarchy

C++ Class Hierarchy

2. Mission Demonstration & Telemetry Replay

The nominal flight sequence undergoes artificial sensor fault injection at \(t = 25.0\text{s}\). The FDIR module isolates the corrupted channel, transitions the system safely to RETURN_TO_HOME, and recovers nominal formation geometry.

Telemetry Replay Channel: Drone 0 (Leader) vs Drone 1 (Fault Injected) 50 Hz Sync

3. Quantitative Monte Carlo Verification Data

Statistical metrics compiled over \(N = 100\) dispersed Monte Carlo runs incorporating mass variations, wind gusts (\(\sigma_w \in [0.5, 5.0]\,\text{m/s}\)), sensor biases, and GPS latency (\(\tau_{\text{gps}} \in [0, 100]\,\text{ms}\)).

FDIR Recovery Rate
100.0%
95th %ile Tracking Error
1.17 m
Avg Control Effort
12,673 N²·s
Min Obstacle Clearance
1.42 m

3D Spatial Dispersion Envelopes (1σ, 2σ, 3σ)

Tracking Error Cumulative Distribution Function (CDF)


4. Embedded Execution & Memory Safety Verification

Metric Target Spec Measured (ARM Cortex-M4 / Apple SIL) Status
Main Loop Rate 100.0 Hz 100.00 Hz (dt = 10.00ms) PASSED
Timing Jitter < ±1.0% (< 0.10ms) ±0.04ms max jitter PASSED
Dynamic Memory (Heap) 0 bytes post-init 0 bytes (Valgrind zero-leak log verified) PASSED
State Coverage 100% (10/10 States) 100% Guarded Transition Matrix Verified PASSED