This portal is dedicated to Vedic Astrology - Vedanga Jyotish, a science that is deep-rooted in Indian culture, tradition, and philosophy of life.
   

HTML Format Astrology Chart

By Kshitij Sharma, May 28, 2012

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.




2 comments

  • Comment by Darshan on February 10, 2013 at 1:43 am

    Hello,

    I was saddened by the fact that you lost the source code written in PERL for generating HTML horoscopes.

    I do hope that you have the source code for this JAVA app (hope they are not machine level binaries and are proper source codes in English for you to read and enhance them further). If not, please decompile this version. And you must keep it safe, as it is pretty accurate and precise.

    Looking forward to the Android App (is it ready or still work in progress?)

    Regards,
    Darshan

  • Comment by Gagan on March 4, 2013 at 11:05 pm

    I am not sure how active this site is in terms of your participation. It would be great if you read this and respond to this message.

    I understand your comments on the determination of planets positions using astronomical formulas. However, what about the Rahu and Ketu positions? I will appreciate your comment on it.

    Also, I have tried out some astronomical software to get the planetary positions, and added the ayanamsha corrections, but I am not getting the correct vedic positions of the planets. Can you give any insight on this? Thank you!

Before submitting a comment on VEDIC ASTROLOGY, please understand that discussions/messages on the forum and on the blog are visible to the visitors of the site as public information and you allow the site to use the comment appropriately in the articles and notes, while answering your questions. Inappropriate and irrelevant comments will be removed at an admin’s discretion. Your email is used for verification purposes only, it will never be shared. Please go through the Terms of Use in the footer of the page.