Fabian Kurz wrote:
As I see, you are using Perl for the script; I wrote a parser and
algorithms in Perl to figure out the DXCC, Zone, Continent etc. from
any callsign (including calls like KL7/DJ1YFK/P) as a part of my
logbook program YFKlog. It's open source under the GPL, so you can use
the code if you like (subs 'dxcc' and 'wpx' in yfksubs.pl):
http://fkurz.net/ham/yfklog/yfklog-0.1.0.tar.gz
or http://fkurz.net/ham/yfklog.html for a general description of the
software, if anyone is interested.
Thanks for posting that!
I've done a similar project. (
http://www.w9wi.com, scroll about halfway
down for the link) Mine uses Apache as a user interface instead of
curses. Guess I was lazygrin. Otherwise it's similar, written in
Perl and logging to a MySQL DB.
I have my own routine to determine the DXCC entity of a callsign - seems
to work pretty well but has missed a few. Basically, I have two
additional tables and a routine that parses the CTY.DAT file to fill
those tables. One table references a "country_id" (the "main prefix"
for a country, for example "DL" for Germany or "G" for England) to a
list of valid prefixes from the CTY.DAT file. The other contains
information about each country - zone, name, etc...
I'll be taking a close look at your routine, might well work a lot better!
--
Doug Smith W9WI
Pleasant View (Nashville), TN EM66
http://www.w9wi.com