From c41cd2484faeecb8e1580cff4217de05d33dc2cc Mon Sep 17 00:00:00 2001
From: Fredrik Bagge Carlson <cont-frb@ulund.org>
Date: Mon, 7 Sep 2015 18:13:24 +0200
Subject: [PATCH] Poked kalman

---
 src/kalman.jl | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/kalman.jl b/src/kalman.jl
index e665ac4..1d788be 100644
--- a/src/kalman.jl
+++ b/src/kalman.jl
@@ -1,15 +1,10 @@
 function kalman(R1,R2,theta, y, A, P)
-    # This is really a Kalman filter, not RLS
     ATP = A'*P;
     K = (P*A)/(R2+ATP*A);
     P = P - (P*A*ATP)./(R2 + ATP*A) + R1;
     yp = A'*theta
     e = (y-yp)[1];
-    red = 1;
-    # if abs(e) > 0.025
-    #     red = 0.2;
-    # end
-    theta = theta + K*e*red;
+    theta = theta + K*e;
 
     theta, P, e, yp[1]
-end
+end
\ No newline at end of file
-- 
GitLab