THE BEEHIVE OBSERVATORY
ATMOSPHERIC REFRACTION FORMULA PAGE
November 2021
When light from a star strikes the atmosphere it is bent a little towards the ground.
The effect is to make the star appear a little higher in the sky than if there were no air.
The effect increases closer to the horizon (getting to be more than half a degree) but is
zero overhead.
Here is the formula I derived many years ago, now in the C# programming language. . .
// AtmosphericRefraction()
// Returns the decrease in apparent zenith angle caused by refraction.
// Angles in radians (1 radian = 180/Pi degrees).
// For a uniform atmosphere.
// dz = asin(mu c R / (R+h)) - asin(c R / (R+h))
// where c = cos(alt), mu = 1.00029 (refrac indx air), R = 6400000 (Earth rad)
// and h = 4600, height of model atmosphere.
public double AtmosphericRefraction(double altitude)
{
double r = 0;
if (altitude > Math.PI / 2 || altitude < 0)
{}
else
{
double R = 6400000.0;
double mu = 1.00029;
double c = Math.Cos(altitude);
double h = 4600.0;
double w = (R / (R + h)) * c;
r = Math.Asin(mu * w) - Math.Asin(w);
}
return r;
}