function ionoErr = calIono(refLat, refLon, az, el, tow)

% Ju-Yong Do,  Mar 3, 2004
%---------------------------------------------------------
% Calculate iono error
%---------------------------------------------------------
% input  : user lat, long, satellite azimuth, elevation, 
%          tow, alpha, beta
% output : iono error
%---------------------------------------------------------
% Update Info 

%=========================================================
%Init variables
%=========================================================
% alpha   = [1.1175870895e-8; 0.0; 0.0; 0.0];
%from old
alpha   = [1.02445e-08; 0.0; -5.96046e-08; 0.0];
beta    = [90112; 0; -196608; 0];

%from CORS data
% alpha   =[0.1676E-07  0.7451E-08 -0.1192E-06 -0.5960E-07]';  
% beta    =[0.1106E+06  0.1638E+05 -0.2621E+06 -0.6554E+05]';    

c = 299792458; % Speed of light, m/s

ionoErr = zeros(length(az),1);

for i=1:length(az)
	ionoErr(i,1) = c*ionocorr(refLat, refLon, az(i), el(i), tow, alpha, beta);
end

return;
%---------------------------------------------------------
%---------------------End of codes------------------------
%---------------------------------------------------------
	
