close all
clear all

path = '../AtSeaDataComp/';

dt = [.1 .05 0.025 .01 .005 .001];
filenm{1} = '2023.05.05T06.31.12';  %dt = .1
filenm{2} = '2023.05.05T06.00.01';  %dt = .05
filenm{3} = '2023.05.05T06.01.05';  %dt = .025
filenm{4} = '2023.05.05T06.02.08';  %dt = .01
filenm{5} = '2023.05.05T06.03.12';  %dt = .005 
filenm{6} = '2023.05.05T06.04.18';  %dt = .001 

for i = 1:length(dt)
ConvertDataToMatlab(path,filenm{i});
MakeQuickViewPlots(path,filenm{i});
data{i} = load([path filenm{i} '_raw.mat']);
end

figure
ah1 = subplot(2,1,1)
for i = 1:length(dt)
plot(data{i}.SC_Time-data{i}.SC_Time(1),39.4*data{i}.SC_Range);
hold all;
leg_str{i} = ['dt = ' num2str(dt(i))];
end
datetick('x');
xlabel('time');
ylabel('Piston Pos (in)');
legend(leg_str);
grid on;

ah2 = subplot(2,1,2)
for i = 1:length(dt)
plot(data{i}.PC_Time-data{i}.PC_Time(1),data{i}.PC_RPM);
hold all;
leg_str{i} = ['dt = ' num2str(dt(i))];
end
datetick('x');
xlabel('time');
ylabel('RPM');
legend(leg_str);
grid on;
