2% For LICENSE / TERMS OF USE, see the file LICENSE in the root directory of the repository.
6%% add functions path and get data path
7addpath(genpath(
'../../functions'));
9datapath = fullfile(datapath,
"self_captured/231205_rotating_around_a_rectangle");
12data(1) =
jumpReadData(fullfile(datapath,
"sensor1",
"S-24-A-13026_001.BIN"));
13data(2) =
jumpReadData(fullfile(datapath,
"sensor2",
"S-24-A-13036_001.BIN"));
14data(3) =
jumpReadData(fullfile(datapath,
"sensor3",
"S-24-A-13169_000.BIN"));
19 % first possible movment is 25 s after start
20 [~, idx_start] = min(abs(data(i).tt.t - (data(i).tt.t(1) + seconds(25))));
22 % find the actual movement
23 norm_acc = vecnorm(data(i).tt.acc(idx_start:end, :),2,2);
24 idx_start = idx_start + ...
25 find(abs(norm_acc - mean(norm_acc,
"all")) > g_thres, 1);
27 % find the index 25s before
28 [~, idx_start] = min(abs(data(i).tt.t - data(i).tt.t(idx_start) + seconds(25)));
30 % define the last index (start index plus datarate times 153s [= experiment duration]
31 idx_end = idx_start + data(i).mpu_rate * 153;
34 data(i).tt = data(i).tt(idx_start:idx_end,:);
37%% Inertial Orientation Estimation with VQF
39IOE.vqf = vqf.filterOffline(data(2).tt.acc, data(2).tt.gyr, data(2).tt.mag);
45stem(IOE.vqf.restDetected)
function animateQuat(in quat, in options)
MyVqf is an interface to the VQF python package.
function jumpReadData(in filePath, in options)