SUN Time

Lew's Heliocentric Calculator

An Excel Spreadsheet for MS Excel 97

Features:

Enter 4 pieces of data: date and time of the observation and J2000 coordinates of the star. A small map of the sky then shows the location of the ecliptic, the sun and the star. The routine will calculate the JD, HJD, heliocentric correction, and coordinates of the star at the time of observation. Also displayed are the sun-earth distance and solar true and mean longitudes. The heliocentric correction is displayed in days, in minutes and also in seconds for convenience.

You may save the spreadsheet to a disk. The spreadsheet is protected against accidental erasure and the details of the calculations are on a hidden sheet (while the spreadsheet is freeware, the coding information is not). There are a couple error checks/verification notes, but if you input bad data, you will get bad answers. GIGO (Garbage In, Garbage Out) applies here.

If you use this spreadsheet and find any problems (incorrect answers, difficulty using it) please send Lew an E-mail at So far, it has been compared with three other software routines and disagreements of up to 3 seconds were found. No correction for sun-planet barycenter is incorporated and this may be the source of the differences.

Thanks to Shawn Dvorak and Wayne Warren for running trials with this spreadsheet and other software to help find the errors in coding. Appreciation also to Gary Frey for early assistance in the formula.

If you want a spreadsheet that accepts JD instead of the date (as yyyymmdd) and time (as hhmmss) go to JD-Suntime .

One note: you WILL get a warning that the spreadsheet contains Macros.
This is because it is password protected. There are no macros written into the sheet. It should be safe downloaded from the Geocities Server.

Suntime.xls is available at the link below (just click on the name and it will begin by launching Excel). The results may be copied from the answer cells directly into another spreadsheet. or incorporated into a macro.

Download SUNTime

Using SUNTime

There are only 4 places you need to enter numbers. Enter the date as
YYYYMMDD - For July 19, 2001 you enter 20000719
Enter the Time (Universal time) as
HHMMSS - for 13:05:59 enter 130559
Enter the Right ascension (J2000) of the star as
HHMMSS - for 21h 42m 43s enter 214243
Enter the declination as
+ddmmss - for -05 deg 29' 30'' enter -052930

A Sanity Check

What is a sanity check?
If you made a mistake entering any of the data, you get a chance to see it. SUNTime prints a picture and a word description of where in the sky your star is. The picture also includes the location of the sun and the star in relation to the sky and the ecliptic.
The sun is shown as a yellow dot and the star is a blue asterisk on a map of the sky. The ecliptic is shown by a series of dark blue dots. Check the picture to verify that the rough picture is OK
The second part of the sanity check is a word description of where in the sky the star is located - such as mid latitudes, and approximate hour of R.A.. This is done to catch typing mistakes and accidentally leaving off the seconds (if you don't know them or the need for precision is not that high, use 00 to fill in the data entry).
THE ANSWERS

There are answers to several questions (some you didn't ask!) shown in the spreadsheet. The GEOcentric Julian date is shown in light blue letters in the black space.
The Heliocentric Julian date (HJD) is shown in the PINK cell.
The precessed star coordinates are shown in the epoch of the observation. Since the spreadsheet called for J2000 coordinates, if the observation is made near the year 2000, the change due to precession will be minimal.

The heliocentric correction which is to be added to your observation time is shown in 3 forms: as a decimal day, as a number of minutes, and as a number of seconds. They are in the yellow boxes.
The input data used for the computation is shown in the cells to the right of the sheet.

A Black Empty Space


If there is a big black empty space where the answers should be, there is something drastically wrong with the input data. Check the RA and Declination you entered. If you entered the RA in degrees, it's wrong!The Spreadsheet will work only for times between JD 2300000 (Feb. 1585) and 2700000 (Mar. 2680).