Master Thesis Code
by Simon Moser
Loading...
Searching...
No Matches
exp_240508_allanDeviationDifferentAxes.m
Go to the documentation of this file.
1%
2% For LICENSE / TERMS OF USE, see the file LICENSE in the root directory of the repository.
3
4clear; close all; clc;
5
6%% add functions path and get data path
7datapath = getDataPath();
8datapath = fullfile(datapath, "self_captured/240508_allan_deviation_different_axes");
9
10%% load data
11
12% check if already a .mat file exists
13if ~exist(fullfile(datapath, "data.mat"), 'file')
14
15 disp("Loading data from BIN files and saving as .mat file...");
16
17 % load data
18 data(1) = jumpReadData(fullfile(datapath, "S-24-A-13026_000.BIN"));
19 data(2) = jumpReadData(fullfile(datapath, "S-24-A-13036_000.BIN"));
20 data(3) = jumpReadData(fullfile(datapath, "S-24-A-13169_000.BIN"));
21
22 % save data
23 save(fullfile(datapath, "data.mat"), 'data');
24
25 disp("Data loaded and saved as .mat file.");
26else
27 % load data
28
29 disp("Loading data from .mat file...");
30
31 load(fullfile(datapath, "data.mat"));
32
33 disp("Data loaded.");
34end
35
36%% plot acceleration data
37figure;
38for i = 1:3
39 subplot(3,1,i);
40 plot(data(i).tt.t, data(i).tt.acc);
41 title("Accel. data " + num2str(i));
42 xlabel("Time [s]");
43 ylabel("Acceleration [m/s^2]");
44end
45
46%% parameter analysis
47param(1) = jumpNoiseAnalysis(data(1), "plot", true, "toAnalyze","acc");
48param(2) = jumpNoiseAnalysis(data(2), "plot", true, "toAnalyze","acc");
49param(3) = jumpNoiseAnalysis(data(3), "plot", true, "toAnalyze","acc");
function getDataPath()
function jumpNoiseAnalysis(in data, in options)
function jumpReadData(in filePath, in options)