aegis-filter
High-integrity, deterministic, and #![no_std] capable state estimation and robust filtering engine written in pure Rust.
Designed for mission-critical robotics, aerospace, navigation, autonomous sensor fusion, and embedded telemetry where numerical stability, fail-safe error handling, and adversarial/outlier resilience are paramount.
Developed under Exploidus.
Architectural & Security Highlights
- Joseph Stabilized Covariance Updates: Standard Kalman Filter updates ($\mathbf{P} = (\mathbf{I} - \mathbf{KH})\mathbf{P}$) frequently become asymmetric and lose positive semi-definiteness under finite floating-point round-off.
aegis-filterimplements the Joseph Form covariance update: $$\mathbf{P}_k = (\mathbf{I} - \mathbf{K}_k \mathbf{H}) \mathbf{P}_k^- (\mathbf{I} - \mathbf{K}_k \mathbf{H})T + \mathbf{K}_k \mathbf{R} \mathbf{K}_kT$$ which unconditionally guarantees symmetry and positive semi-definiteness. - Strict Non-Finite Float Guards: Hardened against
NaN,+Inf, and-Infon all state vectors, inputs, and measurements. All methods returnResult<T, KalmanError>with zero panics. - Mahalanobis Distance / Chi-Square Outlier Gating: Built-in residual gating to discard wild sensor glitches, adversarial spoofed signals, or hardware spikes without contaminating the filter state.
- Pure
#![no_std]& Zero Heap Allocations: Const generic dimensions (KalmanFilter<STATES, MEASUREMENTS>) allow running directly on bare-metal microcontrollers (ARM Cortex-M, RISC-V) withoutallocor OS dependencies.
Filter Architectures
ScalarKalmanFilter: Ultra-lightweight 1D scalar filter for temperature, pressure altitude, or single-variable telemetry tracking.Kinematic1DFilter: 2-state / 1-measurement filter tracking position and velocity from a position sensor (e.g., GPS, rangefinder) with continuous white-noise acceleration modeling.KalmanFilter<STATES, MEASUREMENTS>: Fully generic multi-dimensional linear Kalman filter configured via compile-time const generics.
Installation
Add to your Cargo.toml:
[]
= "0.1.0"
For #![no_std] environments (bare-metal):
[]
= { = "0.1.0", = false }
Example Usage
1D Sensor Fusion with Adversarial Outlier Gating
use ;
Interactive Simulations & Benchmarks
The repository includes runnable examples showcasing real-world aerospace and robotics applications:
# 1. Flight Telemetry & Spoofing Resilience (3-sigma gating under GPS/baro spikes)
# 2. Non-linear Radar Tracking via UKF (aircraft range tracking without Jacobians)
# 3. Execution Latency & Nanosecond Benchmark (1,000,000 iterations profile)
License
Dual-licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)