Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Sun Never Sets

by idsfa (Vicar)
on Feb 20, 2006 at 02:50 UTC ( #531338=note: print w/replies, xml ) Need Help??

in reply to Sun Never Sets

Spring starts then. Not only is the sun moving from a negative declination to a positive one, but the Right Ascension is moving from just under 24h back to 0h. All those zeroes can allow minor math errors to become hugely important.

Without installing the modules myself, it looks like there may be a math error in the multiple (unnecessary) degree -> radian -> degree conversions leading to one too many factors of &pi/180 relating to the altitude term. If your problem goes away when you use the altitude of zero, that would confirm a problem in the _sunrise_sunset routine.

Assuming it is true for other years, I encourage you to report this bug to the author even if the altitude suggestion is incorrect.

The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://531338]
and God said, "Let Newton be!"...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2018-01-20 21:44 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (227 votes). Check out past polls.