A generalized, object-oriented Python library for rigorous State Estimation and Sensor Fusion. It implements core mathematical filters robust enough for professional Navigation Engineering and surveying applications.
The LinearKalmanFilter class estimates the internal state of a linear dynamic system from a series of noisy measurements. It is fundamental in object tracking, navigation loops, and predictive smoothing.
Prediction (Time Update):
$x_k^{-} = \Phi x_{k-1}^{+}$ $P_k^{-} = \Phi P_{k-1}^{+} \Phi^T + Q$
Correction (Measurement Update):
-
$\nu_k = z_k - H x_k^{-}$ (Innovation) -
$S_k = H P_k^{-} H^T + R$ (Innovation Covariance) -
$K_k = P_k^{-} H^T S_k^{-1}$ (Kalman Gain) $x_k^{+} = x_k^{-} + K_k \nu_k$ -
$P_k^{+} = (I - K_k H) P_k^{-} (I - K_k H)^T + K_k R K_k^T$ (Joseph Form)
Includes a $\chi^2$ statistical innovation test to detect and flag measurement anomalies in real-time.
The GaussHelmertEstimator is a highly robust non-linear Least Squares solver for implicit constraint models where observations cannot be explicitly separated from parameters.
Implicit Condition Equation:
Normal Equations Resolution:
Using the parameter Design Matrix
$Q_{ww} = B Q_{ll} B^T$ $\Delta x = (A^T Q_{ww}^{-1} A)^{-1} A^T Q_{ww}^{-1} (-w)$
Calculates rigorous aposteriori variance factors (
git clone https://github.com/AmrFawzy-NavEng/State-Estimation-Filters-Python.git
cd State-Estimation-Filters-Python
pip install -r requirements.txtEstimates a 6-state vector (Position, Velocity, Acceleration) of a uniformly accelerated platform using noisy GPS fixes.
python examples/ex01_kinematic_kalman_filter.pyFits an analytical ellipse strictly adhering to 8 noisy surveying coordinates using the non-linear Gauss-Helmert solver.
python examples/ex02_ghm_ellipse_fitting.pyMIT — see LICENSE for details.
