Friday, June 11, 2010

Astrology Software in VB / c# .NET

Visual Studio can not only create enterprise applications. It can also be used to create astrology software. A few years back i started developing astrology software. The software can construct astrology chart using date and time of birth. Many people wonder how to calculate the planet positions at a given time for a given place. In those days of paper and pen astrologer and astronomers spent several hours to calculate planetary positions. They developed ephemeris to that will record daily positions of heavenly objects and planets.

With the invent of computer system the speed of calculations were dramatically increased. Computer can fetch a data with in second from a database. For humans it would take hours or even days to search and retrieve.

Electronic ephemeris is the main thing if you want to develop a astrology software. The .NET has enough namespace / class libraries to develop a rich user interface. It has everything to printing, reporting, drawing. The System.Drawing has all GDI functionality to develop a graphic rich application. For ephemeris i used swiss ephemeris which is available for free. It is a single DLL (Dynamic Link Library) to calculate planetary longitudes. To use the DLL in your VB .NET / c# .NET you will have to use the DLLImport function. This function is used to call the unmanaged code within the managed environment of .NET. I have given below a sample DLLImport that imports a function in swiss ephemeris DLL.

[DllImport("swedll32.dll")]
        public static extern int swe_calc(double tjd ,int ipl,int iflag,ref double x,
        string serr);

Write to me if you want to more about developing / coding Astrology software in .NET