Wednesday, June 15, 2011

Atmospheric refraction in Stellarium

The full moon eclipse coming "over bavaria" tonight (as said in the bavarian newpapers :) ) is a good occasion to show off the new atmospheric refraction code I finally had time to commit in stellarium (with important contributions from Georg Zotti).

The atmospheric refraction effect is a small deviation of light rays when they go through the atmosphere. It causes stars to appear higher in the sky than they are in reality, and this effect is mostly visible close to the horizon.

Luckily for the purpose of this post, today's moon eclipse is occuring very close to the horizon (in Munich) as you can see on this screenshot:

Moon eclipse simulated in Stellarium with atmosphere and refraction effect turned off (left) and on (right), at precisely the same time

What we can see in this image that:
  • the moon on the right appears higher in the sky as it would without atmosphere. This means that on the right side (and in reality) we are actually seeing light originally coming from below the ground! This also mean that the apparent rising time for stars, sun and other astronomical objects is shifted by about a minute with respect to the geometric position.
  • the moon on the right doesn't have the shape of a disk but rather of an oval. This is because close to the horizon the light is 'compressed' vertically because of refraction.
This refraction effect is much smaller further away from the horizon but still cannot be neglected when e.g. pointing a telescope. The blinking image below show what happens when atmosphere refraction is toggled on and off on a star field.
Click on the image to see a larger animated version

As you can imagine, this new feature was quite challenging to integrate cleanly in the code of Stellarium, and as far as I know, Stellarium is currently the only software able to simulate oval moons, and it does that in real time :)

To keep things short, the technical details will be the subject of another post.