summaryrefslogtreecommitdiffhomepage
path: root/filter-kalman/kalman_simulation.py
diff options
context:
space:
mode:
authorDaMichel <mw.pub@welter-4d.de>2016-07-17 17:41:35 +0200
committerDaMichel <mw.pub@welter-4d.de>2016-07-17 17:41:35 +0200
commite07f488256bbbc49b24fd85057c9b5ea9fb9718e (patch)
treeb8f4d88bdfe24dcb996a96b8a66dc56b00a6662a /filter-kalman/kalman_simulation.py
parent1938853fd7b5889f0381a6ad120f877b649d4887 (diff)
fix prediction error cov propagation in KF
Diffstat (limited to 'filter-kalman/kalman_simulation.py')
-rw-r--r--filter-kalman/kalman_simulation.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/filter-kalman/kalman_simulation.py b/filter-kalman/kalman_simulation.py
index 7a320426..011349ec 100644
--- a/filter-kalman/kalman_simulation.py
+++ b/filter-kalman/kalman_simulation.py
@@ -56,7 +56,7 @@ xhat[0] = measurement[0]
for k in range(1,N):
# time update
xhatminus[k] = A * xhat[k-1]
- Pminus[k] = A * P[k-1] + Q
+ Pminus[k] = A * P[k-1] * A.T + Q
# measurement update
K[k] = Pminus[k] * H.T * np.linalg.inv( H * Pminus[k] * H.T + R )