clear all
close all


%Engineering Units+
filenm = 'goo_eng.txt';
fid = fopen(filenm);
C = textscan(fid, '%s %s %s %s %s %s %s %s %s %s %s %s %s %f %f %f %f %f %f %f %f %f %f %f %f'); %,'CollectOutput',1);
fclose(fid);

%Bytes
%filenm = 'goo_bytes.txt';
%fid = fopen(filenm);
%C = textscan(fid, '%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s'); %,'CollectOutput',1);
%fclose(fid);

time_cnts = hex2dec(C{8})*255 + hex2dec(C{9});
time = time_cnts*0.0000021701;

dt = diff(time);  %Determine average timestep
idx = find(dt>0);
dt = mean(dt(idx)); 


t = 1:length(C{1});  
t = (t-1)*dt;  %seconds
plot(t,C{14},t,C{15},t,C{16});

figure
plot(t,C{17},t,C{18},t,C{19});

figure
plot(t,C{20},t,C{21},t,C{22});

figure
plot(t,C{23},t,C{24},t,C{25});