function [x,y]=shot(u,v,kd,dt)
%SHOT returns particle displacements
%  USAGE: [x,y]=shot(u,v,kd,dt)
%   or
%  USAGE: [z]=shot(w,kd,dt)
%
% (u,v) or w (complex) = velocity in cm/s
% kd =  number of days to do track particles
% dt =  time interval between subequent u and v points (days)
% OUTPUT:
% [x,y] or [z]  distance in kilometers from origin
if(nargin==4),
  w=u+j*v; 
else
  w=u;
  dt=kd;
  kd=v;
end
k=kd/dt;
[m]=length(w);
z=zeros(m-k,1);
for i=1:m-k,
  z(i)=sum(w(i:i+k))*(3600*24*dt)/1.e5; 
end
if(nargout==2),
 x=real(z);
 y=imag(z);
else
 x=z;
end
