$to = 10 if !$to;
-push @out, "Date Hour SFI A K Forecast Logger";
+push @out, "Date Hour SFI K A Forecast Logger";
my @in = Geomag::search($from, $to, $main::systime);
for (@in) {
push @out, Geomag::print_item($_);
return;
}
- my $spot = Spot::add($freq, $field[2], $d, $text, $spotter, $field[7]);
+ my @spot = Spot::add($freq, $field[2], $d, $text, $spotter, $field[7]);
+
+ #
+ # @spot at this point contains:-
+ # freq, spotted call, time, text, spotter, spotted cc, spotters cc,
+ # orig node, spotted itu, spotted cq, spotters itu, spotters cq
+ # you should be able to route on any of these
+ #
# local processing
my $r;
return if $r;
# send orf to the users
- if ($spot && $pcno == 11) {
+ if (@spot && $pcno == 11) {
my $buf = Spot::formatb($field[1], $field[2], $d, $text, $spotter);
- broadcast_users("$buf\a\a", 'dx', $spot);
+ broadcast_users("$buf\a\a", 'dx', $spot[0]);
}
# DON'T be silly and send on PC26s!
# add the 'dxcc' country on the end for both spotted and spotter, then the cluster call
my @dxcc = Prefix::extract($out[1]);
- push @out, (@dxcc > 0 ) ? $dxcc[1]->dxcc() : 0;
+ my $spotted_dxcc = (@dxcc > 0 ) ? $dxcc[1]->dxcc() : 0;
+ my $spotted_itu = (@dxcc > 0 ) ? $dxcc[1]->itu() : 0;
+ my $spotted_cq = (@dxcc > 0 ) ? $dxcc[1]->cq() : 0;
+ push @out, $spotted_dxcc;
@dxcc = Prefix::extract($out[4]);
- push @out, (@dxcc > 0 ) ? $dxcc[1]->dxcc() : 0;
+ my $spotter_dxcc = (@dxcc > 0 ) ? $dxcc[1]->dxcc() : 0;
+ my $spotter_itu = (@dxcc > 0 ) ? $dxcc[1]->itu() : 0;
+ my $spotter_cq = (@dxcc > 0 ) ? $dxcc[1]->cq() : 0;
+ push @out, $spotter_dxcc;
push @out, $spot[5];
my $buf = join("\^", @out);
# automagically closes the output file (if any)).
$fp->writeunix($out[2], $buf);
- return $buf;
+ return ($buf, $spotted_itu, $spotted_cq, $spotter_itu, $spotter_cq);
}
# search the spot database for records based on the field no and an expression