X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fsun.pl;h=8d7d79ae6b9d9e593b982d94710e7388cd69e24a;hb=ed104958bdcae57f6147b07eb3ebdaddf44908cf;hp=1e9b9b06f84716ffc75aa0167057f414ca04dd20;hpb=465426f9282b990ec3462c63e5ca7613f92fb290;p=spider.git diff --git a/cmd/show/sun.pl b/cmd/show/sun.pl index 1e9b9b06..8d7d79ae 100644 --- a/cmd/show/sun.pl +++ b/cmd/show/sun.pl @@ -30,24 +30,24 @@ if (@list) { my $a; foreach $a (@ans) { $lat = $a->{lat}; - $lon = $a->{long}; - $lat *= $d2r; - $lon *= -$d2r; + $lon = -$a->{long}; push @in, [ $a->name, $lat, $lon, $pre ]; } } } } else { if ($self->user->lat && $self->user->long) { - push @in, [$self->user->qth, $self->user->lat * $d2r, $self->user->long * -$d2r, $self->call ]; + push @in, [$self->user->qth, $self->user->lat, -$self->user->long, $self->call ]; } else { - push @in, [$main::myqth, $main::mylatitude * $d2r, $main::mylogitude * -$d2r, $main::mycall ]; + push @in, [$main::myqth, $main::mylatitude, -$main::mylongitude, $main::mycall ]; } } +push @out, " Rise Set Azim Elev"; foreach $l (@in) { - my $string=Sun::riseset($yr,$month,$day,$l->[1],$l->[2]); - push @out,sprintf("%-2s %s %s",$l->[3],$l->[0],$string); + my ($rise, $set, $az, $dec )=Sun::rise_set($yr,$month,$day,$hr,$min,$l->[1],$l->[2],0); + $l->[3] =~ s{(-\d+|/\w+)$}{}; + push @out,sprintf("%-6.6s %-30.30s %s %s %6.1f %6.1f ", $l->[3], $l->[0], $rise, $set, $az, $dec); }