-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.m
45 lines (39 loc) · 1.61 KB
/
main.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%>
%> @file Main.m
%>
%> @brief This is the skeleton file for processing data from a foot mounted
%> IMU. The data is processed using a Kalman filter based zero-velocity
%> aided inertial navigation system algorithm.
%>
%> @details This is the skeleton file for processing data data from a foot
%> mounted inertial measurement unit (IMU). The data is processed using a
%> Kalman filter based zero-velocity aided inertial navigation system. The
%> processing is done in the following order.
%>
%> \li The IMU data and the settings controlling the Kalman filter is loaded.
%> \li The zero-velocity detector process all the IMU data.
%> \li The filter algorithm is processed.
%> \li The in data and results of the processing is plotted.
%>
%> @authors Isaac Skog, John-Olof Nilsson
%> @copyright Copyright (c) 2011 OpenShoe, ISC License (open source)
%>
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Loads the algorithm settings and the IMU data
addpath("src/")
disp('Loads the algorithm settings and the IMU data')
simdata = mysettings();
% Load data. Measurements contained in variable u.
load square2
%% Run the zero-velocity detector
disp('Runs the zero velocity detector')
[zupt,T]=zero_velocity_detector(u, simdata);
%% Run the Kalman filter
disp('Runs the filter')
posupt = nan(3, size(u,2));
[x_h,cov_h]=ZUPTaidedINS(u,zupt, posupt, simdata);
%% View the result
disp('Views the data')
view_data;