function [distarr]=getdist(october_svd_data,stn)
%[distarr]=getdist(october_svd_data,booe_stn)
%Inputs: 
%   october_svd_data data array read in from the october.svd.reloc file
%   stn=[longitude,latitude]  position of station
%Outputs 
%   distarr: an array of distances from station in km 

radius_earth_equatorial = 6378.137; % km

latarr= squeeze(october_svd_data(:,2));
longarr= squeeze(october_svd_data(:,3));
distarr = 0.0*squeeze(longarr);

 n = length(longarr);
 cl = cos(stn(2)*pi/180.0);
 degr = pi/180.0;
 for i=1:n
      jj = (cl*(longarr(i)-stn(1)))^2.0 + (latarr(i)-stn(2))^2.0;
      distarr(i) = sqrt(jj)*radius_earth_equatorial*degr;
 end
  