Sunday, August 6, 2017

Importing N1MM ADIF export files into XLog


I like the N1MM Contest Logger program for Amateur Radio contesting.

N1MM is quite amazing for free software and is very well maintained. It is aimed just at contesting and covers most of the major contests worldwide. It is easy to install and – though there is a steep learning curve – once set up, solid.

It supports exports to Cabrillo (.log) for contest log submissions and to the ADIF (.adi) format for import into other logging programs.

I prefer to use Linux on my computers. My 'Amateur Radio computer' is a dual-boot machine just so that I have access to the N1MM Contest Logger and an antenna modeling program – both available only on Windows. To the best of my knowledge there is no Linux equal for N1MM.

My everyday logging program is XLog – a Linux program. After each contest, I move the results into XLog. Unfortunately a direct import of the N1MM .adi file into XLog leaves a lot to be desired for me.

N1MM exports only the start time – to 6 places (hhmmss). I like both the QSO start and end times to be entered and 4 places (hhmm) is more common. I note that QSO start and end times in a contest are almost always identical.

N1MM exports the frequency to the nearest 0.1KHz. XLog's default is to the nearest Khz.

N1MM exports both a sent and a received signal report. In the weekly CWT contests I enjoy, neither report is exchanged but N1MM defaults to reports of 599 for both. I prefer that those false reports not be entered into XLog.

N1MM does export the contest exchange, but I like to include the name of the contest following the exchange in XLog.  XLog has a different name for this field.

Here is an example of one record from the N1MM exported .adi file. Note that this is all one line:

<CALL:4>K5OT <QSO_DATE:8>20170802 <TIME_ON:6>190518 <BAND:3>15M <STATION_CALLSIGN:6>WB5BKL <FREQ:8>21.03258 <CONTEST_ID:6>CW-Ops <FREQ_RX:8>21.03258 <MODE:2>CW <NAME:5>LARRY <RST_RCVD:3>599 <RST_SENT:3>599 <TX_PWR:1>5 <OPERATOR:6>WB5BKL <CQZ:1>4 <STX:1>2 <APP_N1MM_EXCHANGE1:3>127 <APP_N1MM_POINTS:1>1 <APP_N1MM_RADIO_NR:1>1 <APP_N1MM_CONTINENT:2>NA <APP_N1MM_RUN1RUN2:1>1 <APP_N1MM_RADIOINTERFACED:1>1 <APP_N1MM_ISORIGINAL:4>True <APP_N1MM_NETBIOSNAME:11>OPTIPLEX755 <APP_N1MM_ISRUNQSO:1>0 <EOR>

And here is what I would like the same line to look like for import into XLog:

<CALL:4>K5OT <QSO_DATE:8>20170802 <TIME_ON:4>190518 <TIME_OFF:4>190518 <BAND:3>15M <STATION_CALLSIGN:6>WB5BKL <FREQ:6>21.03258 <CONTEST_ID:6>CW-Ops <FREQ_RX:8>21.03258 <MODE:2>CW <NAME:5>LARRY <TX_PWR:1>5 <OPERATOR:6>WB5BKL <CQZ:1>4 <STX:1>2 <COMMENT:15>127 CWT-1900 <APP_N1MM_POINTS:1>1 <APP_N1MM_RADIO_NR:1>1 <APP_N1MM_CONTINENT:2>NA <APP_N1MM_RUN1RUN2:1>1 <APP_N1MM_RADIOINTERFACED:1>1 <APP_N1MM_ISORIGINAL:4>True <APP_N1MM_NETBIOSNAME:11>OPTIPLEX755 <APP_N1MM_ISRUNQSO:1>0 <EOR>

I have highlighted the areas that have been modified.

I did this with a little Bash script and the sed (Streaming EDitor) command. Below is the operational part of the sed command for one of the little contests I enjoy, the CWT at 1900Z each Wednesday:

# CWT1900.sed
#
#
s/\(<TIME_ON:6>\)\([0-9]*\)/<TIME_ON:4>\2 <TIME_OFF:4>\2/
#
s/<FREQ:8>/<FREQ:6>/
#
s/<FREQ:7>/<FREQ:5>/
#
s/ <RST_RCVD:3>599 <RST_SENT:3>599 / /
#
s/\(<APP_N1MM_EXCHANGE1\)\(:[0-9]*\)>\([A-Z0-9]*\)/<COMMENT:15>\3 CWT-1900/
#
#

This sed file makes the four changes I listed above. Now I can run the .adi output files from N1MM through my little bash script and import them into XLog with no editing needed!

If you would like copies of my bash script for the three CWT contests, with the accompanying sed files and some informal notes, email me at my QRZ.com address.


cln - Nick
WB5BKL

No comments:

Post a Comment