2 # Show total VHF DX Spot Stats per day
4 # Copyright (c) 2001 Dirk Koopman G1TLH
9 my ($self, $line) = @_;
10 my @f = split /\s+/, $line;
15 my $date = cldate($main::systime);
16 my $utime = $main::systime;
22 if ($f =~ /^\d+$/ && $f < 366) { # no of days
26 if (my $ut = Date::Parse::str2time($f)) { # is it a parseable date?
30 push @out, $self->msg('e33', $f);
33 return (1, @out) if @out;
35 $now = Julian::Day->new($utime);
36 $now = $now->sub($days);
37 $date = cldate($utime);
39 # generate the spot list
40 for ($i = 0; $i < $days; $i++) {
41 my $fh = $Spot::statp->open($now); # get the next file
44 $fh = $Spot::statp->open($now);
49 next unless $l[0] eq 'TOTALS';
60 push @out, $self->msg('statvhf', $date, $days);
61 push @out, sprintf "%11s|%6s|%5s|%5s|%5s|%5s|%5s|%5s|%5s|%5s|%5s|", qw(Date Total 6m 4m 2m 70cm 23cm 13cm 9cm 6cm 3cm);
62 foreach my $ref (@in) {
64 foreach my $j (14..16,18..23) {
65 $tot[$j] += $ref->[$j];
66 $tot[0] += $ref->[$j];
67 $linetot += $ref->[$j];
69 push @out, join('|', sprintf("%11s|%6d", $ref->[0]->as_string, $linetot), map {$_ ? sprintf("%5d", $_) : ' '} @$ref[14..16,18..23]) . '|';
71 push @out, join('|', sprintf("%11s|%6d", 'Total', $tot[0]), map {$_ ? sprintf("%5d", $_) : ' '} @tot[14..16,18..23]) . '|';