X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fmoon.pl;h=1bc61479ca8cae031540d6f7274272631872a60e;hb=ab811a0c902225075a9bd69749f65594079433a9;hp=8013345a1407cdfd061a2f293533e646e76185d7;hpb=d0adf21cbcea77d72ffc021441961039c41852bf;p=spider.git diff --git a/cmd/show/moon.pl b/cmd/show/moon.pl index 8013345a..1bc61479 100644 --- a/cmd/show/moon.pl +++ b/cmd/show/moon.pl @@ -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);