.
- predict state x^(n+1, )
- calculate predict covariance P(n+1, n) = E[e(n+1,n)e(n+1,n)^T]=E[(x(n)-x^(n+1,n)) (x(n)−x^(n+1,n)^T)]
- Correct estimation using measurement z(n)
- calculate covariance of the correction x^(n,n). P(n,n) = E[e(n,n)e(n,n)^T]=E[(x(n)-x^(n,n)) (x(n)−x^(n,n)^T)]
- Optimize Kalman gain by solving differential equation [sum of a trace of Covariance matrix P(n,n)]
https://www.kalmanfilter.net/background2.html#covExp
THE ESTIMATE UNCERTAINTY
Pn+1,n=E((x^n+1,n−μxn+1,n)(x^n+1,n−μxn+1,n)T)
Uncertainty is the covariance of estimation x^(n+1). P(n+1,n) = COV(X^(n+1,n))