One way to do this would be to read the keyword 'OBJCTALT' and use that to calculate the airmass. It is a string in the format of ## ## ## so I would need to convert the string to decimal degrees, subtract from 90 degrees to get the zenith distance in degrees, convert this to radians and calculate 1/cos(za).