
load t512amp.mat
load t512e.mat
load t512time.mat
load t512nav.mat
load t512w.mat
load t512u.mat
load t512v.mat
load t512pg.mat
load oc512aed.dat

%fill the -9.9's or -10's with NaN's
  j = find(oc512aed <= -9.9 & oc512aed >= -11.0)
  fill=ones(length(j),1)*NaN;
  oc512aed(j)=fill;
  plot(nav(2,:),nav(1,:),'b*')  
  hold on
  plot(oc512aed(:,3),oc512aed(:,2),'go')

for iknt=1:length(time)
% find the heading that goes with the ensemble
  loc=min(find (oc512aed(:,1) > time(iknt)));
  hdg=oc512aed(loc)
% correct the ensemble vels for the ship's heading

%

