3 # show sunrise and sunset times for each callsign or prefix entered
5 # 1999/11/9 Steve Franke K9AN
8 my ($self, $line) = @_;
9 my @list = split /\s+/, $line;
13 my ($lat, $lon); # lats and longs in radians
14 my ($sec, $min, $hr, $day, $month, $yr) = (gmtime($main::systime))[0,1,2,3,4,5];
22 my $user = DXUser->get_current(uc $l);
23 if ($user && $user->lat && $user->long) {
24 push @in, [$user->qth, $user->lat * $d2r, $user->long * -$d2r, uc $l ];
27 my @ans = Prefix::extract($l);
34 push @in, [ $a->name, $lat, $lon, $pre ];
39 if ($self->user->lat && $self->user->long) {
40 push @in, [$self->user->qth, $self->user->lat, -$self->user->long, $self->call ];
42 push @in, [$main::myqth, $main::mylatitude, -$main::mylongitude, $main::mycall ];
46 push @out, $self->msg('moon');
49 my ($rise, $set, $az, $dec, $loss )=Sun::rise_set($yr,$month,$day,$hr,$min,$l->[1],$l->[2],1);
50 $l->[3] =~ s{(-\d+|/\w+)$}{};
51 push @out,sprintf("%-6.6s %-30.30s %s %s %6.1f %6.1f %3.1f", $l->[3], $l->[0], $rise, $set, $az, $dec, $loss);