doug@escher.UUCP (Douglas J Freyburger) (02/24/86)
I am looking for a routine that will return the phase of the moon (in floating, a 0-28 integer, or whatever) from a Unix binary time gotten from 'long time()' or any of the other time routines. I am only interested in the level of accuracy given on calendars with the little pictures of the new moon, first quarter, full moon, and third quarter on them, so timezone and daylight savings corrections are optional. Alternately, anyone who has already built a phase of the moon feature into your 'calendar' utility, would you be willing to share the code? (-)NX in advance, Doug Freyburger -- Doug Freyburger DOUG@JPL-VLSI, JPL Mail Stop 23 escher!doug, escher!teleop!doug Pasadena, CA 91109 etc. <Generic Disclaimer>
paul@zoom.UUCP (20 Proprietor) (02/26/86)
A program came across the net some time in the recent past. It was written by "ArchMach", converted from PL/I by Brian Hess and "extensively cleaned up" by Rich $alz. It's called `pom' and I'm sending it to you under separate cover. If there's enough interest, you may want to post it to the world. It is certainly accurate enough for most, and can be quickly modified to give you a floating point number representing the phase (rather than a character string). I have a multitude of (sometimes ridiculously accurate) programs for the determination of the ephemerides. Such topics as: * Time conversion routines - UN*X time, UT, ET, UT adjusted for longitude, Sidereal Time (apparent, mean), etc., all with routines to facilitate cross-conversion. * Nutation calculations - based on 1984 IAU Theory of Nutation (yes, I DID enter all those coefficients!) * Sun calculations * Moon calculations * Solution of Kepler's equation * Comet ephemeris routines (including special programs for the oldest sensation...comet Halley) By the way, they're all written in `C' and run on my 3b2/300 (without a floating point coprocessor, they actually jog :'). Anyone interested can send me mail and I'd be glad to further explain, etc. Given the sheer volume (about 4k lines), I'd rather not post to the public. At any rate, feel free to reply if you have any interest in astronomical calculations. Who says JPL's cornered the market on space computations :'> ? Paul Ruel ihnp4!ariel!zoom!paul