Equation of Time

If you had a java-enabled browser, you would see:

a window showing a graph of the Equation of Time, and buttons allowing values in a formula to be adjusted until the plotted difference was minimal.

This version of the applet was produced to provide an even more accurate formula for the EoT than the original applet. I didn't type out the differences between the two versions because I originally intended the new version to be for my own use only - and I already knew the differences. Compared with the original applet, there are now two more curves on the graph representing the contributing effects of the two new terms in the formula.

This version has twice as many buttons and the accuracy of the formula providing the smallest error curve is less than plus and minus 5 seconds. However, this assumes that the accuracy of the original data and the accuracy of my computer platform are insignificant.

You will notice that a table of information appears when your pointer is over the graph area. This shows the day and the data for that day.


Because the earth travels around the sun in an ellipse rather than a circle, the time when the sun is at its highest differs from midday each day by an amount known as the Equation of Time. The maximum difference is about 16.5 minutes at the beginning of November, and there are two positive and two negative asymmetrical peaks on either side of zero.

This applet was created to allow me to determine whether values for the Equation of Time can be calculated using a simple formula rather than being obtained from either a graph or a table. I'm quite unable to tackle the problem mathematically, and the thought of finding a solution empirically was quite appealing.

Primarily, the applet displays the Equation of Time using values extracted from an almanack.

It also displays a graph of
a.sin(b + theta) + c.sin(d + (2*theta))
and a graph of the difference between them.

(theta = number of days since Jan 1st * 360/365)

Buttons allow a, b, c and d to be adjusted up and down. The most positive and negative errors are also shown, so it is possible to adjust the values until ones giving the minimum error are found.

The technique is dependent upon the accuracy of the original data as well as on the accuracy of the computing system - different computers may give marginally different results.

I was only looking for an accuracy of less than a minute, and using
-7.32 * sin(-4.05 + theta) - 10.08 * sin(19.99 + (2*theta))
would appear to give me an error of less than half a minute.

These values are now programmed into the applet as the starting values. The buttons allow them to be adjusted up and down, but any change gives a greater error, at least on my computer. I thought of presetting into the program values which would provide room for improvement - clicking systematically on the eight buttons to minimise the error is at least as much fun as playing many of the computer games I have seen people play.

It would be possible for me to reduce the amplitude of the increment obtained with each button press which would allow values to be determined that provide a marginally reduced error, but it hardly seems necessary. A much greater reduction could be achieved by introducing another term into the formula.

It proved to be an interesting experiment, and obtaining the data from the library and preparing and using the program took less than three days work. Because the program is intended to be a tool to provide a result, it wasn't necessary to remove the obvious shortcomings such as the blinking of the window (despite buffering) and the sporadic display of excessively long numbers.

Keith. 11th November 1999.