[Dxspider-support] Country prefixes

Dirk Koopman djk at tobit.co.uk
Thu Feb 13 00:03:14 GMT 2014


I am rather hazy as to what it is that you are trying to achieve. 
Perhaps if you could lay it out in more detail, I can help you.

But in summary, this is what happens for DXSpider:

* I read through the wpxloc.raw file and create a prefix centric memory 
database.

* I then take the information in cty.dat file and either add information 
to the database or create prefix exceptions (which, in turn, may create 
more records.

* I file that information for use in DXSpider in 
/spider/data/prefix_data.pl which is read on startup and creates the 
memory database.

* I check whether the complete callsign is in the database. If so, I 
have a result.

* Then I mess around with the proffered callsign and, if necessary, 
strip off and store things like G1TLH/ZL or ZL/G1TLH (example picked 
completely at random :-).

* With some heuristics (1) I create a priority list of parts of the 
callsign, This may be a list of just one part (a normal callsign).

* Starting at the head of the priority list, I take that part (2) and 
try to find the whole thing in the database. To save further typing and 
repetition if, at any point, I find a match - that is the result and no 
further processing occurs.

* If no match occurs, I chop off one character from the right hand end 
and retry a match. I do this until no more characters exist and no 
prefix is found.

* If there was more than one part then I take the next part in the 
priority list and go through the whole rigmarole again.

There is a lot of caching of full and partial results that go on here.

(1) See /spider/perl/Prefix.pm sub extract
(2) See /spider/perl/Prefix.pm sub matchprefix

Now having obtained a match, then the rest of the information that is 
available (that is derived from the wpxloc.raw file) is then returned. 
One of the fields is the country code (a number).

Dirk

On 12/02/14 22:52, Michael Carper wrote:
> Yep, I'm aware that it's more complex than matching prefixes (which is
> why I'm asking).  We sure know that "K5K" can be anything from Kingman
> Reef to a Boy Scout Special Event station in Little Rock, Arkansas.
>
> I was just hoping to see the file that we use in cluster... so that we
> can match to what comes in the country field, rather than trying to
> re-do the work that's already been done to match.
>
>
> On Wed, Feb 12, 2014 at 4:43 PM, Dirk Koopman <djk at tobit.co.uk
> <mailto:djk at tobit.co.uk>> wrote:
>
>     On 12/02/14 20:20, Michael G. Carper wrote:
>
>         These are the same ones that are used in the cluster then?
>
>         So when the Country field says "Anguilla-VP2E"... that's coming
>         from the
>         AD1C list?
>
>
>     That, specifically, is coming from the wpxloc.raw file. This is a
>     sort of "master list" that originated in the AK1A cluster software.
>
>     Dirk
>
>




More information about the Dxspider-support mailing list