CBR2ADIF

CBRFRFIX / ADIFRFIX

DOWNLOADS


CBR2ADIF:

This is a command-line or DOS program to convert a Cabrillo file to ADIF. The fundamental purpose is to take the output of a contest logging program (such as TRLog or CT) and prepare it for importing into a general-purpose logging program, a QSL label program, or other software that supports ADIF imports.

When started, the program prompts the user for the file names of the input Cabrillo file and the output ADIF file. These file names may include path information, but the directory (folder) names, as well as the file name itself, must conform to the DOS 8+3 file name standard. Folders and files with longer names can be opened, provided the correct shortened name is used (e.g. "My Documents" becomes "MYDOCU~1"). If the input and output files are opened successfully, the program prompts the user for additional default information as described below, and searches the input file for a supported contest name. At the time this is written, the list of supported contests includes all of those listed in the official Cabrillo specification, several others for which Cabrillo file specifications can be found elsewhere on the Internet, as well as all those supported by the WT4I Cabrillo Converter.

In addition to converting each of the fields in the Cabrillo file (i.e. band, mode, date, time, callsign, and where applicable, fields within the exchange) to their ADIF equivalents, this program also adds fields for transmit power, sent RS(T) and received RS(T), using default values input by the user (unless those fields are already in the exchange data). No error-checking is performed on these typed-in default values.

The Cabrillo mode field supports four values: CW, FM, PH or RY. The first two (CW and FM) are transferred to the ADIF file unchanged. For the other two, the user is prompted for the desired mode to put into the ADIF file. This may be either a mode supported in the ADIF specification (e.g. PH -> SSB or AM, RY -> RTTY or TOR) or it may be a mode which is not officially supported (e.g. RY -> PSK31 or MFSK16); no error-checking is performed on this input. Only one such mode translation for each of PH and RY can be performed on a single file. If more than one phone or digital mode was used during a contest, the ADIF file will have to be edited by hand to correct modes which were not translated correctly.

In order to allow for "Cabrillo" files which do not follow the Cabrillo format exactly, the user is permitted to input the starting column for the received call sign. If nothing is input for this parameter, the program will assume 62 (for NAQP and Sprint contests), 61 (for RSGB IOTA and other RSGB contests), 54 (for RSGB "short exchange" contests), 55 (for JARTS) and 56 (for all other contests).

CBR2ADIF also attempts to maximize the translation of location-related information. For example, if the contest exchange includes state/province information, the program checks that element of the exchange; if it is one of the 50 valid state abbreviations, it will place the information into an ADIF <state> field and add the appropriate CQ zone information (e.g. if state is MA, CQ zone is 5) and DXCC code (USA = 291, Hawaii = 110, Alaska = 6). If the exchange includes a valid province abbreviation (AB, BC, MB, NB, NL, NS, NT, NU, ON, PE, QC, SK or YT) it will be placed in an ADIF <ve_prov> field, a <dxcc:1>1 field will be added, and where the CQ Zone can be determined unambiguously (NL, NT, NU and QC are all ambiguous), a <cqz> field will be calculated and added. A value of PQ will be interpreted as QC, NF as NL, and a value of LB will be interpreted as NL with a known CQ zone of 2. The program will also convert exchanges containing VE call sign areas into province codes (e.g. VE3 becomes ON). Other values (for example, XE for a Mexican station in the North American QSO Party) will be ignored.

When the contest exchange includes the ARRL section, the ADIF file may contain as many as four corresponding fields (ARRL section, state or province, CQ zone, and DXCC code); again, where the section cannot be translated unambiguously, the ambiguous field is skipped (e.g. MAR is not resolved to a province, although the CQ zone is known and is output).

In some contests, the exchange may vary depending on, for example, the location of the station. In the ARRL 10 meter contest, W/VE stations send a two-letter state/province identifier, and DX stations send a serial number. CBR2ADIF uses the presence or absence of one or more alphabetic characters in the field as the indicator to determine whether to translate the field as a state/province or as a serial number <srx>.

In version 1.30, support was added for the malformed .cbr files produced by TRLog for contests which are not listed in the official Cabrillo specification. CBR2ADIF will now produce ADIF files from these .cbr files.

CBRFRFIX:

The Cabrillo specification allows for the recording of frequency information for HF QSOs. For example, the first data element in a Cabrillo file for a QSO on 14.195 kHz may be either 14000 or 14195. Cabrillo files generated by contest loggers normally contain only the band information (e.g. 14000). However, you may wish to put more precise frequency information into the corresponding ADIF file. TRLog enables the recording of frequency information in its log file, using the "LOG FREQUENCY ENABLE = TRUE" option with a radio interfaced to the computer, but it does not store this information in the Cabrillo file. I wrote CBRFRFIX to read the frequency information from a TRLog log file and transfer that information into the corresponding Cabrillo file (HF bands only; the Cabrillo format does not support frequency information more precise than a band indicator on VHF and up). The output Cabrillo file can then be input into CBR2ADIF, and the resulting ADIF file will contain frequencies correct to the 1 kHz digit.

CBRFRFIX depends on the specific format of the TRLog contest log. For example, it recognizes QSOs in the log by looking for a valid mode (CW, SSB, FM or DIG) in the first field, and then reads the frequency information at the location and in the format produced by TRLog. Other contest loggers may have similar capabilities using different formats. If there is sufficient interest and I can get the necessary information about file formats, I would be willing to generalize CBRFRFIX to support other contest logging programs.

ADIFRFIX:

Before writing CBR2ADIF, I used either LogConv or TRADIF to convert my contest logs into ADIF. Neither of these programs put frequency information into the ADIF file. I wrote ADIFRFIX to read from an ADIF file and the corresponding TRLog contest log and add frequency information from the log into the ADIF file. At the same time, it also adds transmitter power and, at the user's option, sent and/or received RS(T), to the output ADIF file. This program depends on the log format produced by TRLog in exactly the same way as CBRFRFIX, and could be generalized to support other contest logging programs under the same circumstances.


All of these programs were written in ANSI C, and compiled using the Borland C 2.0 compiler. While they have not been tested in every possible operating system, there is no reason to suspect that they would not work equally well in any system capable of emulating MS-DOS (including the command-line interface of all varieties of Microsoft Windows).

To download one or more of these programs, click here.


Top of page

Back to VE3IAY home page

Page last updated 1 July 2004