Repository navigation
[RFC] Deterministic, Zero-Allocation GNC State Estimation App for cFS (cFE Software Bus) #1178
rahadbhuiya
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi cFS Community and Maintainers,
As NASA's Core Flight System (cFS) powers an expanding frontier of deep space spacecraft, lunar orbiters, and autonomous SmallSat missions, deterministic on-board Guidance, Navigation, and Control (GNC) state estimation remains a critical flight software requirement. Autonomous spacecraft frequently operate under harsh flight conditions: radiation-induced telemetry dropouts (SEUs), low-cost MEMS sensor drift, and numerical covariance degradation on radiation-hardened, finite-precision flight computers (such as RAD750, LEON3/LEON4, and ARM Cortex-R).
While the Core Flight Executive (cFE) provides a world-class publish-subscribe Software Bus (SB), Event Services (EVS), and Table Services (TBL), GNC state estimation and sensor fusion pipelines are typically re-implemented on an ad-hoc basis for each specific mission.
I would like to propose developing a reusable, zero-allocation GNC state estimation application for cFS (
gnc_app), powered by the open-source Aegis-Filter engine (dual-licensed MIT/Apache-2.0, crates.io/crates/aegis-filter).Core Engineering Requirements & Flight Constraints
To strictly adhere to NASA Goddard and JPL Flight Software principles and cFS app architecture standards:
Zero Dynamic Allocation in Flight:
State vectors, covariance matrices, and innovation buffers are statically sized during
GNC_AppInit(). The application operates with strictly zero heap allocation (malloc/free) during runtime, ensuring deterministic sub-millisecond execution.Joseph-Form Covariance Stabilization:$P = (I - KH)P$ ) can lose positive semi-definiteness on finite-precision single/double-precision floating-point hardware, leading to filter divergence. The implementation employs the Joseph-stabilized formulation:
$$P = (I - KH)P(I - KH)^T + KRK^T$$
Standard Kalman covariance updates (
This mathematically guarantees symmetry and numerical stability across multi-year flight profiles.
Autonomous Outlier Gating & Sensor Quarantine (FDIR):
Includes automated 3-sigma innovation gating and Mahalanobis distance validation. Malformed sensor readings, anomalous IMU spikes, or invalid GPS fixes are rejected before corrupting the estimated state vector, generating cFE Event Services telemetry (
GNC_OUTLIER_REJECTED_EID) and supporting automated sensor quarantine.Nonlinear Kinematics (Unscented Kalman Filter - UKF):
Supports Merwe scaled unscented transforms for nonlinear orbital mechanics and attitude quaternions without requiring complex, error-prone manual Jacobian derivations.
Proposed cFS Application Architecture (
gnc_app)The application integrates naturally into the cFE ecosystem:
Integration Mechanism
#![no_std]Core with C-ABI Wrapper: The mathematical estimation core compiles as a#![no_std]static library (libaegis_cfs.a) with standard C linkage.gnc_app.c,gnc_app_cmds.c, andgnc_msg.h, executing inside the standardGNC_AppMain()loop listening on a dedicated Software Bus pipe.cfe_add_component).What I Would Love Feedback On:
nasa-community/cfs-gnc-app), or as a standalone open-source cFS app?I welcome feedback, architecture guidance, and recommendations from the cFS flight software community.
Best regards,
Rahad Bhuiya
Systems Architect // Exploidus (exploidus.com)
GitHub: @rahadbhuiya
All reactions