
%GRAFICADO DE DATOS DE Aquadopps
clear all;
Close all;
clf;
datos=load('2L307402.dat');
t=datenum([datos(:,3),datos(:,1),datos(:,2),datos(:,4),datos(:,5),datos(:,6)]);

v1=datos(:,9);
v2=datos(:,10);
v3=datos(:,11);
a1=datos(:,12);
a2=datos(:,13);
a3=datos(:,14);
batt=datos(:,15);
sndspd=datos(:,16);
hding=datos(:,18);
pitch=datos(:,19);
roll=datos(:,20);
pres=datos(:,21);
temp=datos(:,23);

figure(1)
plot(batt);
title('Battery');
Ymin=mean(batt)-(.25*mean(batt));
Ymax=mean(batt)+(.25*mean(batt));
axis([0 max(size(datos)) Ymin Ymax])
datetick('x','dd/mm/yy','keeplimits','keepticks')

figure(2)
plot(sndspd);
title('Velocidad del Sonido');
Ymin=mean(sndspd)-(.25*mean(sndspd));
Ymax=mean(sndspd)+(.25*mean(sndspd));
axis([0 max(size(datos)) Ymin Ymax])
datetick('x','dd/mm/yy','keeplimits','keepticks')

figure(3)
rose(hding);
title('Heading');
% Ymin=mean(hding)-(mean(hding));
% Ymax=mean(hding)+(mean(hding));
% axis([0 max(size(datos)) Ymin Ymax])

figure(4)
plot(t,pitch);
title('Pitch');


% Ymin=mean(pitch)-(mean(pitch));
% Ymax=mean(pitch)+(mean(pitch));
% axis([0 max(size(datos)) Ymin Ymax])

figure(5)
plot(t,roll);
title('Roll');


% Ymin=mean(roll)-(mean(roll));
% Ymax=mean(roll)+(mean(roll));
% axis([0 max(size(datos)) Ymin Ymax])

figure(6)
plot(t,pres);grid
title('Presion');
Ymin=mean(pres)-(.25*mean(pres));
Ymax=mean(pres)+(.25*mean(pres));
axis([t(1) t(end) 560 580])
datetick('x','dd/mm/yy','keeplimits','keepticks')

figure(7)
plot(t,temp);grid
title('Temperatura');
Ymin=mean(temp)-(.25*mean(temp));
Ymax=mean(temp)+(.25*mean(temp));
axis([t(1) t(end) Ymin Ymax])
datetick('x','dd/mm/yy','keeplimits','keepticks')

figure(8)
plot(t,v1);grid
title('Velocidad 1');
axis([t(1) t(end) -1.50 1.50])
datetick('x','dd/mm/yy','keeplimits','keepticks')


% Ymin=mean(v1)-(.25*mean(v1));
% Ymax=mean(v1)+(.25*mean(v1));
% axis([0 max(size(datos)) Ymin Ymax])

figure(9)
plot(t,v2);
title('Velocidad 2');
axis([t(1) t(end) -1.50 1.50])
datetick('x','dd/mm/yy','keeplimits','keepticks')
% Ymin=mean(v2)-(.25*mean(v2));
% Ymax=mean(v2)+(.25*mean(v2));
% axis([0 max(size(datos)) Ymin Ymax])

figure(10)
plot(t,v3);
title('Velocidad 3');
axis([t(1) t(end) -1.50 1.50])
datetick('x','dd/mm/yy','keeplimits','keepticks')
% Ymin=mean(v3)-(.25*mean(v3));
% Ymax=mean(v3)+(.25*mean(v3));
% axis([0 max(size(datos)) Ymin Ymax])

figure(11)
plot(t,a1);
title('Amplitud 1');
datetick('x','dd/mm/yy','keeplimits','keepticks')
% Ymin=mean(a1)-(.25*mean(a1));
% Ymax=mean(a1)+(.25*mean(a1));
% axis([0 max(size(datos)) Ymin Ymax])

figure(12)
plot(t,a2);
title('Amplitud 2');
datetick('x','dd/mm/yy','keeplimits','keepticks')
% Ymin=mean(a2)-(.25*mean(a2));
% Ymax=mean(a2)+(.25*mean(a2));
% axis([0 max(size(datos)) Ymin Ymax])

figure(13)
plot(t,a3);
title('Amplitud 3');
datetick('x','dd/mm/yy','keeplimits','keepticks')
% Ymin=mean(a3)-(.25*mean(a3));
% Ymax=mean(a3)+(.25*mean(a3));
% axis([0 max(size(datos)) Ymin Ymax])

