forked from Georacer/ardupilog
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLogContainer.m
More file actions
28 lines (28 loc) · 751 Bytes
/
Copy pathLogContainer.m
File metadata and controls
28 lines (28 loc) · 751 Bytes
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
%> \author Jeffry Walker
%> @brief type container for multiple logs
classdef LogContainer
properties
%> loaded log data
log Ardupilog
%> log number
num
%> date yyy-mm-dd
date
end
methods
function obj = LogContainer(logFilePath)
obj.log = Ardupilog(logFilePath);
% extract info from file name
[~, fn] = fileparts(logFilePath);
if ~contains(fn,'_')
snum = fn;
else
tmp = regexp(fn,'_','split');
snum = tmp{2};
end
obj.num = str2double(snum);
% get date from bootTimeUTC
obj.date = obj.log.bootTimeUTC;
end
end
end