January 4, 1992 -- Cambridge, Mass.

About Moon

This program is version zero of a simple port of the moontool that John Walker of Autodesk developed for Sun workstations.

The NeXT version is very similar to the Sun version.  The features I've added are a TIFF file of the moon, time travel, and a pause button.  When the program is not paused or in time travel, updates happen every ten seconds.  I've taken out Mr. Walker's -t switch.

The TIFF file looks very nice at full size, much better than when scrunched into the tiny MoonView beside all those statistics.  Double-click in the MoonView to check it out.  On a cloudy night, put the moon up on the whole screen, turn the brightness way down and the lights off, and you'll see again why it's so grand to have a computer painted black.

Input Format for Time Travel

If you should wonder about the input format for the time travel text field, you have six choices.

	--Format--				--sscanf info for techies--
	hh:mm:ss dd mmmmm yyyy		(6) %d:%d:%d %d %s %d
	hh:mm dd mmmmm yyyy		(5) %d:%d %d %s %d
	hhmm dd mmmmm yyyy		(4) %d %d %s %d
	dd mmmmm yyyy				(3) %d %s %d
	mmmmm yyyy				(2) %s %d
	yyyy						(1) %d

	hh, mm, ss, dd, and yy are numbers.  mmmmm is a string.
	What you don't enter becomes 0, 1, or January.

When you travel in time, I believe the stated accuracy of Mr. Walker's code will keep to within ten minutes, but he cautions, in the comments for meanphase(), ªDon't attempt to generalize it without understanding that the motion of the moon is far more complicated than this calculation reveals.º  So if you go way back or forward in time, be sure to check the results, if it matters to you.  I cannot blame Mr. Walker for errors I may have introduced.

Known Bugs

If it is winter in New England, and you time travel to June 1944, the local time displayed is Eastern Standard Time, not Eastern Daylight.  I hope to fix this for the more recent range of dates and local customs that Unix actually knows about.

Right around the new and full moon, the age of the moon and the words ªwaxingº and ªwaningº may be inconsistent.  Remember, the calculations are only good to ±10 minutes.

Not a Bug

To the left and right of the MoonView, you see East and West, and it may look backwards to you.  It isn't.  Imagine yourself lying on your back in a meadow, with your head pointing to the north pole, and your feet to the south.  As you face the sky, East is left and West is right, just as it was during the Cold War.

Thanks

	In all thy ways acknowledge him, and he shall direct thy paths.
	Proverbs 3:6

I'd like to thank the Usenet, in particular Tyler Gingrich, Jelske Kloppenburg, Andrew Loewenstern, Nathan Loofbourrow, Mark Nathan, Charles Perkins, Allyn Tennant, and John Walker.  Like everyone, I used code from NextDeveloper Examples.  And of course I have to thank NeXT for making such a wonderful computer.

Origins

The next section of this help text is the comment block found at the top of John Walker's Sun-based moontool.c file.

A Moon for the Sun

Release 2.0

Designed and implemented by John Walker in December 1987, revised and updated in February of 1988.

Make with:

cc -O moontool.c -o moontool -lm -lsuntool -lsunwindow -lpixrect

Adding appropriate floating point options to your hardware.  This program is a SunView tool which displays, as the icon for a closed window, the current phase of the Moon.  A subtitle in the icon gives the age of the Moon in days and hours.  If called with the "-t" switch, it rapidly increments forward through time to display the cycle of phases.

If you open the window, additional information is displayed regarding the Moon.  The information is generally accurate to within ten minutes.

The algorithms used in this program to calculate the positions Sun and Moon as seen from the Earth are given in the book "Practical Astronomy With Your Calculator" by Peter Duffett-Smith, Second Edition, Cambridge University Press, 1981.  Ignore the word "Calculator" in the title; this is an essential reference if you're interested in developing software which calculates planetary positions, orbits, eclipses, and the like.  If you're interested in pursuing such programming, you should also obtain:

"Astronomical Formulae for Calculators" by Jean Meeus, Third Edition, Willmann-Bell, 1985.  A must-have.

"Planetary Programs and Tables from -4000 to +2800" by Pierre Bretagnon and Jean-Louis Simon, Willmann-Bell, 1986.  If you want the utmost (outside of JPL) accuracy for the planets, it's here.

"Celestial BASIC" by Eric Burgess, Revised Edition, Sybex, 1985.  Very cookbook oriented, and many of the algorithms are hard to dig out of the turgid BASIC code, but you'll probably want it anyway.

Many of these references can be obtained from Willmann-Bell, P.O. Box 35025, Richmond, VA 23235, USA.  Phone: (804) 320-7016.  In addition to their own publications, they stock most of the standard references for mathematical and positional astronomy.

This program [Sun version] was written by:

   John Walker
   Autodesk, Inc.
   2320 Marinship Way
   Sausalito, CA  94965
   (415) 332-2344 Ext. 829

   Usenet: {sun!well}!acad!kelvin

This program is in the public domain: "Do what thou wilt shall be the whole of the law".  I'd appreciate receiving any bug fixes and/or enhancements, which I'll incorporate in future versions of the program.  Please leave the original attribution information intact so that credit and blame may be properly apportioned.

Yours Truly

The NeXT port was done as a 1992 New Year's resolution.

 	Geoffrey S. Knauth		Ich arbeite bei Firma:
	Lunar Software			Marble Associates, Inc.
	115 Mt. Auburn St., Apt. 65		38 Edge Hill Road
	Cambridge, MA  02138		Waltham, MA  02154
	(617) 547-5247			(617) 891-5555
	gsk@world.std.com		gsk@marble.com

Version One is contemplated someday.

Legalities

You may copy, modify and distribute this NeXT version as you wish, preferably according to the guidelines of the Free Software Foundation, as stated its General Public License, under which this program is given to you.  If you want to keep this kind of freedom, you may also inquire of the League for Programming Freedom by e-mail to ªleague@ai.mit.eduº.

Technically speaking, the astronomical routines provided by Mr. Walker were put into the public domain by him.

There is no warrantee provided with this software.