Change DXUser->get* to DXUser::get*
[spider.git] / cmd / show / moon.pl
index 8013345a1407cdfd061a2f293533e646e76185d7..1bc61479ca8cae031540d6f7274272631872a60e 100644 (file)
@@ -17,6 +17,7 @@ my $f;
 my $l;
 my $n_offset;
 my @list;
+my ($rise, $set, $az, $dec, $loss, $ifrac);
 
 while ($f = shift @f){
        if(!$n_offset){
@@ -39,7 +40,7 @@ my @in;
 
 if (@list) {
        foreach $l (@list) {
-               my $user = DXUser->get_current(uc $l);
+               my $user = DXUser::get_current(uc $l);
                if ($user && $user->lat && $user->long) {
                        push @in, [$user->qth, $user->lat, -$user->long, uc $l ];
                } else {
@@ -70,7 +71,7 @@ if( !$n_offset ) {
 }
 
 foreach $l (@in) {
-       my ($rise, $set, $az, $dec, $loss )=Sun::rise_set($yr,$month,$day,$hr,$min,$l->[1],$l->[2],1);
+       ($rise, $set, $az, $dec, $loss, $ifrac)=Sun::rise_set($yr,$month,$day,$hr,$min,$l->[1],$l->[2],1);
        $l->[3] =~ s{(-\d+|/\w+)$}{};
        if( !$n_offset ) {      
        push @out,sprintf("%-6.6s %-30.30s %02d/%02d/%4d %s %s %6.1f %6.1f", $l->[3], $l->[0], $day, $month, $yr, $rise, $set, $az, $dec);
@@ -78,7 +79,5 @@ foreach $l (@in) {
        push @out,sprintf("%-6.6s %-30.30s %02d/%02d/%4d %s %s", $l->[3], $l->[0], $day, $month, $yr, $rise, $set);
        }
 }
-
-                       
-
+push @out,sprintf("Illuminated fraction of the Moon's disk is %4.2f",$ifrac);
 return (1, @out);