function advHDRplot( adv, metadata, clearfigs, magrot, gb, pdates ); nb = length(adv.jt); if(exist('gb')~=1),gb(1)=1;,gb(2)=nb;,end if(exist('pdates')~=1), pdates(1)=datenum(gregorian(adv.jt(gb(1)))); pdates(2)=datenum(gregorian(adv.jt(gb(2)))); end if(exist('magrot')~=1),magrot=0;,end az = median(adv.hdg_mn); if(metadata.coordsystem=='XYZ'), rot = -90+az+magrot; else rot = -90+magrot; end nd = datenum(gregorian(adv.jt)); [s,d]=pcoord(adv.x_mn,adv.y_mn); [ur,vr] = xycoord( s, d+rot); [s,d]=pcoord(adv.x_sd,adv.y_sd); [ur_sd,vr_sd] = xycoord( s, d+rot); delta_t= metadata.burstinterval(1)/3600; urf = lpfilt( ur, delta_t, 1/40); vrf = lpfilt( vr, delta_t, 1/40); volts1 = adc2volts( adv.ext_analog1_mn, metadata.serialnum ); volts2 = adc2volts( adv.ext_analog2_mn, metadata.serialnum ); set(0,'defaultaxesfontsize',14) set(0,'defaulttextfontsize',14) figure(1) if(clearfigs),clf,end subplot(511) shade_me = [nd,ur+ur_sd;... flipud([nd,ur-ur_sd])]; h=fill(shade_me(:,1),shade_me(:,2),[.8 .8 .8]); set(h,'edgecolor',[.8 .8 .8]) hold on h=plot(nd, ur,'linewidth',2); hold on axis([pdates -100 100]) ax = axis; h=plot(ax(1:2),[0 0],'--k'); text(pdates(1),120,'a) Northward ({\itv}) velocity') datetick('x',2,'keepticks','keeplimits') set(gca,'xticklabel',''); ylabel('cm/s') subplot(512) shade_me = [nd,vr+vr_sd;... flipud([nd,vr-vr_sd])]; h=fill(shade_me(:,1),shade_me(:,2),[.8 .8 .8]); set(h,'edgecolor',[.8 .8 .8]) hold on h=plot(nd, vr,'linewidth',2); hold on axis([pdates -100 100]) ax = axis; h=plot(ax(1:2),[0 0],'--k'); text(pdates(1),120,'b) Eastward ({\itu}) velocity') set(gca,'xticklabel','') ylabel('cm/s') subplot(513) shade_me = [nd,adv.z_mn+adv.z_sd;... flipud([nd,adv.z_mn-adv.z_sd])]; h=fill(shade_me(:,1),shade_me(:,2),[.8 .8 .8]); set(h,'edgecolor',[.8 .8 .8]) hold on h=plot(nd,adv.z_mn,'linewidth',2); hold on ax = axis; ax = axis; h=plot(ax(1:2),[0 0],'--k'); datetick('x',2,'keepticks','keeplimits') set(gca,'xticklabel',''); text(pdates(1),12,'c) Upward ({\itw}) velocity') ylabel('cm/s') subplot(514) h=plot(nd,volts1,'-k'); hold on h=plot(nd,volts2,'--r'); set(h,'linewidth',2); timeax(0, 2,'d) OBS response',0) ylabel('Volts') subplot(515) h=plot(nd,adv.sv_ht,'.'); hold on timeax(0, 80,'e) Sample elevation',1) ylabel ('cmab') figure(2) if(clearfigs),clf,end subplot(411) shade_me = [nd,adv.hdg_mn+adv.hdg_sd;... flipud([nd,adv.hdg_mn-adv.hdg_sd])]; h=fill(shade_me(:,1),shade_me(:,2),[.8 .8 .8]); set(h,'edgecolor',[.8 .8 .8]) hold on h=plot(nd, adv.hdg_mn,'linewidth',2); hold on timeax(0, 380,'a) Tripod azimuth',0) set(gca,'ytick',[0:90:360]) ylabel('\circT') subplot(412) shade_me = [nd,adv.pitch_mn+adv.pitch_sd;... flipud([nd,adv.pitch_mn-adv.pitch_sd])]; h=fill(shade_me(:,1),shade_me(:,2),[.8 .8 .8]); set(h,'edgecolor',[.8 .8 .8]) hold on h=plot(nd, adv.pitch_mn,'linewidth',2); hold on ax = axis; h=plot(ax(1:2),[0 0],'--k'); timeax(-5, 5,'b) Pitch',0) ylabel('Degrees') subplot(413) shade_me = [nd,adv.roll_mn+adv.roll_sd;... flipud([nd,adv.roll_mn-adv.roll_sd])]; h=fill(shade_me(:,1),shade_me(:,2),[.8 .8 .8]); set(h,'edgecolor',[.8 .8 .8]) hold on h=plot(nd,adv.roll_mn,'linewidth',2); hold on ax = axis; h=plot(ax(1:2),[0 0],'--k'); timeax(-5, 5,'c) Roll',0) ylabel('Degrees') subplot(414) h=plot(nd,adv.sv_ht,'.'); hold on timeax(0, 80,'d) Sample elevation',1) ylabel('cmab') figure(3) if(clearfigs),clf,end subplot(311) shade_me = [nd,adv.amp1_mn+adv.amp1_sd;... flipud([nd,adv.amp1_mn-adv.amp1_sd])]; h=fill(shade_me(:,1),shade_me(:,2),[.8 .8 .8]); set(h,'edgecolor',[.8 .8 .8]) hold on h=plot(nd, adv.amp1_mn,'linewidth',2); hold on timeax(100, 250,'a) Amplitude, beam 1',0) subplot(312) shade_me = [nd,adv.amp2_mn+adv.amp2_sd;... flipud([nd,adv.amp2_mn-adv.amp2_sd])]; h=fill(shade_me(:,1),shade_me(:,2),[.8 .8 .8]); set(h,'edgecolor',[.8 .8 .8]) hold on h=plot(nd, adv.amp2_mn,'linewidth',2); hold on timeax(100, 250,'b) Amplitude, beam 2',0) subplot(313) shade_me = [nd,adv.amp3_mn+adv.amp3_sd;... flipud([nd,adv.amp3_mn-adv.amp3_sd])]; h=fill(shade_me(:,1),shade_me(:,2),[.8 .8 .8]); set(h,'edgecolor',[.8 .8 .8]) hold on h=plot(nd,adv.amp3_mn,'linewidth',2); hold on timeax(100, 250,'c) Amplitude, beam 3',1) figure(4) if(clearfigs),clf,end subplot(311) shade_me = [nd,adv.co1_mn+adv.co1_sd;... flipud([nd,adv.co1_mn-adv.co1_sd])]; h=fill(shade_me(:,1),shade_me(:,2),[.8 .8 .8]); set(h,'edgecolor',[.8 .8 .8]) hold on h=plot(nd, adv.co1_mn,'linewidth',2); hold on timeax(70, 100,'a) Correlation, beam 1',0) subplot(312) shade_me = [nd,adv.co2_mn+adv.co2_sd;... flipud([nd,adv.co2_mn-adv.co2_sd])]; h=fill(shade_me(:,1),shade_me(:,2),[.8 .8 .8]); set(h,'edgecolor',[.8 .8 .8]) hold on h=plot(nd, adv.co2_mn,'linewidth',2); hold on timeax(70, 100,'b) Correlation, beam 2',0) subplot(313) shade_me = [nd,adv.co3_mn+adv.co3_sd;... flipud([nd,adv.co3_mn-adv.co3_sd])]; h=fill(shade_me(:,1),shade_me(:,2),[.8 .8 .8]); set(h,'edgecolor',[.8 .8 .8]) hold on h=plot(nd,adv.co3_mn,'linewidth',2); hold on timeax(70, 100,'c) Correlation, beam 3',1) figure(5) if(clearfigs),clf,end subplot(311) shade_me = [nd,adv.ext_press_mn+adv.ext_press_sd;... flipud([nd,adv.ext_press_mn-adv.ext_press_sd])]; h=fill(shade_me(:,1),shade_me(:,2),[.8 .8 .8]); set(h,'edgecolor',[.8 .8 .8]) hold on h=plot(nd, adv.ext_press_mn,'linewidth',2); hold on timeax(15, 25,'a) Pressure',0) ylabel('dbar') subplot(312) shade_me = [nd,adv.t_mn+adv.t_sd;... flipud([nd,adv.t_mn-adv.t_sd])]; h=fill(shade_me(:,1),shade_me(:,2),[.8 .8 .8]); set(h,'edgecolor',[.8 .8 .8]) hold on h=plot(nd, adv.t_mn,'linewidth',2); hold on timeax(5, 15,'b) Temperature',0) ylabel('\circC') subplot(313) timeax(-.2,.2,'c) Low-pass filtered velocity',1) hold on ax = axis; nb=length(nd); h=stick2(nd(1:6:nb),urf(1:6:nb)/100,vrf(1:6:nb)/100,ax); set(h,'linewidth',1.5,'color',[0 0 0]); hold on ylabel('m/s')