X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fmoon.pl;h=ef1ba4573a9516695c0dc89ce5979f5100492ae0;hb=35432a9f25350b9a5db513efbe248b61176b0684;hp=d26a96536ef8109ca8c26a3af0fd71eb45240d11;hpb=5ba129dc8a6560155ab5560b2f603d161d34cecb;p=spider.git diff --git a/cmd/show/moon.pl b/cmd/show/moon.pl index d26a9653..ef1ba457 100644 --- a/cmd/show/moon.pl +++ b/cmd/show/moon.pl @@ -1,9 +1,9 @@ #!/usr/bin/perl # -# show sunrise and sunset times for each callsign or prefix entered +# show moonrise and moonset times for each callsign or prefix entered # # 1999/11/9 Steve Franke K9AN -# +# 2000/10/27 fixed bug involving degree to radian conversion. my ($self, $line) = @_; my @list = split /\s+/, $line; @@ -21,7 +21,7 @@ if (@list) { foreach $l (@list) { my $user = DXUser->get_current(uc $l); if ($user && $user->lat && $user->long) { - push @in, [$user->qth, $user->lat * $d2r, $user->long * -$d2r, uc $l ]; + push @in, [$user->qth, $user->lat, -$user->long, uc $l ]; } else { # prefixes ---> my @ans = Prefix::extract($l); @@ -48,7 +48,7 @@ push @out, $self->msg('moon'); foreach $l (@in) { my ($rise, $set, $az, $dec, $loss )=Sun::rise_set($yr,$month,$day,$hr,$min,$l->[1],$l->[2],1); $l->[3] =~ s{(-\d+|/\w+)$}{}; - push @out,sprintf("%-6.6s %-30.30s %s %s %6.1f %6.1f %3.1f", $l->[3], $l->[0], $rise, $set, $az, $dec, $loss); + push @out,sprintf("%-6.6s %-30.30s %s %s %6.1f %6.1f %3.1f", $l->[3], $l->[0], $rise, $set, $az, $dec, $loss); }