+
+__END__
+
+=head1 NAME
+
+rbn.pl - an experimental RBN filter program
+
+=head1 SYNOPSIS
+
+rbn.pl [options] <any callsign>
+
+We read the raw data
+from the RBN. We collect similar spots on a frequency within 100hz and try to
+deduce which if them is likely to be the true callsign. Emitted spots are cached and thereafter ignored
+for a period until it is spotted again, when it may be emitted again - but marked as a RESPOT.
+
+This is just technology demonstrator designed to scope out the issues and make sure that the line decoding works
+in all circumstances. But even on busy weekends it seems to cope just fine deduping away within its limits.
+
+To see it work at its best, run it as: rbn.pl -stats <any callsign>
+
+Leave it running for some time, preferably several (10s of) minutes.
+You will see it slowly reduce the number of new spots until you start to see "RESPOT" lines. Reductions
+of more than one order of magnitude is normal. Particularly when there are many more spotters.
+
+=head1 OPTIONS
+
+=over 8
+
+=item B<-help>
+
+Print a brief help message and exits.
+
+=item B<-man>
+
+Prints the manual page and exits.
+
+=item B<-host>=telnet.reversebeacon.net
+
+As default, this program will connect to C<telnet.reversebeacon.net>. Use this argument to change that.
+
+=item B<-port>=7000
+
+As default, this program will connect to port 7000. Use this argument to change that to some other port.
+
+=item B<-want>=cw,rtty,dx,beacon,psk,ft,digital
+
+The program will print all spots in all classes in the 'mode/calling' column [cw, rtty, beacon, dx, psk, ft, digital]. You can choose one or more of
+these classes if you want specific types of spots. The class 'digital' is equivalent to [rtty,psk,ft]. The class 'beacon' includes
+NCDXF beacons.
+
+E.g. rbn.pl -want=psk,ft,beacon g9tst
+
+=item B<-stats>
+
+Print a comma separated line of statistics once a minute which consists of:
+
+STAT,E<lt>raw RBN spotsE<gt>,E<lt>de-duped RBN spotsE<gt>,E<lt>new spotsE<gt>
+
+=item B<-repeattime=60>
+
+A cache of callsigns and QRGs is kept. If a SPOT comes in after B<repeattime> minutes then it re-emitted
+but with a RESPOT tag instead. Set this argument to 0 (or less) if you do not want any repeats.
+
+=item B<-rbn>
+
+Show the de-duplicated RBN lines as they come in.
+
+=item B<-raw>
+
+Show the raw RBN lines as they come in.
+
+=back
+
+=head1 DESCRIPTION
+
+B<This program> connects (as default) to RBN C<telnet.reversebeacon.net:7000> and parses the raw output
+which it deduplicates and then outputs unique spots. It is possible to select one or more types of spot.
+
+The output is the RBN spot line which has been separated out into a comma separated list. One line per spot.
+
+Like this:
+
+ SPOT,DK3UA-#,3560.0,DL6ZB,CW,27,dB,26,WPM,CQ,2152Z
+ SPOT,WB6BEE-#,14063.0,KD6SX,CW,24,dB,15,WPM,CQ,2152Z
+ RESPOT,S50ARX-#,1811.5,OM0CS,CW,37,dB,19,WPM,CQ,2152Z
+ SPOT,DF4UE-#,3505.0,TA1PT,CW,11,dB,23,WPM,CQ,2152Z
+ SPOT,AA4VV-#,14031.0,TF3Y,CW,16,dB,22,WPM,CQ,2152Z
+ SPOT,SK3W-#,3600.0,OK0EN,CW,13,dB,11,WPM,BEACON,2152Z
+ STAT,263,64,27
+
+If the -raw flag is set then these lines will be interspersed with the raw line from the RBN source, prefixed
+with "RAW,". For example:
+
+ RAW,DX de PJ2A-#: 14025.4 IP0TRC CW 16 dB 31 WPM CQ 1307Z
+ RAW,DX de PJ2A-#: 10118.9 K1JD CW 2 dB 28 WPM CQ 1307Z
+ RAW,DX de K2PO-#: 1823.4 HL5IV CW 8 dB 22 WPM CQ 1307Z
+ SPOT,K2PO-#,1823.4,HL5IV,CW,8,dB,22,WPM,CQ,1307Z
+ RAW,DX de LZ7AA-#: 14036.6 HA8GZ CW 7 dB 27 WPM CQ 1307Z
+ RAW,DX de DF4UE-#: 14012.0 R7KM CW 32 dB 33 WPM CQ 1307Z
+ RAW,DX de G7SOZ-#: 14012.2 R7KM CW 17 dB 31 WPM CQ 1307Z
+
+
+=cut
+