X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FSpot.pm;h=80d345ed69e19f716f6a258762e616c221e89817;hb=abe7df695ac8666bf0d00c38f43bf68b76a00c31;hp=fb5683fb5e07b6e9e4656a31977afac323c6376c;hpb=06963a9fca5e08982934c10946b8452f13feba2c;p=spider.git diff --git a/perl/Spot.pm b/perl/Spot.pm index fb5683fb..80d345ed 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -22,15 +22,15 @@ use strict; use vars qw($VERSION $BRANCH); $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); -$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ ) || 0; +$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0)); $main::build += $VERSION; $main::branch += $BRANCH; -use vars qw($fp $statp $maxspots $defaultspots $maxdays $dirprefix $duplth $dupage $filterdef); +use vars qw($fp $statp $maxspots $defaultspots $maxdays $dirprefix $duplth $dupage $filterdef $totalspots $hfspots $vhfspots); $fp = undef; $statp = undef; -$maxspots = 50; # maximum spots to return +$maxspots = 100; # maximum spots to return $defaultspots = 10; # normal number of spots to return $maxdays = 100; # normal maximum no of days to go back $dirprefix = "spots"; @@ -140,6 +140,12 @@ sub add { my $buf = join("\^", @_[0..7]); $fp->writeunix($_[2], $buf); + $totalspots++; + if ($_[0] <= 30000) { + $hfspots++; + } else { + $vhfspots++; + } } # search the spot database for records based on the field no and an expression @@ -299,6 +305,7 @@ sub dup return 2 if $d < $main::systime - $dupage; $freq = sprintf "%.1f", $freq; # normalise frequency + $call = substr($call, 0, 12) if length $call > 12; chomp $text; $text =~ s/\%([0-9A-F][0-9A-F])/chr(hex($1))/eg; $text = substr($text, 0, $duplth) if length $text > $duplth;