function res=airmass(el)

% airmass calculation from Kaster et al., 1989

a=0.50572;      % a b c coeffictions
b=6.07995;
c=1.6364;
el=el*pi/180;     % sun elevatio nangle

res=(sin(el)+a*(el*180/pi+b).^(-c)).^(-1);     %air mass
