% routine to refmt drifter data for quoddy

by = ['007';'009';'022';'037'];
dd = [0;0;15;15];
dl = [1;1;10;10];
[nbuoy,cr]=size(buoy);
for ik=1:nbuoy;
   buoy=by(ik,:);
   base = ['c:\gldr99\may\depl1\dfts\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
