From:	MERC::"uunet!CRVAX.SRI.COM!RELAY-INFO-VAX" 22-JUN-1992 11:17:58.93
To:	info-vax@kl.sri.com
CC:	
Subj:	Re: Phases of the Moon (The Epic Continues)

In article <709127044snx@hectic.demon.co.uk>, mike@hectic.demon.co.uk (Mike Davies) writes:
> 
> In article <01GLFLFSR9R4000LSN@EKU.BITNET> STUBRBEE@EKU.BITNET writes:
> 
> > the discussion.  That discussion was on calculating what phase the moon
> > is in on any given date.  Is it even possible?  The reason I'm asking this
> 
> If you can find a X11R5 kit, this contains a program called XPHOON
> which displays the current phase of the moon - I believe. 


        Please be advised (if it matters to you, ;) that XPHOON has
always had a little bug associated with daylight savings time.  It get's
itself off by 2 hours because it adds with it should be subtracting an
hour.

        If you are interested, here is the corrected version of the
jtime() routine from phase.c of the XPHOON package.

---------cut here -----8<--------8<-------------8<------------------------------
/* jtime - convert internal date and time to astronomical Julian
**	     time (i.e. Julian date plus day fraction, expressed as
**	     a double)
*/

double jtime(t)
struct tws *t;
{
	int c;

	c = - t->tw_zone;
	if ( t->tw_flags & TW_DST )
		c -= 60;	/* changed by RLD to the CORRECT way! */

	return (jdate(t) - 0.5) + 
	   (t->tw_sec + 60 * (t->tw_min + c + 60 * t->tw_hour)) / 86400.0;
}

--------------------------------------------------------------------------------

rick
-- 
Richard L. Dyson               INTERNET:  dyson@sunfish.Physics.UIowa.EDU
                                 //-n-\\
                         _____---=======---_____
                     ====____\   /.. ..\   /____====
                   //         ---\__O__/---        \\
                   \_\                            /_/

