-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.m
executable file
·85 lines (47 loc) · 2.33 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
clear all
clc
%%load files
projectdir = 'F:\Škola\Magisterské studium\diplomka\edas data\2017\1. půlka'; % specifying root directory - from here all subdirectories will containt ems files
dinfo = dir(fullfile(projectdir, '**', '*.txt')); % list of all files in all subdirectories
filenames = fullfile({dinfo.folder}, {dinfo.name}); %all subdirectiroes
nfiles = length(filenames); %number of all files
[puredata] = createpuredata()
iterator = 1;
%%initiate iteration
[puredata,iterator] = loadNext5(iterator,filenames,puredata,nfiles)
%%puredata table now has all values, we now need to delete everything except message type 26
puredata(puredata.MessageType ~= 26, :) = [];
%%AnalyzedMessages
[AnalyzedMessages] = createAnalyzedMessagesTable(puredata)
%%create MergedData array, analyze GIVEI and VDelay
[MergedData] = mergeData(puredata,AnalyzedMessages)
%%reiterate for nfiles
for K = 1 : nfiles-5
clear AnalyzedMessages puredata
[puredata] = createpuredata()
[puredata,iterator] = loadNext5(iterator,filenames,puredata,nfiles)
puredata(puredata.MessageType ~= 26, :) = [];
[AnalyzedMessages] = createAnalyzedMessagesTable(puredata)
%concatenate MergedData tables
[MergedData] = concatenateMergedData(MergedData,puredata,AnalyzedMessages)
end
%check if only one PRN
for K = 1 : length(MergedData)
if MergedData.PRN(K)~="120"
msg='Error: Multiple PRNs included - filter dataset for only one PRN.';
error(msg)
end
end
%create Time array
[Time] = createTimeArray(MergedData)
%%plot
figure('Name','GIVEI Values','NumberTitle','off');
scatter(Time,MergedData.IGP_GIVEI,'r.')
title('GIVEI Values')
xlabel('Time')
ylabel('GIVEI')
figure('Name','Vertical Delay Values','NumberTitle','off');
scatter(Time,MergedData.IGP_Delay,'b.')
title('Vertical Delay values')
xlabel('Time')
ylabel('Vertical Delay [m]')