May 28th, 2012
HTML Format Astrology Chart
It was brought to my notice that the HTML format horoscope is not working on this site. It seems that the server where this application was hosted has deleted my account. The astrology chart was made using a perl script and I seem to have lost the source code for it
I am still trying to search.
This script has some sentimental value for me. This site has been up for 11 long years now and this is the first script that I wrote that would essentially print the astrology chart given right input. I wanted to host this on a friend’s university account that did not allow running CGI. As a result, this perl script was converted to a java applet that still appears on the site. I absolutely must find the code and put it back on… rewriting is not an option.
Over the years, a lot of people have asked me how this software was written. Let me share the story behind it.
This knowledge comes from astronomy text books. The one I referred to is “Practical Astronomy with your calculator”. It deals with the problem of calculating the position of planets in the sky for a given date, time and place. The author wrote the book for budding and amateur astronomers who were interested in finding out position of planets in the sky and asked themselves this question – “I wonder where I can see Mercury this month?” Back in 1980s and 1990s, an app like Google Skymaps wasn’t available to just enable someone with an iPhone or Android phone to point to the sky and look for planets. Astronomers had to use old fashioned way of using a calculator or a computer. I purchased this book back in 1999 and used to write the 1st version of the software.
Anyway, lets move forward…
A date in such calculations is always converted to “Julian day”. It is denoted by number of days after Jan 1st, 4713 BC. I do not know why this particular date was chosen, but it seems to be a norm for all date/time calculations. This Julian day number is one of the inputs for the planetary position equations. One of the very first chapters dwells on the importance of Julian day.
All the planets revolve around the Sun in an orbit whose parameters are well known. Earth too revolves around the Sun in one such orbit. To understand how these planets will appear from Earth, we need to transform the coordinates from Sun (heliocentric) to Earth at the centre (geocentric). This is explained very well in the book mathematically.
Other mathematical concepts like precession (ayanamsha), aberration (motion of Earth causing apparent direction of a planet to shift slightly from its true direction), refraction (Earth’s atmosphere bending the light coming from a planet) and parallax (the observer is on surface of Earth and not at the centre) are also explained. The formulae are tweaked to give a precise calculation of orbit of planets around the Sun. In the end, these formulae can be put in an equation that takes the Julian day as a parameter to calculate latitude and longitude of a planets – this is what is required and used in computing a horoscope.

