truncate qrg in spot dupe check
[spider.git] / perl / Spot.pm
index b4fd27c4c1f5c69c757120742f61fecc62b5b568..4f9f18ab2fa0540f3a7157268c9a5807274f1e60 100644 (file)
@@ -169,7 +169,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 +394,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 +408,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;