Adifmerg
Introduction
The adifmerg is a simple command line program written in Perl. It has been tested and used in Linux operating system. This program does not have a graphical user interface (GUI). The purpose of the program is to check ADIF-logs, add new data to the log and make simple corrections to the data. The ADIF files can be hand edited for a few QSOs, but this becomes laborious for larger files. In this case adifmerg can make the job easier.
SOTA logs
For a SOTA activator logging is not as simple as for a fixed station. The log can contain tens or hundreds of different summits each with a different summit reference, locator grid square or county. Some times also the activations are done in different countries. This tutorial shows how to extract the QSO information from the SOTA database and submit the data to LoTW (or eQSL) for each activation. We assume that you are already familiar how to sign and upload your home station log to the LoTW.
First logon to the SOTA database. Select from the menu 'View Results' -> 'My Activator Log'. Push the 'Save to File' button on the bottom of the page. After the csv file has been saved you can logoff from the database and close the web browser.
Now you can list all the QSOs in the log. For example
adifmerg -f MY0CALL_log_20110129.csv -l
If the activation was done on December 19 2010 for example, you can extract these QSOs from the log
adifmerg -f MY0CALL_log_20110129.csv -S QSO_DATE=20101219 -o | adifmerg -f - \ -R MY_SOTA=SOTA -o > qsoXY987.adif
Here XY987 is the summit reference. If the csv file has notes like '559/599' these are filled into the RST_SENT and RST_RCVD ADIF fields. The created ADIF-file will have also user defined fields SOTA and MY_SOTA. Since the log is an activator log and not a chaser log, the data in SOTA field is remapped to MY_SOTA. You can list the QSOs in the ADIF-file
adifmerg -f qsoXY987.adif -l -v
If the notes in the csv file had also SOTA references, that is you made SOTA to SOTA QSOs, the contacted stations reference was probably written to MY_SOTA field. You need to edit the file to put it back to SOTA field. The TQSL program to sign the log file for LoTW does not understand these user defined fields, so we need to remove them
adifmerg -f qsoXY987.adif -u -o | adifmerg -f - -u -o > qsoXY987.adi
Now the file can be signed with the TQSL program. In the TQSL you need to define new QTH for each summit with country, locator, ITU zone, CQ zone and possibly IOTA reference if the activation was done from an island. After the file has been signed it can be submitted to LoTW . Submitting the log to eQSL is easier since there is no electronic signature needed. In eQSL it is however necessary define new /P call sign for each activation day with the correct locator information. That is the call sign and locator are only valid for the period of the summit activation.
More information can be added to the ADIF-file of the SOTA log. This is useful if the file is used for producing QSL-cards. First from the csv file an ADIF-file is made
adifmerg -f MY0CALL_log_20110129.csv -R MYSOTA=SOTA -o > MY0CALL_log_20110129.adif
From this file a text file is made for easier editing
adifmerg -f MY0CALL_log_20110129.adif -l -v > MY0CALL_log_20110129.txt
The text file has now all the QSOs and my station information line before the list of QSOs. This line starts with my call sign that was used during the activation. On this line the grid square locator can be added with country, county, CQ zone, ITU zone, rig used and output power. For example after editing the line could be
OH7BF/P OH/KU-024 EU-15 I18 KP33xg FT817ND 5W coFinland cyOHCA-721_Nilsia 20090711 0725 20M CW XY7CW 579 559 ---- -- -- 20090711 0735 20M CW ZB0SSB 59 55 ---- -- --
The text file can be converted back to ADIF and merged with the original file
adifmerg -f MY0CALL_log_20110129.txt -o | adifmerg -f - -m MY0CALL_log_20110129.adif -o > MY0CALL_log_20110129.adi
Now simple text QSL labels can be produced from the ADIF-file
adifmerg -f MY0CALL_log_20110129.adi -A QSL_SENT=N -o | adifmerg -f - -Q a > MY0CALL_log_20110129.qsl
A PDF-file with QSL cards with all the data filled in can also be produced from the ADIF-file. See the adifmerg manual page for this.