Skip to content
Snippets Groups Projects
Commit 09548538 authored by Steven Lange's avatar Steven Lange
Browse files

Code clean up

parent a85391c7
No related merge requests found
No preview for this file type
......@@ -30,15 +30,12 @@ class KalmanFilter(object):
return None
def predict(self):
#print(self.F)
self.x = np.dot(self.F, self.x)
#print('--')
self.P = np.add(np.dot(np.dot(self.F, self.P), self.F.T), self.Q)
return None
def update(self, mesVec):
# Innovation
#print(mesVec)
y = np.add(mesVec.T, - np.dot(self.H, self.x))
# Residualkovarianz
......@@ -47,10 +44,11 @@ class KalmanFilter(object):
# Kalman - Gain
K = np.dot(np.dot(self.P, self.H.T), np.linalg.pinv(S))
#print('K')
# Zweite Zeile 0.0 setzen, damit sie den alten Abstand nicht verändert!!!
# !!!
K[1,0] = 0.0
#print(K)
#print('--')
# !!!
self.x = np.add(self.x, np.dot(K, y))
self.P = np.add(self.P, - np.dot(np.dot(K,S),K.T))
return None
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment