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

Kalman filter example: wrong transition matrix? #276

Open bilderbuchi opened 2 years ago

bilderbuchi commented 2 years ago

The example given on the Kalman Filter documentation page defines a position+velocity problem, with this state transition matrix F:

f.F = np.array([[1.,1.],
                [0.,1.]])

From what I can tell, the upper right element should actually be dt, not 1. I can exclude that the timestep size dt is coincidentally 1, because further down we have f.Q = Q_discrete_white_noise(dim=2, dt=0.1, var=0.13).

So, afaict, here it should say

f.F = np.array([[1.,0.1],
                [0.,1.]])