projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
normalise spot dupe fields, normalise qrg by 25khz
[spider.git]
/
perl
/
VE7CC.pm
diff --git
a/perl/VE7CC.pm
b/perl/VE7CC.pm
index 2679ff1e4e2f39dda68d71821c6e9a8faa9fb65b..d90430ca5a661fb3911165c4ea9cade535d5d997 100644
(file)
--- a/
perl/VE7CC.pm
+++ b/
perl/VE7CC.pm
@@
-15,29
+15,42
@@
use DXDebug;
use DXUtil;
use Julian;
use Prefix;
use DXUtil;
use Julian;
use Prefix;
+use DXUser;
use strict;
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;
-
sub dx_spot
{
my $self = shift; # this may be useful some day
my $freq = shift;
my $spotted = shift;
my $t = shift;
sub dx_spot
{
my $self = shift; # this may be useful some day
my $freq = shift;
my $spotted = shift;
my $t = shift;
+ my $loc_spotted = '';
+ my $loc_spotter = '';
+ my $ref = DXUser::get_current($spotted);
+ if ($ref) {
+ my $loc = $ref->qra || '';
+ $loc_spotted =substr($loc, 0, 4) if $loc;
+ }
+
+ # remove any items above the top of the max spot data
+ pop while @_ > 11;
- # remove interface callsign;
- pop;
+ # make sure both US states are defined
+ $_[9] ||= '';
+ $_[10] ||= '';
my $spotted_cc = (Prefix::cty_data($spotted))[5];
my $spotter_cc = (Prefix::cty_data($_[1]))[5];
my $spotted_cc = (Prefix::cty_data($spotted))[5];
my $spotter_cc = (Prefix::cty_data($_[1]))[5];
+ $ref = DXUser::get_current($_[1]);
+ if ($ref) {
+ my $loc = $ref->qra || '';
+ $loc_spotter = substr($loc, 0, 4) if $loc;
+ }
+ my $text = $_[4] || '';
+ $text =~ s/\^/~/g;
- return sprintf("CC11^%0.1f^%s^", $freq, $spotted) . join('^', cldate($t), ztime($t), @_
, $spotter_cc, $spotted_cc
);
+ return sprintf("CC11^%0.1f^%s^", $freq, $spotted) . join('^', cldate($t), ztime($t), @_
[0..3], $text, @_[5..10], $spotted_cc, $spotter_cc, $loc_spotted, $loc_spotter
);
}
1;
}
1;