2% For LICENSE / TERMS OF USE, see the file LICENSE in the root directory of the repository.
6%% analyze actual recorded data (recorded in the damping chamber at around 20.2 °C)
8datapath = fullfile(datapath,
"self_captured/240205_allan_deviation_2");
9data(1) =
jumpReadData(fullfile(datapath,
"S-24-A-13026_000.BIN"));
10data(2) =
jumpReadData(fullfile(datapath,
"S-24-A-13036_000.BIN"));
11data(3) =
jumpReadData(fullfile(datapath,
"S-24-A-13169_000.BIN"));
13% remove start because of temperature decrease and end because of me
15data(1).tt = data(1).tt(2e6:end - 200 * 60,:);
16data(2).tt = data(2).tt(2e6:end - 200 * 60,:);
17data(3).tt = data(3).tt(2e6:end - 200 * 60,:);
26%% JUMP sensor models and simulate data
29assert(num_simulations >= num_measurements,
"num_simulations must be greater or equal than num_measurements");
31% get ground truth (laying still
for 24 h)
32numsamples = 24 * 60 * 60 * 200;
33acc = zeros(numsamples,3);
34gyr = zeros(numsamples,3);
35ori = quaternion.ones(numsamples, 1);
36tmp = linspace(20.2, 20.2, numsamples);
38for i = 1:num_simulations
44 data_sim(i) = js(i).generate(acc, gyr, ori,
"tmp_true",tmp);
46 % analyze the simulated data
54figure(
"Name",
"Allan deviation comparison between simulated and measured data",
"ToolBar",
"none",
"NumberTitle",
"off")
55for i = 1:num_simulations
56 subplot(231); % accelerometer
57 loglog(params_sim(i).acc.tau, params_sim(i).acc.adev, '-b'); hold on;
58 if i < num_measurements
59 loglog(params(i).acc.tau, params(i).acc.adev, '--r');
64 ylabel("Allan deviation [m/s^2]");
65 title("accelerometer");
66 elseif i == num_simulations
68 legend("simulated", "measured", "Location", "best");
71 subplot(232); % gyroscope
72 loglog(params_sim(i).gyr.tau, params_sim(i).gyr.adev, '-b'); hold on;
73 if i < num_measurements
74 loglog(params(i).gyr.tau, params(i).gyr.adev, '--r');
79 ylabel("Allan deviation [rad/s]");
81 elseif i == num_simulations
83 legend("simulated", "measured", "Location", "best");
86 subplot(233); % temperature
87 loglog(params_sim(i).tmp.tau, params_sim(i).tmp.adev, '-b'); hold on;
88 if i < num_measurements
89 loglog(params(i).tmp.tau, params(i).tmp.adev, '--r');
94 ylabel("Allan deviation [°C]");
96 elseif i == num_simulations
98 legend("simulated", "measured", "Location", "best");
101 subplot(234); % high g accelerometer
102 loglog(params_sim(i).hig.tau, params_sim(i).hig.adev, '-b'); hold on;
103 if i < num_measurements
104 loglog(params(i).hig.tau, params(i).hig.adev, '--r');
109 ylabel("Allan deviation [m/s^2]");
110 title("high g accelerometer");
111 elseif i == num_simulations
113 legend("simulated", "measured", "Location", "best");
116 subplot(235); % magnetometer
117 loglog(params_sim(i).mag.tau, params_sim(i).mag.adev, '-b'); hold on;
118 if i < num_measurements
119 loglog(params(i).mag.tau, params(i).mag.adev, '--r');
124 ylabel("Allan deviation [uT]");
125 title("magnetometer");
126 elseif i == num_simulations
128 legend("simulated", "measured", "Location", "best");
131 subplot(236); % pressure
132 loglog(params_sim(i).prs.tau, params_sim(i).prs.adev, '-b'); hold on;
133 if i < num_measurements
134 loglog(params(i).prs.tau, params(i).prs.adev, '--r');
139 ylabel("Allan deviation [Pa]");
141 elseif i == num_simulations
143 legend("simulated", "measured", "Location", "best");
JumpSensor is a simulation of the JUMP sensor of the ZurichMove Project.
function jumpNoiseAnalysis(in data, in options)
function jumpReadData(in filePath, in options)