Posted on 2009-06-21 19:33:32-07 by worstead
Iteration error
I have posted a bug for Astro::Sunrise #47049. 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. The problem appears to be in the iteration because it does not occur when "inter" is set to zero. I have successfully used this module before so the error must come from the modules that Astro::Sunrise calls or this version of perl? Any suggestions? Thank you.
#!/usr/bin/perl -w # use Astro::Sunrise; $y=2012; $m=03; $d=19; $long=-83; $lati=39; $Zone=-5; $DST=1; $ALT=-0.8333; $inter=1; ($sunrise, $sunset)=sunrise($y,$m,$d,$long,$lati,$Zone,$DST,$ALT,$inter); print $sunrise,"\n"; print $sunset,"\n";
I am using a 32-bit machine, Fedora-11, perl-5.10.0-69.fc11.i586, and Astro::Sunrise which was downloaded from cpan on 17 June 2009. The other modules are also recent (i.e. in Fedora-11 or downloaded from cpan since June 14 2009).
Direct Responses: 11018 | Write a response
Posted on 2009-06-21 20:17:11-07 by jforget in response to 11017
Re: Iteration error
I have found the same error in another module from RKHILL, DateTime::Event::Sunrise. This is RT ticket 34770, with a test case and a patch. This is due to the fact that sub _sun_RA_dec should return three values instead of just two and the calling sub _sunrise_sunset should not confuse the Right Ascension $sRA with the Sun-to-Earth distance in astronomical units $sr.
I guess the problem is the same with this module.
Direct Responses: 11021 | Write a response
Posted on 2009-06-22 06:01:40-07 by qiancindy in response to 11018
Re: Iteration error
Jaw Crusher Zhengzhou Vipeak Heavy Industry Machinery Co., Ltd is one of the most popular stone-crushing equipments in the world, Jaw Crusher is ideally suitable for primary and secondary crushing. The highest anti-pressure strength of crushed material is 320MPa. It is widely used in mining, metallurgy, construction, highway, railroad, and chemistry industries and etc. Many models are available according to your different fineness requirements. http://www.grinderpro.com/Raymond.html Raymond Mill http://www.grinderpro.com/Crusher.html jaw crusher|Stone Crusher
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.