A special world premier of an astronomy program called Getafix that my DH has been writing. Much like the app Stellarium, you can get a first glimpse of Getafix (Trademarked, Registered etc) here before he launches it for free for the masses. Here’s his very easy to understand explanation of how the program works.

Getafix v1.0 is written in c++ and uses data from the European Space Agency’s Hipparcos star catalog (free download from Jean Meeus’ excellent book ‘Astronomical Formulae for Calculators’ outlined techniques that helped develop many of the algorithms used in Getafix.

Jean Meeus – Astronomical Formulae for Calculators


To predict Stars we need to know the date, time and our own location on the surface of the Earth. Easy enough.

Now we access a star database (there are about 117000 stars in the Hipparcos catalog) that contains the exact positions of stars at a known date and exact time. To prevent overcrowding, I have truncated the Hipparcos catalog, and only the 1000 brightest stars in the sky are used in the calculations. We then apply the following corrections to the raw data:-

a. Precession – the change in apparent star positions due to the earth’s axis wobbling slowly (a bit like a spinning top when about to topple over). Yes, the earth’s axis wobbles, cycling slowly over about 26,000 years. Thats why the North Star we know of today isnt the same North Star that ancient civilisations would have seen in their skies.

b. Nutation – the change in apparent star positions due to the earth’s axis nodding slowly (roughly one nod every 18.6 years or so). This is superimposed onto and at right angles to the effect of precession. Nutation is caused by the gravitational effects of the moon’s orbit. This picture shows the earth’s rotation (R, green arrow), precession (p, blue arrow) and nutation (N, red arrow).

Nutation, Precession and Rotation of the Earth

c. Proper Motion – Stars are not constant in their relative positions. There is a very small, almost imperceptible relative motion that stars exhibit with respect to each other. This is one of the data parameters that was recorded with great accuracy by the Hipparcos mission. Star Proper Motions are in the order of milli-arcseconds/ year and it would take hundreds, perhaps thousands of years before any discernable change in relative star positions could be made out by the naked eye. To illustrate how small an arc-second is… our Sun, when viewed from earth, subtends (the angle formed by an object at a given external point) about 1800 arcseconds across its diameter. Though miniscule in magnitude,  it made sense to compensate for Proper Motions of stars while writing getafix, after all accuracy is the key to a good prediction.

Next, the effect of the Earth’s rotation (360 degrees in 24 hours) needs to be applied to identify which stars are above the visible horizon. Remember, we have to compensate for revolution around the sun as well. These are combined into a concept called sidereal time.

Then comes the graphics to plot the star positions. We used the Allegro graphics library (free download at to draw the image of the sky. The Allegro graphics library was originally written for the Atari gaming platform in the 80’s and is extremely easy to learn and use for simple yet effective graphics. It took just a few hours to write the graphics code for Getafix. Hats off to the designers of Allegro!

Below is a screenshot from Getafix of the night sky as it would have been seen by the greatest General of all time, Hannibal of Carthage during his Roman conquest, just before the Battle of Cannae. August 2nd, 216 BC.

Screenshot of Getafix astronomy program

In the above image, North is up, South is down, East is to the right and West to the left. Stars towards the center of the display are higher up in the sky and those at the periphery of the circle are closer to the horizon. The relative brightness of stars is represented by the size of circles that represent them – brighter stars=bigger circles. Stars brighter than magnitude 2 have their names labelled. The top left corner of the display shows Parametric Data. If you look closely you can probably make out some of the more prominent constellations – The Big Dipper (Alkaid, Alioth and Dubhe), Casseopeia (M shape just to the east of Polaris), Cygnus (the swan, a large cross shape with Deneb it’s brightest star) and Scorpio (near the south pole with Antares as its body and a long curved tail ending in Shaula). Below is what they look like to help you identify them in the screenshot above. In the next version of Getafix, constellations will be marked out.

The Big Dipper


Cygnus, The Swan


The next Steps in Getafix development includes:

 Constellation Lines, Panning, Zooming and Animation.

Also Getafix v2 will include the Sun, the Moon, the Planets and calculation of astro-navigational Fix (hence the name Getafix!) by astronomical altitudes.

Final Step is the distribution for Ubuntu/Linux platforms. No Windows users thank you. Lightweight, less than 100 KB in size, and best of all, it’s FREE!!

 Comments, clarifications and suggestions are welcome.

About nonsense girl

Galley slave, qualitative researcher working in development, married my best friend, writing about my life, my family, my dog, TV, Indian culture, astronomy and my garden.
This entry was posted in Earth and Sky and tagged , , , . Bookmark the permalink.

2 Responses to Getafix

  1. Pingback: Capturing the Elusive Analemma | Bayesian Adventures

  2. Pingback: Stars in time « nonsense girl

Comments are closed.