3 # convert an AK1A DX.DAT file to comma delimited form
7 # This routine is really designed for archive data. It will create and add to
8 # standard DXSpider spot files. If those spot files already exist (because you
9 # were running DXSpider at the same time as collecting this 'old' data) then
10 # this will simply append the data onto the end of the appropriate spot file
11 # for that day. This may then give strange 'out of order' results when viewed
12 # with the show/dx command
16 # Copyright (c) 1998-2003 Dirk Koopman G1TLH
19 # search local then perl directories
21 # root of directory tree for this system
23 $root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'};
25 unshift @INC, "$root/perl"; # this IS the right way round!
26 unshift @INC, "$root/local";
33 $ifn = "$root/data/DX.DAT";
34 $ifn = shift if @ARGV;
35 print "Using: $ifn as input... \n";
37 sysopen(IN, $ifn, 0) or die "can't open $ifn ($!)";
42 while (sysread(IN, $buf, 86)) {
43 ($freq,$call,$date,$time,$comment,$spotter) = unpack 'A10A13A12A6A31A14', $buf;
44 # printf "%-13s %10.1f %s %s by %s %s\n", $call, $freq, $date, $time, $spotter, $comment;
46 $dt = cltounix($date, $time);
47 $comment =~ s/^\s+//o;
49 my @spot = Spot::prepare($freq, $call, $dt, $comment, $spotter);
52 print "ERROR: $call $freq $date $time by $spotter $comment\n";