rlabbe / filterpy

Python Kalman filtering and optimal estimation library. Implements Kalman filter, particle filter, Extended Kalman filter, Unscented Kalman filter, g-h (alpha-beta), least squares, H Infinity, smoothers, and more. Has companion book 'Kalman and Bayesian Filters in Python'.
MIT License
3.3k stars 615 forks source link

About update() predict() order #256

Closed nnop closed 2 years ago

nnop commented 2 years ago

In the test codes: https://github.com/rlabbe/filterpy/blob/a437893597957764fb6b415bfb5640bb117f5b99/filterpy/kalman/tests/test_kf.py#L114-L116

the kalman filtering procedure is first update() then predict(). Should that be reversed?

nnop commented 2 years ago

I see, there is already an init state. So, a measurement triggers an update.