r54623 - in /trunk/libdatetime-astro-sunrise-perl/debian: changelog patches/series patches/sunrise-march.patch

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Sun Mar 21 17:42:10 UTC 2010


Author: gregoa
Date: Sun Mar 21 17:41:55 2010
New Revision: 54623

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=54623
Log:
New patch sunrise-march.patch to fix sunset times around first day of
spring; thanks to Joey Hess for the bug report and to pointer to the patch
(closes: #574749).

Added:
    trunk/libdatetime-astro-sunrise-perl/debian/patches/sunrise-march.patch
Modified:
    trunk/libdatetime-astro-sunrise-perl/debian/changelog
    trunk/libdatetime-astro-sunrise-perl/debian/patches/series

Modified: trunk/libdatetime-astro-sunrise-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetime-astro-sunrise-perl/debian/changelog?rev=54623&op=diff
==============================================================================
--- trunk/libdatetime-astro-sunrise-perl/debian/changelog (original)
+++ trunk/libdatetime-astro-sunrise-perl/debian/changelog Sun Mar 21 17:41:55 2010
@@ -26,6 +26,9 @@
     Debian Policy since 3.8.0.
   * debian/control: Changed: Switched Vcs-Browser field to ViewSVN
     (source stanza).
+  * New patch sunrise-march.patch to fix sunset times around first day of
+    spring; thanks to Joey Hess for the bug report and to pointer to the patch
+    (closes: #574749).
 
  -- gregor herrmann <gregor+debian at comodo.priv.at>  Sat, 01 Dec 2007 23:33:34 +0100
 

Modified: trunk/libdatetime-astro-sunrise-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetime-astro-sunrise-perl/debian/patches/series?rev=54623&op=diff
==============================================================================
--- trunk/libdatetime-astro-sunrise-perl/debian/patches/series (original)
+++ trunk/libdatetime-astro-sunrise-perl/debian/patches/series Sun Mar 21 17:41:55 2010
@@ -1,1 +1,2 @@
 drop_stray_debug.patch
+sunrise-march.patch

Added: trunk/libdatetime-astro-sunrise-perl/debian/patches/sunrise-march.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetime-astro-sunrise-perl/debian/patches/sunrise-march.patch?rev=54623&op=file
==============================================================================
--- trunk/libdatetime-astro-sunrise-perl/debian/patches/sunrise-march.patch (added)
+++ trunk/libdatetime-astro-sunrise-perl/debian/patches/sunrise-march.patch Sun Mar 21 17:41:55 2010
@@ -1,0 +1,49 @@
+Autor: Jean Forget
+Reviewed-By: gregor herrmann <gregoa at debian.org>
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=34770
+Bugs-Debian: #574749
+Origin: https://rt.cpan.org/Public/Bug/Display.html?id=34770
+Description: sunset times around 21st March
+
+--- a/Sunrise.pm
++++ b/Sunrise.pm
+@@ -153,12 +153,19 @@ sub sun_rise_set {
+     my ( $d, $lon, $lat, $altit, $h ) = @_;
+ 
+     
++    # Compute local sidereal time of this moment
+     my $sidtime = revolution( GMST0($d) + 180.0 + $lon );
+ 
+-    my ( $sRA, $sdec ) = sun_RA_dec($d);
++    # Compute Sun's RA + Decl + distance at this moment
++    my ( $sRA, $sdec, $sr ) = sun_RA_dec($d);
++
++    # Compute time when Sun is at south - in hours UT
+     my $tsouth  = 12.0 - rev180( $sidtime - $sRA ) /$h ;
+-    my $sradius = 0.2666 / $sRA;
+ 
++    # Compute the Sun's apparent radius, degrees
++    my $sradius = 0.2666 / $sr;
++
++    # Do correction to upper limb, if necessary
+     if ($upper_limb) {
+         $altit -= $sradius;
+     }
+@@ -300,7 +307,7 @@ sub sun_RA_dec {
+     #
+     # _RETURN
+     #
+-    # Sun's Right Ascension (RA) and Declination (dec)
++    # Sun's Right Ascension (RA), Declination (dec) and distance (r)
+     # 
+     #
+     my ($d) = @_;
+@@ -323,7 +330,7 @@ sub sun_RA_dec {
+     my $RA  = atan2d( $y, $x );
+     my $dec = atan2d( $z, sqrt( $x * $x + $y * $y ) );
+ 
+-    return ( $RA, $dec );
++    return ( $RA, $dec, $r );
+ 
+ }    # sun_RA_dec
+ 




More information about the Pkg-perl-cvs-commits mailing list