Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct files via upload #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions ukf_predict3.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
% UKF_PREDICT1, UKF_UPDATE1, UKF_PREDICT2, UKF_UPDATE2, UKF_UPDATE3
% UT_TRANSFORM, UT_WEIGHTS, UT_MWEIGHTS, UT_SIGMAS

% Copyright (C) 2003-2006 Simo S�rkk�
% Copyright (C) 2007 Jouni Hartikainen
% Copyright (C) 2003-2006 Simo S�rkk�?% Copyright (C) 2007 Jouni Hartikainen
%
% $Id: ukf_predict3.m 480 2010-10-18 07:45:48Z jmjharti $
%
Expand Down Expand Up @@ -101,7 +100,7 @@

tr_param = {alpha beta kappa mat};
[M,P,C,X_s,X_pred,w] = ut_transform(MA,PA,f,f_param,tr_param);
P=P+Q;
% Save sigma points
X = X_s;
X(1:size(X_pred,1),:) = X_pred;
Expand Down
8 changes: 5 additions & 3 deletions ukf_update3.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
% References:
% [1] Wan, Merwe: The Unscented Kalman Filter
%
% Copyright (C) 2007 Jouni Hartikainen, Simo S�rkk�
%
% Copyright (C) 2007 Jouni Hartikainen, Simo S�rkk�?%
% $Id: ukf_update3.m 480 2010-10-18 07:45:48Z jmjharti $
%
% This software is distributed under the GNU General Public
Expand Down Expand Up @@ -102,9 +101,12 @@
%
tr_param = {alpha beta kappa mat X w};
[MU,S,C,X,Y_s] = ut_transform(M,P,h,h_param,tr_param);
S=S+R;
K = C / S;
M = M + K * (Y - MU);
P = P - K * S * K';
A=chol(S);
P = P - (K * A) *( K*A)';

if nargout > 5
LH = gauss_pdf(Y,MU,S);
end