51c9a8283e
I made a lot of changes so that each chapter makes clear that they are all implementing the same basic bayesian algorithm. This required a lot of editting, and it doesn't make sense to try to do that atomically, hence this huge check in. I made a lot of edits, and haven't copy editted anything. i'm sure I introduced a lot of problems and discontinuities.
26 lines
286 B
Python
26 lines
286 B
Python
# -*- coding: utf-8 -*-
|
|
"""
|
|
Created on Thu Jun 18 09:16:54 2015
|
|
|
|
@author: rlabbe
|
|
"""
|
|
|
|
|
|
from filterpy.kalman import KalmanFilter
|
|
|
|
|
|
|
|
kf = KalmanFilter(1, 1)
|
|
kf.x[0,0] = 1.
|
|
kf.P = np.ones((1,1))
|
|
kf.H = np.array([[2.]])
|
|
kf.F = np.ones((1,1))
|
|
kf.R = 1
|
|
kf.Q = 0
|
|
|
|
|
|
|
|
kf.predict()
|
|
kf.update(2)
|
|
|