Bug in sunrise/sunset program

Robert Bond rgb at nsc-pdc.UUCP
Fri May 31 04:32:34 AEST 1985


In article <144 at hoqam.UUCP> twb at hoqam.UUCP (BEATTIE) writes:

>I tried to understand the various arguments, like -t to change the time.
>What does the current time have to do with when the sun rises??

The program also prints the current postion of the sun.  The -t option
lets you specify some time other than the current system time.

>I got out my almanac and it says that on January 1,1981 the sun rose at
>06:36 GMT and set at 17:32 GMT,
>so I tried sun -z 0 -a 51.5 -o 0 -d 01/01/1981
>it says the sun rises at 08:06 and sets at 16:02.

A little common sense says that the sun doesn't rise at 6:30 in the morning
at latitude 51 degrees in the middle of the winter.  Some experimentation
with latitude says that your almanac used latitude about 20.5 degrees north.
Was it an Egyptian almanac? :-)  Seriously, responses from several other
sources around the U.S. indicate that the program is within a few minutes
of the time posted in the paper.

I do have some bugs with Xenix implementations (mostly pointer kinds of
things) that I am working on.  I will post the corrections when I get
it all working.  We don't have a Xenix machine, or any 286's, so its kind
of painful to test.


-- 
    Robert Bond 			nsc!nsc-pdc!rgb
    National Semiconductor		tektronix!reed!nsc-pdc!rgb



More information about the Comp.sources.bugs mailing list