Difference between revisions of "Database Files"
Line 3: | Line 3: | ||
==Exchange Guessing== | ==Exchange Guessing== | ||
Other than the Super Check Partial and N+1 functions in Win-Test, exchange guessing helps the operator to "know what to expect" in the course of a contest QSO. Many contests come with a fixed exchange, be it a county or regional identifier, a QTH locator or a callsign specific identifier. This type of information can be "guessed" by the software so that the operator only has to confirm or correct this information. | Other than the Super Check Partial and N+1 functions in Win-Test, exchange guessing helps the operator to "know what to expect" in the course of a contest QSO. Many contests come with a fixed exchange, be it a county or regional identifier, a QTH locator or a callsign specific identifier. This type of information can be "guessed" by the software so that the operator only has to confirm or correct this information. | ||
+ | |||
+ | Please note that this feature is different from the Super Check Partial database and also different from the [[Menu:Windows#Extra_Information|Extra data files]] (XDT). | ||
==Installing a Database file== | ==Installing a Database file== |
Revision as of 20:41, 1 January 2007
Database Files
Exchange Guessing
Other than the Super Check Partial and N+1 functions in Win-Test, exchange guessing helps the operator to "know what to expect" in the course of a contest QSO. Many contests come with a fixed exchange, be it a county or regional identifier, a QTH locator or a callsign specific identifier. This type of information can be "guessed" by the software so that the operator only has to confirm or correct this information.
Please note that this feature is different from the Super Check Partial database and also different from the Extra data files (XDT).
Installing a Database file
Downloading
Win-Test database files come in a binary format (.DTB). The Win-Test Team provides several of these file at http://download.win-test.com/databases. Look for the .DTB and .ZIP files (some of the files are collected in a ZIP archive). Here is a - possibly incomplete - list of the database files available and for which contests they are being used.
AGCW_HNY.DTB AGCW Happy New Year contest ARI.DTB ARI 40/80 contest ARIDX.DTB ARI DX Contest (DX side) ARI_SEZIONI.DTB ARI Sezioni Contest ARRL_160_DX.DTB ARRL 160 m (DX side) ARRL_160_USVE.DTB ARRL 160 m (US/VE side) ARRL-ALL.DTB ARRL 10 m and CQWW 160 m contests ARRL-DX.DTB ARRL DX contest (DX side) ARRL-USVE.DTB ARRL DX contest (US and VE side) CQWW.DTB CQWW DX, GACW and JIDX contests EU_HF.DTB EU HF contest FOC_MARATHON.DTB FOC Marathon HADX.DTB HADX contest HELVETIA_DX.DTB Helvetia contest (DX side) HELVETIA_HB.DTB Helvetia contest (HB side) IOTA.DTB IOTA contest (Islands activities) ITU.DTB IARU HF contest KCJ.DTB KCJ (Keyman's Club of Japan) contest KOS.DTB King Of Spain contest (from 2005) PACC_DX.DTB PACC contest (DX side) PACC_PA.DTB PACC contest (PA side) REFHF.DTB REF HF contest RSGB.DTB RSGB 160 m and RSGB 21/28 (DX side) contests RSGB_CMW.DTB RSGB Commonwealth contest (BERU) SPDX.DTB SP DX contest (DX side) STEW-PERRY.DTB Stew Perry contest UBADX.DTB UBA DX contest UBA_SPRING_DX.DTB UBA Spring contests (DX side) UBA_SPRING_ON.DTB UBA Spring contests (ON side) UFT_HF.DTB UFT HF contest WAG_DL.DTB WAG Contest (DL side) and DARC Xmas Contest WAG_DX.DTB WAG Contest (DX side)
For more details, please see the README file in that directory.
Installing
The corresponding DTB files need to be copied to the Win-Test installation directory. Zip files have to be unpacked before they can be used - Win-Test only uses these .DTB files mentioned above. Win-Test will load automatically the corresponding database file (according to the contest selected), if the files are available.
Setting up Win-Test to use these files
Now, how do we activate exchange guessing? To do this, select Tools | Data entry from the Top Menu and then select the Exchange guessing menu.
Three options are available:
- Pressing the spacebar - this will fill in the exchange upon entering a callsign and hitting spacebar to move the entry cursor to the report field. This is the default setting.
- Automatically - this will fill in the exchange as soon as you have entered the last character of the callsign and Win-Test has found an entry for it in the database file. As this is more resource intense operation than the 'Pressing the spacebar' option, it is not recommended for slow computers.
- After timeout - this will fill in the exchange after a certain amount of time has elapsed without changes to the callsign.
By the way, you can also check for the database file loaded by using the Listing used files... option in the context menu.
Now, when you enter a callsign in the log entry area, the pre-guessed report will automatically come up. Also, the Check Partial window can show the information when enabled in it's context menu.
Also the Band Map will show this information and even highlight the stations accordingly.
Brewing your own
Beware: This section is for the brave and experienced programmer and power user!
Win-Test's .DTB files come in a binary format and - by default - are not editable with a simple tool like a text editor or a word processor. Having some programming expertise, you can still sucessfully create/replace an existing .DTB file with your own version. Remember, however, that you can not make Win-Test load a database that it doesn't know about.
The file strutcture of the database files is straightforward and simple: As an example, take a look at the first bytes of the WAG_DL.DTB file used for looking up DOKs:
00000000 44 41 30 41 41 00 00 00 00 00 00 00 00 00 52 31 DA0AA.........R1 00000010 37 00 00 00 00 00 00 00 00 00 44 41 30 42 41 59 7.........DA0BAY 00000020 00 00 00 00 00 00 00 00 42 30 36 00 00 00 00 00 ........B06..... 00000030 00 00 00 00 44 41 30 43 42 00 00 00 00 00 00 00 ....DA0CB....... 00000040 00 00 59 32 34 00 00 00 00 00 00 00 00 00 44 41 ..Y24.........DA 00000050 30 43 57 00 00 00 00 00 00 00 00 00 55 32 33 00 0CW.........U23. 00000060 00 00 00 00 00 00 00 00 44 41 30 44 49 47 00 00 ........DA0DIG.. [...]
From that hex dump we can see that the file consists of records of equal length of 26 bytes. The callsign is stored as a null-padded string in the first 14 bytes, the corresponding information (the DOK) is contained in the following 12 bytes, also null-padded.
As another example, let's take a look at the file VHF.DTB, which contains stations active on the VHF/UHF bands and their corresponding QTH locators:
00000000 34 4E 31 42 00 00 00 00 00 00 00 00 00 00 4B 4E 4N1B..........KN 00000010 30 35 43 52 00 30 31 39 35 00 39 41 31 42 00 00 05CR.0195.9A1B.. 00000020 00 00 00 00 00 00 00 00 4A 4E 38 35 4A 58 00 30 ........JN85JX.0 00000030 31 39 35 00 39 41 31 42 20 00 00 00 00 00 00 00 195.9A1B ....... 00000040 00 00 4A 4E 38 35 4F 56 00 30 31 39 35 00 39 41 ..JN85OV.0195.9A 00000050 31 43 43 55 00 00 00 00 00 00 00 00 4A 4E 38 35 1CCU........JN85 00000060 4C 49 00 30 31 39 35 00 39 41 31 43 45 51 00 00 LI.0195.9A1CEQ..
Here you can basically see the same file structure with the exception that the information field is actually split in two fields, one containing the information to display, and another one which contains information about the content itself - namely when this very piece of information was verified last - here "0195" meaning "January 1995".
Using a progframming environment like Perl, you can create a simple application that will do the job for you. Here is a sample. Please feel free to copy and adapt to your needs.
The program processes a number of .db plaintext files (line 3). To work around duplicate information (e.g. one station is listed with several different locators), a space character is appended to the callsign (line 11). True duplicates are simply eliminated (line 7). Once the data collection process is finished, a new .dtb file is created (line 21) and - using Perl's pack() function, the records are created (line 23) and written to the file (line 24). The date information is left at 0195 for simplicity. This could certainly be elaborated to some detail.
The final product has to be renamed to VHF.DTB before Win-Test will start using it.
1 #!/usr/bin/perl 2 3 foreach $f (<*.db>) { 4 open(IN,$f); 5 while(<IN>) { 6 ($c,$q) = split; 7 goto DONE if (length($c) < 1); 8 if (defined($m{$c})) { 9 goto DONE if ($m{$c} eq $q); 10 while (defined($m{$c})) { 11 $c .= ' '; 12 goto DONE if ($m{$c} eq $q); 13 } 14 } 15 $m{$c} = $q; 16 DONE: 17 } 18 close(IN); 19 } 20 21 open(OUT,"> vhf_new.dtb"); 22 foreach (sort keys %m) { 23 $r = pack("a14a6xa4x",$_,$m{$_},"0195"); 24 print OUT $r; 25 } 26 close(OUT);
After all, if you can contribute updated .DTB files of reasonably good quality, the Win-Test team will be happy to incorporate them into their distribution which is available for free on the internet.