Skip Menu |

This queue is for tickets about the Astro-Sunrise CPAN distribution.

Report information
The Basics
Id: 47049
Status: resolved
Priority: 0/
Queue: Astro-Sunrise

People
Owner: J2N-FORGET [...] orange.fr
Requestors: rayner.2 [...] osu.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.92



Subject: Iteration bug
Date: Wed, 17 Jun 2009 09:42:52 -0400
To: bug-Astro-Sunrise [...] rt.cpan.org
From: John N Rayner <jrayner [...] columbus.rr.com>
Astro::Sunrise gives me an error of "Sun never sets!!" each year for leap years, e.g. March 19 2012, but not for other dates. Location does not appear to affect result. Is the problem in iteration? Any suggestions? Thank you. #!/usr/bin/perl -w # use Astro::Sunrise; $y=2012; $m=03; $d=19; $long=-86; $lati=37 $Zone=-5; $DST=1; $ALT=-0.8333; ($sunrise, $sunset)=sunrise($y,$m,$d,$long,$lati,$Zone,$DST,$ALT,1); print $sunrise,"\n"; print $sunset,"\n"; I am using Fedora-11, perl-5.10.0-69.fc11.i586,Astro::Sunrise was downloaded from cpan on 17 June 2009. PS I did not use Bitcard because "This Connection is Untrusted"! -- Please reply to: rayner.2@osu.edu John N Rayner, Geography/Atmospheric Sciences, Ohio State Univ. 1035 Derby Hall, 154 N. Oval Mall, Columbus, OH 43210-1361, USA
This has nothing to do with the iteration parameter. See http://rt.cpan.org/Public/Bug/Display.html?id=34770 for a similar bug in DateTime::Event::Sunrise. This is due to a confusion between variables $sr and $sRA, which are the Sun-to-Earth distance (in astronomical units) and the Sun's right ascension (in degrees).
RT-Send-CC: jrayner [...] columbus.rr.com
Here is a patch to fix the 19/20/21 March problem. To install it: Download Astro-Sunrise-0.91.tar.gz and astro-sunrise.patch into the same directory tar -zxvf Astro-Sunrise-0.91.tar.gz mv Astro-Sunrise-0.91 Astro-Sunrise patch -p0 < astro-sunrise.patch cd Astro-Sunrise perl Makefile.PL make make test sudo make install Or you can clone or download my Github repository: https://github.com/jforget/Astro-Sunrise and install with the usual "make" mantra.
Subject: astro-sunrise.patch

Message body is not shown because it is too large.