my $hops = get_hops(11);
my $t = time;
$text = ' ' if !$text;
- return sprintf "PC11^%.1f^$dxcall^%s^%s^$text^$mycall^$hops^~", $freq, cldate($t), ztime($t);
+ return sprintf "PC11^%.1f^$dxcall^%s^%s^$text^$mycall^$main::mycall^$hops^~", $freq, cldate($t), ztime($t);
}
# create an announce message
return "PC24^$call^$flag^$hops^";
}
+
+# create a merged dx message (freq, dxcall, t, text, spotter, orig-node)
+sub pc26
+{
+ my ($freq, $dxcall, $t, $text, $spotter, $orignode) = @_;
+ $text = ' ' unless $text;
+ $orignode = $main::mycall unless $orignode;
+ return sprintf "PC26^%.1f^$dxcall^%s^%s^$text^$spotter^$orignode^ ^~", $freq, cldate($t), ztime($t);
+}
+
+# create a merged WWV spot (logger, t, sfi, a, k, forecast, orig-node)
+sub pc27
+{
+ my ($logger, $t, $sfi, $a, $k, $forecast, $orignode) = @_;
+ return sprintf "PC27^%s^%-2.2s^$sfi^$a^$k^$forecast^$logger^$orignode^ ^~", cldate($t), ztime($t);
+}
+
# message start (fromnode, tonode, to, from, t, private, subject, origin)
sub pc28
{
sub pc29
{
my ($fromnode, $tonode, $stream, $text) = @_;
- $text =~ s/\^//og; # remove ^
+ $text =~ s/\^/:/og; # remove ^
+# $text =~ s/\~/S/og;
return "PC29^$fromnode^$tonode^$stream^$text^~";
}
# send all the DX clusters I reckon are connected
sub pc38
{
- my @list = DXNode->get_all();
- my $list;
- my @nodes;
-
- foreach $list (@list) {
- push @nodes, $list->call;
- }
+ my @nodes = map { ($_->dxchan && $_->dxchan->isolate) ? () : $_->call } DXNode->get_all();
return "PC38^" . join(',', @nodes) . "^~";
}