X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FSpot.pm;h=0df6891799dd8a3006da9c2a1c1880fcc16a86b6;hb=c1a9cb4e04fb7db7898b05542e671c4e9e55fb93;hp=b4fd27c4c1f5c69c757120742f61fecc62b5b568;hpb=dab8b370e48c980fa354dedd17d5a0c75b481862;p=spider.git diff --git a/perl/Spot.pm b/perl/Spot.pm index b4fd27c4..0df68917 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -22,10 +22,8 @@ use QSL; 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,0)); -$main::build += $VERSION; -$main::branch += $BRANCH; + +($VERSION, $BRANCH) = dxver(q$Revision$); use vars qw($fp $statp $maxspots $defaultspots $maxdays $dirprefix $duplth $dupage $filterdef $totalspots $hfspots $vhfspots $maxcalllth); @@ -169,7 +167,7 @@ sub prepare my @out = @_[0..4]; # just up to the spotter # normalise frequency - $out[0] = sprintf "%.1f", $out[0]+0.05; + $out[0] = sprintf "%.1f", $out[0]; # remove ssids and /xxx if present on spotter $out[4] =~ s/-\d+$//o; @@ -394,7 +392,8 @@ sub dup # remove SSID or area $by =~ s|[-/]\d+$||; - $freq = sprintf "%.1f", $freq; # normalise frequency +# $freq = sprintf "%.1f", $freq; # normalise frequency + $freq = int $freq; # normalise frequency $call = substr($call, 0, $maxcalllth) if length $call > $maxcalllth; chomp $text; @@ -407,6 +406,7 @@ sub dup } } my $otext = $text; + $text =~ s/^\+\w+\s*//; # remove leading LoTW callsign $text = pack("C*", map {$_ & 127} unpack("C*", $text)); $text =~ s/\s{2,}[\dA-Z]?[A-Z]\d?$// if length $text > 24; $text =~ s/[^\w]//g;