Dec 152017
A complete astrology program that will produce a graphic working model of the solar system. Will use EGA and an 87 chip.
File ASTRO2.ZIP from The Programmer’s Corner in
Category Science and Education
A complete astrology program that will produce a graphic working model of the solar system. Will use EGA and an 87 chip.
File Name File Size Zip Size Zip Type
ASTRO.DOC 11836 4213 deflated
ASTRO.EXE 43150 25656 deflated

Download File ASTRO2.ZIP Here

Contents of the ASTRO.DOC file

An Astronomy Program
Version C2.0
By Don Thayer - May 14, 1988

Please note: For this program to run properly, you must have
DEVICE=ANSI.SYS in the CONFIG.SYS file when the computer is booted.
See your DOS manual for an explanation. This program has only been
tested on computers that have a CGA card with a color monitor and
computers with a EGA card (256K) and an enhanced monitor, although
monochrome systems should work (but no guarantees). You must have
an EGA with enhanced monitor to access the "SOLAR SYSTEM SIMULATOR"
and the graphics option in the "ORBITAL DATA" routine.

This program has been compiled and linked using version 4.0 of the
Microsoft C Compiler. Although this program does not require an 8087
( or 80287 ), the presence of one will improve the performance
greatly. Without a math coprocessor, the "Solar System Simulator"
will seem to drag along and the "S" key option will have little
effect. If you do have a 8087 or 80287 installed and would like to
see the difference, try the following:

At the DOS prompt type "SET NO87=ABC" and press the
key. Now try running the program. This has the effect
of turning off the 8087. To make use of the math
coprocessor again, type "SET NO87=". Press the key
right after the "=", do not even enter a space. NOTE:
This little trick does not work on all programs that use
the math coprocessor. To my knowledge it works only on
programs complied with versions 4.0 and 5.x of the
Microsoft C Compiler.

The algorithms for calculating data for "Orbital Data of Planets"
and "Rise and Set Times" were translated to "C" from a basic book
titled "Celestial Basic" by Eric Burgess published by Sybex.

From the Selection Menu, you can choose four different astronomy
routines. Whenever you quit from one of these routines, you will be
returned to this menu. To exit from the program altogether, press the
"Q" key from the Selection Menu.


This routine calculates the Heliocentric Longitude (in degrees),
Distance from the Sun (in AU), Right Ascension (in hours), Declination
(in degrees) and the Distance From the Earth (in AU). Once the data
has been displayed, the following line will be displayed at the bottom
of the screen:

G = Graph P = Print N = New Date Q = Quit

Press the "G" key for a graphic representation of the solar system.
Press the "P" key for the data to be printed on the printer. Pressing
the "N" key will prompt you for a new date and pressing the "Q" key
will return you to the Selection Menu.

After printing the data on a printer, the program will ask if you
want to advance the printer. Pressing the "Y" key will advance the
printer to the top of the next sheet. The program will normally print
two sets of data per page, however, selecting this option will allow
you to advance the printer after the first set.

The graphics of the solar system shows relationship between the
planets and although the distances between the orbits are pro-
portional, the orbits themselves are circular instead of the true
elliptical ones. NOTE: EGA is required for this option.

Pluto is not shown and for certain dates (such as Jan. 1, 1900)
because the planet is off the screen and the orbit path is never shown
because is greatly elliptical. The "SOLAR SYSTEM SIMULATOR" displays
a more accurate relationship between all the planets and their paths.


This routine will calculate the approximate rise and set times for
all the planets plus the Sun and Moon. Also shown is the transit time,
R.A., declination, distance from the Earth and the angular distance
from the Sun.

When you first access this routine, the default location is set for
San Lorenzo California. Whenever "RISE AND SET TIMES" is selected,
the location will displayed on the screen and you have the option of
changing this. Once a new location is entered, it will remain
effective as long as you don't exit the program. Please note that the
longitude and latitude are used only with the "RISE AND SET TIMES"
routine and none of the others. If you change the longitude and
latitude, enter the new values in degrees and decimal degrees (i.e.

After the data is displayed you may print the data on the printer,
select a new date or quit to the Selection Menu.


This routine requires only the Year and Month. Once this is
entered, the program calculates the date of the first full moon prior
to the date entered and then will display the next three sets of dates
for the four phases of the Moon.


This option will produce a graphic working model of the solar
system. In addition to the year, month and day, this routine also
requires the interval in days, the innermost planet and the Outer

The interval in days affects the speed at which the planets appear
to move. Since Mercury travels around the Sun in approximately 88
days, it will move fairly rapidly with a one day interval. Pluto on
the other hand will require an interval of several hundred days.

The interval you enter should be an integer greater than zero. A
number less than zero will cause the solar system to run backwards in
time ( who said time travel was impossible? ) and an interval of zero
will show the planets only in the position for the given date. This
value can be changed using the "I" option when the simulator is

After the interval in days is entered, the program will prompt you
for the "Innermost Planet Number" and then the "Outer Planet Number".
Select the planet number from the table shown at the bottom of the
screen. Also the outer planet number must equal to or greater than the
innermost planet number.

If you wish, you can display all 9 planets on the screen at the
same time, however, the inner 4 planets will only appear as a circular
blob in the center of the screen.

Once the simulator is running, there are several options that can
be chosen. These are displayed in the lower left corner or the screen.

Pressing the "I" key will prompt you for a new interval. If you
wish, you can enter a negative number and watch the planets move
backwards. This is helpful if you want to see a specific date again.

While the simulator is running, certain information is being
updated on the screen. The "S" key toggles this updating on and off.
The writing of this data on the screen takes time and slows down the
graphics. Although the performance on the non-8087 version is small,
the 8087 version can be dramatically improved by turning off the

The "C" key will clear the screen and the tracing of the planets
paths will start where the old screen left off. This is particularly
useful when some of the inner planets paths have made a complete
revolution. It is also useful when you change the direction of
movement using the "I" key.

Pressing the "P" key will temporarily halt the simulator. Press
any other key to start it again.

To quit the simulator and return to the Selection Menu press the
"Q" key.


Each of the routines require you to enter the year, month and day
with the exception of the "PHASES OF THE MOON" which only requires the
year and month. The month must be entered as an integer between 1 and
12, do not enter the name of the month.

As each item of the date is requested, the previous value will be
displayed in parenthesis. For example you may see:
Enter The Year (CR = 1989)
If the carriage return is pressed without entering any value (or
the value entered is 0), the value in the parenthesis will be used.

Please note: Whenever the "PHASES OF THE MOON" is selected, the
default day is reset to 1.


Start the program and select option for the simulator. Enter
the date of May 1, 1988. Enter an interval of one (1) and select
Mercury as the innermost planet (1) and Mars (4) as the outer planet.
Around June 13,1988 you should see the opposition of Mercury, Venus
and Earth. A little later in the same year, around September 26 you
should see the opposition of Earth and Mars. You may want to compare
the Heliocentric Longitude's of these planets for these dates using
option from the Selection Menu.


This program is by no means exact. To the best of my knowledge it
is fairly accurate, however, there are a number of astronomical cor-
rections that have not been allowed for. Also much of the original
data was limited to only a few significant figures. Admittedly this
makes poor use of the 8087 with its 16 digit accuracy.

From an astronomer's point of view, my knowledge of astronomy is
nil and of the related math, it is even less. There are several very
good astronomy program available for the PC, however, none of them
that I have found combine the planetary data and graphics the way this
one does.

If you have any comments, suggestions or information on how I can
increase the accuracy of this program, please write to me at the
following address:

Don Thayer ( CIS:72436,3026)
874 Via Bregani
San Lorenzo, Ca 94580

Users of ASTRO are encouraged to copy and distribute this software
along with its documentation for non-commercial purposes.

No fee or other charges may be made in the distribution of this
software without written permission from Don Thayer.

 December 15, 2017  Add comments

Leave a Reply