5 use Math::Round qw(:all);
9 $morse = new Text::Morse;
13 ($gts,$sk,$f,$c,$md,$str,$zt)=m|^(\d+)\^.*DX de ([-\w\d/]+)-\#:\s+([\.\d]+)\s+([-\w\d/]+)\s+(\w{1,3})\s+(-?\d+).*(\d{4})Z|;
14 next unless $sk && $c;
15 $e = sprintf "%010d", nearest(5, $f*10);
16 $m = ''; #$morse->Encode($c);
17 $t10 = nearest(60, $gts);
20 $r = $spot{$key} ||= {};
22 my ($sec,$min,$hour) = gmtime $gts;
23 $s->{$sk} = sprintf "%-.3s %4d %.1f %02d:%02d:%02d", $md, $str, $f, $hour, $min, $sec;
29 $json = JSON->new->canonical(1)->indent(1);
30 print $json->encode(\%spot), "\n";
31 print $json->encode(\%skim), "\n";
32 print $json->encode(\%call), "\n";
38 print "spots: $spotk skimmers: $skimk spotted calls: $callk\n";