function ss_bd_interp (start_dt,end_dt)

%---------------------------------------------------------------------
% The function interpolates SS between start date (start_dt)
% end end date (end_dt) - date time vectors (YYYY,MM,DD)
% and write the results to 'ss_x', 'ss_y' 
% // function takes the data from pos = 'x','y'
%---------------------------------------------------------------------

% check time does not exceed 1 year period
n= datenum([end_dt,00,00,00])-datenum([start_dt,00,00,00]);
if n>366
   disp ('length more then 1 year !!!');
   return;
end  %if  

% Read DB
    var_x = dbget ( start_dt,[end_dt,23,59,0],'x');
    var_y = dbget ( start_dt,[end_dt,23,59,0],'y');
    % SS interpolation
     ss_x = ss_interp (var_x);
     ss_y = ss_interp (var_y);
   
     
% Write DB
    dbset ( start_dt,[end_dt,23,59,0],'ss_x',ss_x); 
    dbset ( start_dt,[end_dt,23,59,0],'ss_y',ss_y); 
  