% routine to refmt drifter data for quoddy

by = ['20089_28';'20087_28';'07234_28';'20093_28'];

dd = [13;33;8;33];
dl = [6;  6; 1; 6];
[nbuoy,cr]=size(by);
for ik=1:nbuoy;
   buoy=by(ik,:);
   base = ['dr',buoy]
  filn=[base '.dft'];
  eval(['load ' filn]);


  eval(['a=dr' buoy ';']);

% get x & y
  [x,y]=ll2xy(a(:,3),a(:,2));

% get w_depth
  wdep=w_depth(a(:,2),a(:,3));

  ddep=dd(ik);%input('Drogue tether length?');
  dlen=dl(ik);%input('Drogue length?');
  y=[a(:,1) x y a(:,4)/100 a(:,5)/100 ...
      ones(1,length(a))'*ddep ones(1,length(a))'*ddep+dlen wdep];

  fploopy(y,[base,'.m3d'],'o')
end
