For the local Gaussian approximation, \(P\approx H_{\rm total}^{-1}\); take marginal covariance blocks after solving the full system. Priors are already included in \(H_{\rm total}\). See the derivation and implementation limits.
Key equations
Warm-up, from memory
Marginalization, by hand
Practice
Say it at a whiteboard
"Every real-time estimator has to decide what to do with the past. A filter keeps only the current state and its covariance: it propagates \(\mathbf{P}\leftarrow\mathbf{F}\mathbf{P}\mathbf{F}^{\top}+\mathbf{G}\mathbf{Q}\mathbf{G}^{\top}\), updates, and has marginalized everything older, so it's cheap but can never re-linearise an old state. A sliding window keeps the last \(N\) states and re-linearises all of them each solve. To stay bounded it removes the oldest, properly by Schur complement, which leaves the prior for that linearization \(\mathbf{H}_{kk}-\mathbf{H}_{km}\mathbf{H}_{mm}^{-1}\mathbf{H}_{mk}\), or cheaply by dropping it and fixing an anchor. Treating an uncertain old state as exact can make the estimator overconfident; fixing a coordinate gauge is a separate choice. glass-lio uses a current-state solve that holds \(\mathbf{x}_i\) fixed but carries its covariance; FAST-LIO2 is an iterated EKF; VINS-Mono is a marginalizing window."