Fixing measurement update systems for kalman filter 70/33970/3
authorRamasamy <ram.kannan@samsung.com>
Mon, 19 Jan 2015 09:45:46 +0000 (15:15 +0530)
committerRamasamy <ram.kannan@samsung.com>
Tue, 20 Jan 2015 10:43:12 +0000 (16:13 +0530)
commitd1cf325dd254ca512ecd731601cfa07662d29d5b
tree87521f2f52f45a08f1cffc4b01c63063be028f17
parenta5f92dc5aebdc267b3f77916438a24f9371866c8
Fixing measurement update systems for kalman filter

The equivalent octave code implementation taken from technical
paper is given below.

for j =1:6
% compute Kalman gain
K(:,j) = P(j ,:)./(P(j,j)+R(j,j));
% update state vector
x(:,i) = x(:,i) + K(:,j) * e(j);
% update covariance matrix
P = (eye(6) - (K(:,j) * H(j,:))) * P;
end

*** The actual fix for Nan issue is in seperate commit ***

Change-Id: Ided63f4df431416cb4ace4508417e2dffbd1888a
src/sensor_fusion/orientation_filter.cpp