Radarspotting

Mode-S Software => Basestation => Topic started by: Roadrunner on May 16, 2017, 07:35:35 AM

Title: Countries.dat file for Basestation
Post by: Roadrunner on May 16, 2017, 07:35:35 AM

Hi everyone, I cant find any recent updates to the countries.dat file and I notice that I am getting lots of new "China" allocations not showing a country flag.


Regards Mike

Title: Re: Countries.dat file for Basestation
Post by: Anmer on May 16, 2017, 08:01:54 AM
Bones and SabreJV used to "maintain" the countries.dat file but I haven't seen a new version for some time.

If one knows the ICAO hex code range that's been allocated, it's not too difficult to update the file.  But it needs a carefully planned conversion and I'd have to dig deep to find the "code".
Title: Re: Countries.dat file for Basestation
Post by: Roadrunner on May 16, 2017, 08:19:50 AM
That was one of the areas that the Radarbox was easier - used the actual codes not hexadecimal versions as does BaseStation!
Title: Re: Countries.dat file for Basestation
Post by: jakems on May 16, 2017, 09:06:32 AM
Hi

On the whole the countries.dat needs very little maintenance, we don't get that many new countries every year! The changes tend to be where new sub-ranges are allocated by a country to its military or dependant territories. When you say that China is not showing a flag do you mean mainland China? The current countries.dat has 780000 to 7BFFFF for mainland China civil. China was using 780xxx and is now using 781xxx so they should be covered. Where is the flag not showing, Basestation or one of the addons? If you have some specific examples I can take a look for you.

China=011110xxxxxxxxxxxxxxxxxx,6,China.bmp
Title: Re: Countries.dat file for Basestation
Post by: Triple7 on May 16, 2017, 09:50:21 AM
Just for interest, what does to No. at the end indicate?

China=011110xxxxxxxxxxxxxxxxxx,6,China.bmp

Tim
Title: Re: Countries.dat file for Basestation
Post by: jakems on May 16, 2017, 09:55:50 AM
The 6 means that the 6 most significant bits are used. So in this case it shows 1 & 0 in the first 6 positions and then the remaining 18 positions can be any value. I believe the last 18 can be any characters, BS looks at the 6 and say only look at the first 6.
Title: Re: Countries.dat file for Basestation
Post by: Anmer on May 16, 2017, 10:37:15 AM
Thanks Steve (jakems).

I did my digging and found my reference model.  Thanks to Jack Ford and Dave Reid for the original data.

All you need to do when converting a code or range to binary is to make sure that the total number of ones and zeroes corresponds to the number that you have told BaseStation to expect, and if necessary add leading zeroes.

For example, American Airlines B772, N781AN.

The ICAO hex code:

AA944A.

The binary equivalent:

1010 1010 1001 0100 0100 1010

Using the conversion chart shown as an attachment.

A A 9 4 4 A

The BaseStation Countries.dat file for the US civil shows:

United States=1010xxxxxxxxxxxx,4,UnitedStates.bmp

This is telling BaseStation to translate any ICAO hex codes beginning with 1010 (A) as US civil and apply the corresponding UnitedStates.bmp flag in the BMPFlags folder.  As Steve has explained, the "4" is telling BaseStation to match only on the first 4 characters.

For the United Kingdom, the Countries.dat shows:

United Kingdom=010000xxxxxxxxxx,6,UnitedKingdom.bmp

In this case BaseStation is told to apply the UK flag to any of the first 6 codes beginning:

4 (0100)

and any character that starts with two zeros.  So we could have

40 (0000)
41 (0001)
42 (0010)
43 (0011)

As they say, "Simples".  ;)




[Attachment deleted by Admin to save file space]
Title: Re: Countries.dat file for Basestation
Post by: Triple7 on May 16, 2017, 11:27:41 AM
Thanks for those explanations - that makes it clearer. I use the windows scientific calculator to convert between hex and binary (if I really need to!)

Tim
Title: Re: Countries.dat file for Basestation
Post by: jakems on May 16, 2017, 12:38:44 PM
Good explanation Anmer. The only thing to add is that some of the ranges overlap. Take a look at:

United Kingdom=010000xxxxxxxxxxxxxxxxxx,6,United_Kingdom.bmp
United Kingdom Mil=0100001111xxxxxxxxxxxxxx,10,United_Kingdom_Mil.bmp

You see that the first 6 bits are the same, this is the allocation given to the UK, 400000-43FFFF. The CAA have then allocated the block 43C000-43FFFF to the MoD, which has the unique first 10 bits. So if you find that a hex you are trying to decode falls within more than one range it is the range with the largest number at the end you use.

Simples Clear as mud!
Title: Re: Countries.dat file for Basestation
Post by: Anmer on May 16, 2017, 01:09:44 PM
Thanks Steve.  Clearly I'm learning as you explain things  ::)

I made this a Sticky topic.  Too good to lose.  ;)
Title: Re: Countries.dat file for Basestation
Post by: Roadrunner on May 17, 2017, 07:25:22 AM

Hi all, to expand on my request. I use an SBS-3 amd update via the Plane Base updates. My SQB file is in the correct format for their updates. The latest China aircraft to be listed minus a country was new CES B77W B-2020 hex 780D90.


I think the other recent ones have also been CES aircraft but can't be certain as I have been manually entering and I understand ? that they only get looked up on first contact .
The entries I have in my Countries.dat for China ( and there are lots) are as follows.


China=011110xxxxxxxxxxxxxxxxxx,6,China.bmp
China_1=0111100000000001000xxxxx,19,China.bmp
China_2=01111000000010100000000x,23,China.bmp
China Hong Kong_1=0111100000000001xxxxxxxx,16,China_Hong_Kong.bmp
China Hong Kong_2=011110000000001000xxxxxx,18,China_Hong_Kong.bmp
China Hong Kong_3=011110000000101000xxxxxx,18,China_Hong_Kong.bmp
China Hong Kong_4=0111100000001010010xxxxx,18,China_Hong_Kong.bmp
China Hong Kong_B-HRA=011110000000001001000000,24,China_Hong_Kong.bmp
China Hong Kong_B-LHM=011110000000001001000001,24,China_Hong_Kong.bmp
China Hong Kong_B-LSC=011110000000001001000011,24,China_Hong_Kong.bmp
China Hong Kong_B-LSM=011110000000001001000010,24,China_Hong_Kong.bmp
China Macau_1=011110000000001100111xxx,21,China_Macau.bmp
China Macau_2=011110000000001101000xxx,21,China_Macau.bmp
China Macau_B-MAB=011110000000001100110110,24,China_Macau.bmp
China Macau_B-MAC=011110000000001100110111,24,China_Macau.bmp
China Macau_B-MAS=011110000000000100001000,24,China_Macau.bmp
China Macau_B-MAU=011110000000001010111010,24,China_Macau.bmp
China Macau_B-MAV=011110000000001010111100,24,China_Macau.bmp
China Macau_B-MAW=011110000000001011000100,24,China_Macau.bmp
China Macau_B-MAX=011110000000010000011000,24,China_Macau.bmp
China Macau_B-MAY=011110000000010000011001,24,China_Macau.bmp
China Macau_B-MAZ=011110000000010000011010,24,China_Macau.bmp
China Macau_B-MBA=011110000000010000011011,24,China_Macau.bmp
China Macau_B-MBB=011110000000010000011100,24,China_Macau.bmp
China Macau_B-MBD=011110000000000011001011,24,China_Macau.bmp
China Macau_B-MBE=011110000000010000100011,24,China_Macau.bmp
China Macau_B-MBF=011110000000010000100100,24,China_Macau.bmp
China Macau_B-MBG=011110000000010000100101,24,China_Macau.bmp
China Macau_B-MBH=011110000000010000100110,24,China_Macau.bmp
China Macau_B-MBI=011110000000010000100111,24,China_Macau.bmp
China Macau_B-MBJ=011110000000010000110000,24,China_Macau.bmp
China Macau_B-MBK=011110000000010010010100,24,China_Macau.bmp


I have no idea if their is anything wrong with these entries.
Title: Re: Countries.dat file for Basestation
Post by: Anmer on May 17, 2017, 07:54:12 AM
Hi Mike

Is the extract what you have added/edited for China?

Do you know the allocated hex range for China?
Title: Re: Countries.dat file for Basestation
Post by: jakems on May 17, 2017, 08:58:43 AM
Hi

The China entries listed look as if they are the ones from the last countries.dat on Bones web site. I think you will find the hex code for B-2020 is 780D9C. This would only fall within the range of the first entry that covers 780000 to 7BFFFF. If BaseStation is running without any addons then I would expect it to display the correct flag. I use Active Display Pro which does not use the Countries.dat to determine the country. Sorry but I am afraid I have no experience of Plane Base so cannot say what it may be doing.

Just for interest this is the hex ranges for China built from my Countries.dat.

Country   RangeStart   RangeEnd
China   780000   7800CA
China Macau   7800CB   7800CB
China   7800CC   780107
China Macau   780108   780108
China   780109   78011F
China Hong Kong   780120   780243
China   780244   7802B9
China Macau   7802BA   7802BA
China   7802BB   7802BB
China Macau   7802BC   7802BC
China   7802BD   7802C3
China Macau   7802C4   7802C4
China   7802C5   780335
China Macau   780336   780336
China   780337   780337
China Macau   780338   780347
China   780348   780417
China Macau   780418   78041C
China   78041D   780422
China Macau   780423   780427
China   780428   78042F
China Macau   780430   780430
China   780431   780493
China Macau   780494   780494
China   780495   780A01
China Hong Kong   780A02   780A9F
China   780AA0   7BFFFF
Title: Re: Countries.dat file for Basestation
Post by: s92driver on May 17, 2017, 11:09:39 AM
Planebase does show the ModeS for B-2020 as 780D9C, so just a typo by Mike (Roadrunner) in his message.

The hex code converts to binary  011110000000110110011100

A quick run through the Countries.dat file for China produces the following matches for logic:


China=011110xxxxxxxxxxxxxxxxxx,6,China.bmp                                            YES
China_1=0111100000000001000xxxxx,19,China.bmp                               NO
China_2=01111000000010100000000x,23,China.bmp                               NO
China Hong Kong_1=0111100000000001xxxxxxxx,16,China_Hong_Kong.bmp      NO
China Hong Kong_2=011110000000001000xxxxxx,18,China_Hong_Kong.bmp      NO
China Hong Kong_3=011110000000101000xxxxxx,18,China_Hong_Kong.bmp      NO
China Hong Kong_4=0111100000001010010xxxxx,18,China_Hong_Kong.bmp      NO
China Hong Kong_B-HRA=011110000000001001000000,24,China_Hong_Kong.bmp       NO
China Hong Kong_B-LHM=011110000000001001000001,24,China_Hong_Kong.bmp   NO
China Hong Kong_B-LSC=011110000000001001000011,24,China_Hong_Kong.bmp   NO
China Hong Kong_B-LSM=011110000000001001000010,24,China_Hong_Kong.bmp   NO
China Macau_1=011110000000001100111xxx,21,China_Macau.bmp                 NO
China Macau_2=011110000000001101000xxx,21,China_Macau.bmp                 NO
China Macau_B-MAB=011110000000001100110110,24,China_Macau.bmp         NO
China Macau_B-MAC=011110000000001100110111,24,China_Macau.bmp         NO
China Macau_B-MAS=011110000000000100001000,24,China_Macau.bmp         NO
China Macau_B-MAU=011110000000001010111010,24,China_Macau.bmp         NO
China Macau_B-MAV=011110000000001010111100,24,China_Macau.bmp         NO
China Macau_B-MAW=011110000000001011000100,24,China_Macau.bmp         NO
China Macau_B-MAX=011110000000010000011000,24,China_Macau.bmp         NO
China Macau_B-MAY=011110000000010000011001,24,China_Macau.bmp         NO
China Macau_B-MAZ=011110000000010000011010,24,China_Macau.bmp         NO
China Macau_B-MBA=011110000000010000011011,24,China_Macau.bmp         NO
China Macau_B-MBB=011110000000010000011100,24,China_Macau.bmp         NO
China Macau_B-MBD=011110000000000011001011,24,China_Macau.bmp         NO
China Macau_B-MBE=011110000000010000100011,24,China_Macau.bmp         NO
China Macau_B-MBF=011110000000010000100100,24,China_Macau.bmp         NO
China Macau_B-MBG=011110000000010000100101,24,China_Macau.bmp         NO
China Macau_B-MBH=011110000000010000100110,24,China_Macau.bmp         NO
China Macau_B-MBI=011110000000010000100111,24,China_Macau.bmp         NO
China Macau_B-MBJ=011110000000010000110000,24,China_Macau.bmp         NO
China Macau_B-MBK=011110000000010010010100,24,China_Macau.bmp         NO


So I would have thought it should display the China.bmp based on the first line?  I've closely checked the formatting of the entry including the correct number of Xs and it all seems OK.

Perhaps a more comprehensive list of mainland Chinese ModeS codes that don't display, along with a list of those that do will help pin this down?



Steve
Title: Re: Countries.dat file for Basestation
Post by: David Finch on May 27, 2017, 01:35:45 PM
Hi

Recently noted that the Kuwait C17's and C130's were showing a civil flag so I added the following to my Countries.dat file.  Don't know if there is a shorter version for these?

Kuwait Mil_KAF326=011100000110000111110101,24,Kuwait_Mil.bmp
Kuwait Mil_KAF327=011100000110000111110110,24,Kuwait_Mil.bmp
Kuwait Mil_KAF328=011100000110000111110111,24,Kuwait_Mil.bmp
Kuwait Mil_KAF342=011100000110001000010111,24,Kuwait_Mil.bmp
Kuwait Mil_KAF343=011100000110001000010110,24,Kuwait_Mil.bmp

Currently I've never had had a code without a flag (that's the kiss of death if ever I heard one).

Somewhere in the past I think I remember seeing that there is a limit to the number of lines you can have in the Countries.dat file???

All the best
DF

Title: Re: Countries.dat file for Basestation
Post by: jakems on May 27, 2017, 05:18:24 PM
Hi David

I had not heard there was a limit on the number of lines in the contries.dat, but that does not mean there is not a limit. If you want to reduce the number of lines you could try:

Kuwait Mil_KAF326=011100000110000111110101,24,Kuwait_Mil.bmp
Kuwait Mil_KAF327-8=01110000011000011111011x,23,Kuwait_Mil.bmp
Kuwait Mil_KAF342-3=01110000011000100001011x,23,Kuwait_Mil.bmp

I ran a test program on them and they seem to work OK.
Title: Re: Countries.dat file for Basestation
Post by: David Finch on May 27, 2017, 08:02:14 PM
Hi Jakems

Thanks for that, much appreciated.  Always happy to reduce the number of lines!

DF
Title: Re: Countries.dat file for Basestation
Post by: Roadrunner on March 17, 2018, 09:47:34 AM

Hi Guys I am sorry I didn't get back regarding China entries in Countries.dat file. The hex code range for "missing" entries appears to be (lowest blank to highest blank) 780005 - 789204. Must be 50+ like this mostly newish aircraft (especially the new A359s of Cathay Pacific. As an experiement , I have deleted all the Macu and Hong Kong lines from my Countries,dat and just have the one line left (the first one in the list) and will see what that brings,


Regards Mike
Title: Re: Countries.dat file for Basestation
Post by: Truetrack on November 08, 2018, 09:27:51 AM
Countries.Dat and Entries

picking up David's idea of cleaning out lines for specific registrations
e.g. Macao and Aruba ( Kinetics SBS-1 > Basestation Error Discussions)
here then the
Netherlands Antilles_
PJ-TOM
PJ-VIC
PJ-MDI
PJ-WII
they are all reregistered else
so you may delete these lines if you wish.
Title: Re: Countries.dat file for Basestation
Post by: Truetrack on November 09, 2018, 09:59:19 AM
For those of us who prefer individual corrections to see what is affected i.s.o. taking over complete Countries.dat and not knowing what was changed :
For the plenty of Aruba specific Regs  I queried Airframe.org for their fate and all the following were reregistered otherwise
P4-
AIM
AIR
ARL
BTA
IKF
KCA
LOR
MAK
MLC
MMM
MVP
PAM
PRT
SEN
TAS
TID
TIE
TPS
UAS
WAS
WIN
XAS
YAS
end of list
Title: Re: Countries.dat file for Basestation
Post by: David Finch on January 03, 2019, 03:11:54 PM
Hi All
From the information that I have I've updated my P4 listing for Basestation - See attached.

Any additions or corrections welcome.

Hope of some use.
DF


[attachment deleted reduce file load]
Title: Re: Countries.dat file for Basestation
Post by: David Finch on May 30, 2019, 04:59:13 PM
Hi All
From the information that I have I've updated my P4 listing for Basestation 30_05_19 - See attached zip file.

Any additions or corrections welcome.

Hope of some use.

[attachment deleted reduce file load]
Title: Re: Countries.dat file for Basestation
Post by: Donnie Head on June 05, 2019, 10:58:01 PM
Anyone have an up to date countries dat file there willing to post here as a zip or copy and pasty file, and not an office file. Some of us don't have office on our computers. The last one posted on Bones site was done in 2015.

Thanks
Donnie
Title: Re: Countries.dat file for Basestation
Post by: Anmer on June 06, 2019, 08:05:15 AM
Hi Donnie

I've emailed you the one I'm using, modified over time.  There's no "official" current countries.dat file.

It's just a txt file.
Title: Re: Countries.dat file for Basestation
Post by: Donnie Head on June 06, 2019, 03:36:06 PM
Received and downloaded Mike.

Thanks
Donnie 8)
Title: Re: Countries.dat file for Basestation
Post by: David Finch on July 28, 2019, 04:25:01 PM
Hi All
From the information that I have I've updated my P4 listing for Basestation 28_07_19 - See attached zip file.
P4-KCD & KCU removed.
P4-AIR, KBI and KBJ added.

Any additions or corrections welcome.

Hope of some use.
DF

[attachment deleted reduce file load]
Title: Re: Countries.dat file for Basestation
Post by: David Finch on October 01, 2019, 05:38:43 PM
Hi All
From the information that I have I've updated my P4 listing for Basestation 01_10_19 - See attached zip file.
P4-SJM removed.
P4-BDL, CRA, KDF, KGA and KHD added.

Any additions or corrections welcome.

Hope of some use.
DF

[attachment deleted reduce file load]
Title: Re: Countries.dat file for Basestation
Post by: David Finch on January 03, 2020, 01:56:22 PM
Hi All

Happy New Year to ALL

From the information that I have I've updated my P4 listing for Basestation 03_01_2020 - See attached zip file.
P4-KCE, NAS, OAS removed.
P4-BAB, KHE, RMK, and SAM added.

Any additions or corrections welcome.

Hope of some use.
DF

[attachment deleted reduce file load]
Title: Re: Countries.dat file for Basestation
Post by: Jules on January 06, 2020, 02:57:23 PM
Hello All,

I have just resurrected my SBS1er after a few years break (Baby stopped play). I am also looking for a recent countries.dat file if someone could kindly provide one. Its a shame Gatwick Aviation is no more, the SBS Populate software was always a welcome add-on.

Looking forward to seeing what's in the air from my location near Newbury, used to be lots of Mil.

Thanks in advance,
Jules (G4UET)
Title: Re: Countries.dat file for Basestation
Post by: Anmer on January 06, 2020, 03:25:00 PM
Welcome.

Just emailed you a copy of my current Countries.dat file.
Title: Re: Countries.dat file for Basestation
Post by: Jules on January 06, 2020, 04:08:05 PM
Thank-you,

I will monitor my inbox.

Title: Re: Countries.dat file for Basestation
Post by: David Finch on April 10, 2020, 12:53:17 PM
Hi All

From the information that I have I've updated my P4 listing for Basestation 10_04_2020 - See attached zip file.
P4-GIV, SUN removed.
P4-BFV, BSA, FJA, KBL, KGB, LNZ and PLG added.

Any additions or corrections welcome.

Hope of some use.
DF

[attachment deleted reduce file load]
Title: Re: Countries.dat file for Basestation
Post by: Pipo on July 30, 2020, 08:47:03 PM
Can someone help me how i can ad all MIL in to the Countries.dat file?

When i see now a dutch mill plane it only shows the Dutch flag, not the roundle of the RNAF, I want to do this with all the MILL *bmp files that are located in BMPFlags folder.
Title: Re: Countries.dat file for Basestation
Post by: Anmer on July 30, 2020, 09:12:43 PM
Please see this topic:

https://radarspotting.com/forum/index.php/topic,7159.msg33728.html#msg33728

And this message:

https://radarspotting.com/forum/index.php/topic,7159.msg33736.html#msg33736
Title: Re: Countries.dat file for Basestation
Post by: David Finch on July 31, 2020, 09:52:52 AM
Hi Pipo

You need 2 things.  Firstly, a set of flags that have both the civil flag and the military roundel.  I got mine from:  http://woodair.net/SBS/Utilities/Kinetic_Utilities4_Bitmaps.htm  There are a few sets to choose from and you can pick the one you like best.  Alternatively I can send you the ones I have zipped up.

Secondly you will need an updated 'Countries.dat' file.  There is one on the web site above but that's way out of date.  This file is pretty much being continuously updated as information becomes available.  Again if it helps I'll gladly send you the one I'm currently using.

Hope that helps.
DF (29tiffie@gmail.com)
Title: Re: Countries.dat file for Basestation
Post by: David Finch on August 05, 2020, 05:37:59 PM
Hi All

From the information that I have I've updated my P4 listing for Basestation 05_08_2020 - See attached zip file.
P4-AEG, BFF, GEM (Now RRR), KCF, PDE removed.
P4-CCC, HBK, RRR (Ex GEM), IKH and MCO added.

Any additions or corrections welcome.

Hope of some use.
DF

[attachment deleted reduce file load]
Title: Re: Countries.dat file for Basestation
Post by: Triple7 on October 26, 2020, 02:59:04 PM
Hi All,

Looking for some advice on modifying my countries.dat file.

I have recently seen a few Aeroflot aircraft showing the UK flag not the Bermuda one. Using Kelvin's (egnx) excellent spreadsheet confirms the hex codes will show the UK flag.

https://radarspotting.com/forum/index.php/topic,9361.msg40176.html#msg40176

Looking at my PlanePlotter list of hex to flag associations, it shows 424200 to 424AFF are allocated to Bermuda (may or may not be correct). The question is, how do I show a range (from / to) in my Conntiries.dat file? Or is it set up to find a match with a binary starting at one value and then it assumes all the following ones are in the same flag range until a change in binary code is reached?

My current Bermuda entries are as follows:

Bermuda_1=01000000000000001xxxxxxx,17,Bermuda.bmp
Bermuda_2=01000000000000010xxxxxxx,17,Bermuda.bmp
Bermuda_3=010000000000000110xxxxxx,18,Bermuda.bmp
Bermuda_4=0100001001000000xxxxxxxx,16,Bermuda.bmp
Bermuda_5=0100001001000001000xxxxx,19,Bermuda.bmp
Bermuda_6=01000010010000010010xxxx,20,Bermuda.bmp
Bermuda_7=0100001001000001001100xx,22,Bermuda.bmp
Bermuda_8=01000010010000100011xxxx,20,Bermuda.bmp
Bermuda_9=010000100100001001xxxxxx,18,Bermuda.bmp
Bermuda_10=010000100100001010xxxxxx,18,Bermuda.bmp
Bermuda_11=0100001001000101xxxxxxxx,16,Bermuda.bmp
Bermuda_12=0100001001000110000xxxxx,19,Bermuda.bmp
Bermuda_13=010000100100100011011xxx,21,Bermuda.bmp
Bermuda_14=0100001001001000111xxxxx,19,Bermuda.bmp
Bermuda_15=0100001001001001xxxxxxxx,16,Bermuda.bmp
Bermuda_16=01000010010010100000xxxx,20,Bermuda.bmp
Bermuda_17=0100001110111110100xxxxx,19,Bermuda.bmp

Any help / pointers gratefully received.

Thanks,

Tim
Title: Re: Countries.dat file for Basestation
Post by: David Finch on October 26, 2020, 03:45:01 PM
Hi
The x in a line means anything, 0 to F

If you take a look at the first line in blocks of 4

Bermuda_1=0100 0000 0000 0000 1xxx xxxx,17,Bermuda.bmp
                      4       0      0      0    the first hex that starts with 1 is 8 and the x's mean anything.

So that's 400080 to 40008F

Hope that helps.
DF
Title: Re: Countries.dat file for Basestation
Post by: Anmer on October 26, 2020, 03:54:05 PM
Hi Tim

My understanding is Countries.dat doesn't work on a range of codes, rather "batches" beginning "with" a defined number of characters:

https://radarspotting.com/forum/index.php/topic,7159.msg33736.html#msg33736

If PlanePlotter assigns hex 424200 to 424AFF to Bermuda, one could add this to the Countries.dat file:

Bermuda_18=010000100100xxxxxxxxxxxx,12,Bermuda.bmp

BUT, this assumes there are no other hex codes beginning 424 allocated to another country.

Looking at my BaseStation Reporter, there appear to be Isle of Man registrations beginning 424 as well as some for the Cayman Islands.

From what I can find, the UK was allocated a range of hex codes by ICAO and has sub-allocated some of them.  But I can't find a definitive list!

Maybe trial and error?

Title: Re: Countries.dat file for Basestation
Post by: Triple7 on October 26, 2020, 04:05:14 PM
Thanks for those replies. I need to try and get my head around the format. I'll try and complie a list based on DF's post.

Mike, I think there might need to be a zero at the front of your binary code?

Tim
Title: Re: Countries.dat file for Basestation
Post by: David Finch on October 26, 2020, 04:07:25 PM
Hi Tim

I should have added that given the info re the blocks of 4, you should be able to work out the range of Hex codes that each line in your file covers.
Once you have that you should be able to see where the blocks need to be changed or added to accommodate the Aeroflot codes that are currently picking up the UK flag.

FYI I have 23 lines for Bermuda in my file, I'm not saying that's correct but it works for me.

Be aware that Bermuda / Cayman / Aruba are pretty much in a permanent state of change.


Hope that helps
DF
Title: Re: Countries.dat file for Basestation
Post by: Anmer on October 26, 2020, 04:09:56 PM
Quote from: Triple7 on October 26, 2020, 04:05:14 PM
Mike, I think there might need to be a zero at the front of your binary code?

Correct.  Using "bad" converters!

I've corrected my post.  Thanks for spotting it Tim.
Title: Re: Countries.dat file for Basestation
Post by: Triple7 on October 26, 2020, 04:13:30 PM
Quote from: David Finch on October 26, 2020, 04:07:25 PM
FYI I have 23 lines for Bermuda in my file, I'm not saying that's correct but it works for me.
Hope that helps
DF

You could save me a lot of work and head scratching if you could kindly share your Bermuda list.

Thanks,

Tim
Title: Re: Countries.dat file for Basestation
Post by: David Finch on October 26, 2020, 04:22:17 PM
Hi Tim
And there was me thinking you were up for a challenge!!!
OK
Here's what I have for Bermuda.  Any corrections, updates or changes welcome.

Bermuda_1=01000000000000001xxxxxxx,17,Bermuda.bmp
Bermuda_2=01000000000000010xxxxxxx,17,Bermuda.bmp
Bermuda_3=010000000000000110xxxxxx,18,Bermuda.bmp
Bermuda_4=0100001001000000xxxxxxxx,16,Bermuda.bmp
Bermuda_5=0100001001000001000xxxxx,19,Bermuda.bmp
Bermuda_6=01000010010000010010xxxx,20,Bermuda.bmp
Bermuda_7=0100001001000001001100xx,22,Bermuda.bmp
Bermuda_8=01000010010000100011xxxx,20,Bermuda.bmp
Bermuda_9=010000100100001001xxxxxx,18,Bermuda.bmp
Bermuda_10=01000010010000101xxxxxxx,17,Bermuda.bmp
Bermuda_11=0100001001000011xxxxxxxx,16,Bermuda.bmp
Bermuda_12=01000010010001000xxxxxxx,17,Bermuda.bmp
Bermuda_15=0100001001000100100xxxxx,19,Bermuda.bmp
Bermuda_16=0100001001000101xxxxxxxx,16,Bermuda.bmp
Bermuda_17=0100001001000110000xxxxx,19,Bermuda.bmp
Bermuda_18=01000010010001100010xxxx,20,Bermuda.bmp
Bermuda_19=010000100100100011011xxx,21,Bermuda.bmp
Bermuda_20=0100001001001000111xxxxx,19,Bermuda.bmp
Bermuda_21=0100001001001001xxxxxxxx,16,Bermuda.bmp
Bermuda_22=01000010010010100000xxxx,20,Bermuda.bmp
Bermuda_23=010000111011111010xxxxxx,18,Bermuda.bmp

DF

Title: Re: Countries.dat file for Basestation
Post by: Anmer on October 26, 2020, 04:23:55 PM
I think, historically, the Countries.dat file has been adapted to handle the "exceptions", hence Tim's seventeen variations for Bermuda!

Originally the UK allocation was:

United Kingdom=010000xxxxxxxxxxxxxxxxxx,6,United_Kingdom.bmp

This "batch" would have included the Bermuda and IoM sub-allocations.

Then, as these came to light, we have had variations, such as:

Cayman Islands_1=010000000000000001xxxxxx,18,Cayman_Islands.bmp
Cayman Islands_2=010000000000000010000xxx,21,Cayman_Islands.bmp
Cayman Islands_3=0100000000000000100010xx,22,Cayman_Islands.bmp
Cayman Islands_4=01000000000000001100xxxx,20,Cayman_Islands.bmp
Cayman Islands_5=010000000000000011010xxx,21,Cayman_Islands.bmp
Cayman Islands_6=010000000000000111xxxxxx,18,Cayman_Islands.bmp
Cayman Islands_7=0100001001000001001101xx,22,Cayman_Islands.bmp
Cayman Islands_8=010000100100000100111xxx,21,Cayman_Islands.bmp
Cayman Islands_9=010000100100000101xxxxxx,18,Cayman_Islands.bmp
Cayman Islands_10=0100001001000001100xxxxx,19,Cayman_Islands.bmp
Cayman Islands_11=0100001001000001101xxxxx,19,Cayman_Islands.bmp
Cayman Islands_12=0100001001000001110xxxxx,19,Cayman_Islands.bmp
Cayman Islands_13=01000010010000011110xxxx,20,Cayman_Islands.bmp

Isle of Man=01000011111001110001011x,23,Isle_of_Man.bmp
Isle of Man=010000111110011100011xxx,21,Isle_of_Man.bmp
Isle of Man=0100001111100111001xxxxx,19,Isle_of_Man.bmp
Isle of Man=010000111110011101xxxxxx,18,Isle_of_Man.bmp
Isle of Man=01000011111001111xxxxxxx,17,Isle_of_Man.bmp
Isle of Man=010000111110100xxxxxxxxx,15,Isle_of_Man.bmp
Isle of Man=0100001111101010xxxxxxxx,16,Isle_of_Man.bmp
Isle of Man=010000111011111101111011,24,Isle_of_Man.bmp

All using the same first 6 characters as the "generic" UK allocation:

010000

It can get quite messy.
Title: Re: Countries.dat file for Basestation
Post by: David Finch on October 26, 2020, 04:32:34 PM
Hi

For Caymans I have 17 lines and for IOM I have 15.  And even Ireland is changing with the addition of the PC12 codes to the Mil side of things.

Cayman Islands_1=010000000000000001xxxxxx,18,Cayman_Islands.bmp
Cayman Islands_2=01000000000000001000xxxx,20,Cayman_Islands.bmp
Cayman Islands_3=01000000000000001100xxxx,20,Cayman_Islands.bmp
Cayman Islands_4=010000000000000011010xxx,21,Cayman_Islands.bmp
Cayman Islands_5=010000000000000111xxxxxx,18,Cayman_Islands.bmp
Cayman Islands_6=0100001001000001001101xx,22,Cayman_Islands.bmp
Cayman Islands_7=010000100100000100111xxx,21,Cayman_Islands.bmp
Cayman Islands_8=010000100100000101xxxxxx,18,Cayman_Islands.bmp
Cayman Islands_9=010000100100000110xxxxxx,18,Cayman_Islands.bmp
Cayman Islands_10=0100001001000001110xxxxx,19,Cayman_Islands.bmp
Cayman Islands_11=0100001001000001111xxxxx,19,Cayman_Islands.bmp
Cayman Islands_12=010000100100011101001xxx,21,Cayman_Islands.bmp
Cayman Islands_13=01000010010001110101xxxx,20,Cayman_Islands.bmp
Cayman Islands_14=0100001001000111011xxxxx,19,Cayman_Islands.bmp
Cayman Islands_15=01000010010001111xxxxxxx,17,Cayman_Islands.bmp
Cayman Islands_16=0100001001001000000xxxxx,19,Cayman_Islands.bmp
Cayman Islands_17=01000010010010000010xxxx,20,Cayman_Islands.bmp

Isle of Man_1=010000100100101100000011,24,Isle_of_Man.bmp
Isle of Man_10=010000111110011100011xxx,21,Isle_of_Man.bmp
Isle of Man_11=0100001111100111001xxxxx,19,Isle_of_Man.bmp
Isle of Man_12=010000111110011101xxxxxx,18,Isle_of_Man.bmp
Isle of Man_13=01000011111001111xxxxxxx,17,Isle_of_Man.bmp
Isle of Man_14=010000111110100xxxxxxxxx,15,Isle_of_Man.bmp
Isle of Man_15=0100001111101010xxxxxxxx,16,Isle_of_Man.bmp
Isle of Man_2=0100001001001011000001xx,22,Isle_of_Man.bmp
Isle of Man_3=010000100100101100001xxx,21,Isle_of_Man.bmp
Isle of Man_4=010000100100101100xxxxxx,18,Isle_of_Man.bmp
Isle of Man_5=010000100100101101xxxxxx,18,Isle_of_Man.bmp
Isle of Man_6=01000010010010111xxxxxxx,17,Isle_of_Man.bmp
Isle of Man_7=01000010010011000xxxxxxx,17,Isle_of_Man.bmp
Isle of Man_8=01000010010011001xxxxxxx,17,Isle_of_Man.bmp
Isle of Man_9=01000011111001110001011x,23,Isle_of_Man.bmp

Again, any corrections / additions / combinations etc. welcome.
DF



Title: Re: Countries.dat file for Basestation
Post by: Triple7 on October 26, 2020, 04:39:37 PM
Quote from: David Finch on October 26, 2020, 04:22:17 PM
And there was me thinking you were up for a challenge!!!

I am - but ....... no need to re-invent the wheel so to speak.

Thanks for that list - a spot check using egnx's Excel sheet shows that the ones I was interested in are now correctly being decoded with the Bermuda flag.

I will do some more cross-checking and see if I can work it out for future reference.

Tim
Title: Re: Countries.dat file for Basestation
Post by: Anmer on October 26, 2020, 04:40:41 PM
Quote from: David Finch on October 26, 2020, 04:22:17 PM
Here's what I have for Bermuda.  Any corrections, updates or changes welcome.

Those Bermuda entries are adding "exceptions" to the UK generic allocation.  Some are narrowing it down to just a few hex codes.

If we knew the specific sub-allocations we could clean up our dat file.
Title: Re: Countries.dat file for Basestation
Post by: Anmer on October 26, 2020, 04:41:44 PM
Quote from: Triple7 on October 26, 2020, 04:39:37 PM
Thanks for that list - a spot check using egnx's Excel sheet shows that the ones I was interested in are now correctly being decoded with the Bermuda flag.

Is that after some dat file editing?
Title: Re: Countries.dat file for Basestation
Post by: Triple7 on October 26, 2020, 04:46:33 PM
I just copied and pasted DF's list into my .dat file and overwrote what was there.

Tim
Title: Re: Countries.dat file for Basestation
Post by: David Finch on November 03, 2020, 04:59:58 PM
Hi All

From the information that I have, I've updated my P4 listing for Basestation 03_11_2020 - See attached zip file.
P4-LNZ, MAS, RRR, SRN removed.
P4-136, ACE, KGC and RCA added.

Any additions or corrections welcome.

Hope of some use.
DF

[attachment deleted reduce file load]
Title: Re: Countries.dat file for Basestation
Post by: David Finch on December 29, 2020, 01:49:46 PM
Hi All

From the information that I have, I've updated my P4 listing for Basestation 29_12_2020 - See attached zip file.
P4-ASL, GAS removed.
P4-BAR, IFF, KBK, KBM, KGD, LTI and VIP added.

Note: The line P4_1 contains the Block codes for P4-AAF, FSH, MES, MGU, RCA, SAM, SDL and WWS .

Any additions or corrections welcome.

Hope of some use.
Wishing you all a Happy New Year.  Hope you have a good 202one.
STAY SAFE
DF

[attachment deleted reduce file load]
Title: Re: Countries.dat file for Basestation
Post by: Oblivian on January 04, 2021, 09:33:44 AM
Glad it's not just me!

But being away from where any of the appropriate registrations/hex fly I ended up throwing my arms up and largely gave up keeping on top of where they slide in among the UK ranges for the countries.dat

This is going offtrack for a moment, but bear with me - could be handy

Converting from the .dat binary allocations like you provide here in an excel  I did helped to work ranges out for me to use elsewhere

I've hobbled together a basic PHP website that uses functions to do conversions to help people trying to make sure the HEX they have, matches the registration block expected.
(And shows numeric/binary results too to help triple sanity check)

- For the most part I just have a disclaimer that British rule locations are all over the place so may be incomplete

But using what you guys have put together should help me clean it up.

Something I did find as part of this process based on how ICAO allocate to countries - which may be handy and you probably already knew, is often the known HEX's for these smaller regions fall within the smaller binary block sizes.
Chunks of 8, 16, 32, 64, 128, 256, 512
The big country ranges covered by the thousands. 1024, 2048, 4096, 16,383 (UK Mil has 16383 for instance) and so on

43C000 = 4440064
43FFFF = 4456447
= 16,383

So when you take some of the known Regos, convert to numeric and order them, sometimes you can see they're part of a small range rather than totally here and there. Which you can convert back to a wider Hex range for countries.dat rather than lots of singles

Part of my hex to reg table.. which is likely wrong :P

400040,40007F,4194368,4194431,Cayman Islands,VP-Cxx
400080,400087,4194432,4194439,Cayman Islands,VP-Cxx

40007F is 1 off 400080 - a total of 63 in each range (the way it works the inclusive number is always 1 less of true binary 64 for some reason)
Title: Re: Countries.dat file for Basestation
Post by: David Finch on February 18, 2021, 11:42:25 AM
Hi All

From the information that I have, I've updated my P4 listing for Basestation  18_02_2021 - See attached zip file.
P4-KCH, VIP (old code) removed.
P4-EBO and VIP (new code) added.

Note: Combination of codes allows a P4_1 and a P4_2 block.

Any additions or corrections welcome.

Hope of some use.

STAY SAFE
DF

[attachment deleted reduce file load]
Title: Re: Countries.dat file for Basestation
Post by: Oblivian on April 12, 2021, 08:44:54 AM
Uh. More awkward ones inside the UK range
Turks and Caicos - VQ-T. Someone reported a new one under 400397

Found an ICAO page with a bunch of the UK colonials listed..
VP-A .................................... Anguilla (United Kingdom)
VP-B, VQ-B ........................ Bermuda (United Kingdom)
VP-C ........................ Cayman Islands (United Kingdom)
VP-F ...... Falkland Islands (Malvinas) (United Kingdom)
VP-G ................................... Gibraltar (United Kingdom)
VP-L............................ Virgin Islands (United Kingdom)
VP-M ............................... Montserrat (United Kingdom)
VQ-B, VP-B ........................ Bermuda (United Kingdom)
VQ-H ................ St.Helena/Ascension (United Kingdom)
VQ-T ...................... Turks and Caicos (United Kingdom)
Title: Re: Countries.dat file for Basestation
Post by: Rainfp1 on October 17, 2022, 03:07:27 PM
The latest VistaJet Malta aircraft are showing on my basestation as Unallocated Hex.
This applies to 9H-VCR (4D243B) and 9H-VCS (4D243C)
My current countries.dat for Malta
Malta=01001101001000xxxxxxxxxx,14,Malta.bmp

I realise the countries.dat needs changing but not confident of where to go with this, despite some of the excellent advice earlier in this section. ANyone point me in the right direction??

Paul
Title: Re: Countries.dat file for Basestation
Post by: Triple7 on October 17, 2022, 03:19:28 PM
Hi Paul,

Malta=010011010010xxxxxxxxxxxx,12,Malta.bmp

Should see you right!

Tim
Title: Re: Countries.dat file for Basestation
Post by: Oldfella on November 02, 2022, 01:33:45 AM
I haven't been happy with the intermingling of the Hong Kong hexcodes within the China 78xxxx band in the original BaseStation countries.dat file.  >:( So did a little bit of experimenting with the hexcodes logged in my BaseStation Reporter using the B-xxx regos and came up with 17 lines needed to separate them from the China 78xxxx band. So far so good.  :)

First off, needed to delete any reference in the China 78xxxx band and then created a new entry under Hong Kong and add the 17 lines as listed below. I hope this covers all the possibilities for the Hong Kong range and would appreciate notification of errors that may pop up in your neck of the woods. Don't forget to make sure you have a copy of the Hong Kong flag in your flag BMP folder.

Hong Kong_1=01111000000000100000xxxx,20,Hong_Kong.bmp
Hong Kong_2=01111000000000100001xxxx,20,Hong_Kong.bmp
Hong Kong_3=01111000000000100010xxxx,20,Hong_Kong.bmp
Hong Kong_4=01111000000000100011xxxx,20,Hong_Kong.bmp
Hong Kong_5=01111000000010100001xxxx,20,Hong_Kong.bmp
Hong Kong_6=01111000000010100010xxxx,20,Hong_Kong.bmp
Hong Kong_7=01111000000010100011xxxx,20,Hong_Kong.bmp
Hong Kong_8=01111000000010100100xxxx,20,Hong_Kong.bmp
Hong Kong_9=01111000000010100101xxxx,20,Hong_Kong.bmp
Hong Kong_10=01111000000010100110xxxx,20,Hong_Kong.bmp
Hong Kong_11=01111000000010100111xxxx,20,Hong_Kong.bmp
Hong Kong_12=01111000000010101000xxxx,20,Hong_Kong.bmp
Hong Kong_13=01111000000010101001xxxx,20,Hong_Kong.bmp
Hong Kong_14=01111000000010101010xxxx,20,Hong_Kong.bmp
Hong Kong_15=01111000000010101011xxxx,20,Hong_Kong.bmp
Hong Kong_16=01111000000010101100xxxx,20,Hong_Kong.bmp
Hong Kong_17=0111100010010010xxxxxxxx,16,Hong_Kong.bmp
Title: Re: Countries.dat file for Basestation
Post by: DaveReid on November 02, 2022, 07:48:22 AM
I think you need at least one more line for Cathay's B773s and A333s (albeit not many of them currently flying) and Air Hong Kong's A306s which have 7801xx hex codes.

HTH
Dave
Title: Re: Countries.dat file for Basestation
Post by: Oldfella on November 02, 2022, 09:29:47 PM
Thanks Dave for your information. Air Hong Kong haven't darken our skies over Sydney as of yet, so wasn't able to categorise their hexcodes.

Besides Cathay Pacific, we also had Hong Kong Airlines A333s which happen to fit nicely into the 780Axx band but haven't seen any of their aircraft since September and suspect their operations to Sydney have been suspended.  The only CPA B773s that I have logged have been in either the 7802xx or 780Axx bands. No CPA's A333 have operated into Sydney for a couple of years now.

I haven't logged any China/Hong Kong registered aircraft in the 7801xx band so didn't include them in my post

If you want to add a line for the 7801xx band, see below, but just be aware that there maybe a mixture of the two types of regos.

Hong Kong_18=0111100000000001xxxxxxxx,16,Hong_Kong.bmp
Title: Re: Countries.dat file for Basestation
Post by: DaveReid on November 03, 2022, 07:56:51 AM
Yes, the start of the 7801xx band is used by PRC, with 780118 the highest I'm aware of (mostly CSN), and Taiwan's usage starts at around 780120, so it may be possible to have separate masks for those in the Countries.dat file.
Title: Re: Countries.dat file for Basestation
Post by: Faramir on December 08, 2022, 10:18:29 PM
The manager of the Dutch official register gave me all the registrations issued to Curacao and Aruba. I condensed the registries to the lines below.
The flag bitmap for Curacao I had to make but I'm not good at that at all so maybe someone can make a proper 20x16 flag for Curacao?

For the Netherlands as whole the first 9 bits define the total range. The 10th bit is used to define civil (1) or military (0). No further ranges are defined. That leaves 2 lines for the Netherlands that are also below.

I don't know if the order makes a difference. All the registrations for both Aruba and Curacao were binary sorted and then condensed to the ranges as they are shown. If a different order is better than please let me know.

Aruba=010010000100000001110100,24,Aruba.bmp
Aruba=010010000100000011000110,24,Aruba.bmp
Aruba=010010000100000011011101,24,Aruba.bmp
Aruba=010010000100000011011110,24,Aruba.bmp
Aruba=010010000100000011101010,24,Aruba.bmp
Aruba=010010000100000011111011,24,Aruba.bmp
Aruba=010010000100000100000001,24,Aruba.bmp
Aruba=010010000100000100000111,24,Aruba.bmp
Aruba=010010000100000100011000,24,Aruba.bmp
Aruba=01001000010000010001101x,23,Aruba.bmp
Aruba=0100100001000001000111xx,22,Aruba.bmp
Aruba=01001000010000010010xxxx,20,Aruba.bmp
Aruba=01001000010000110011101x,23,Aruba.bmp
Aruba=0100100001000011001111xx,22,Aruba.bmp
Aruba=01001000010000110011xxxx,20,Aruba.bmp
Aruba=01001000010000110100101x,23,Aruba.bmp
Aruba=0100100001000011010011xx,22,Aruba.bmp
Aruba=01001000010000110100xxxx,20,Aruba.bmp
Aruba=01001000010000110101101x,23,Aruba.bmp
Aruba=0100100001000011010111xx,22,Aruba.bmp
Aruba=01001000010000110101xxxx,20,Aruba.bmp
Aruba=010010000100001101100xxx,21,Aruba.bmp
Aruba=0100100001000100100011xx,22,Aruba.bmp
Aruba=01001000010001001001101x,23,Aruba.bmp
Aruba=0100100001000100100111xx,22,Aruba.bmp
Aruba=01001000010001001001xxxx,20,Aruba.bmp
Aruba=01001000010001001010xxxx,20,Aruba.bmp
Aruba=010010000100010010110xxx,21,Aruba.bmp
Aruba=0100100001000100101110xx,22,Aruba.bmp
Aruba=01001000010001001011110x,23,Aruba.bmp
Aruba=010010000101000010011001,24,Aruba.bmp
Aruba=01001000010100001001101x,23,Aruba.bmp
Aruba=0100100001010000100111xx,22,Aruba.bmp
Aruba=0100100001010000101xxxxx,19,Aruba.bmp
Aruba=010010000101000011000xxx,21,Aruba.bmp
Aruba=0100100001010000110010xx,22,Aruba.bmp

Curacao=010010000100000010xxxxxx,18,Curacao.bmp
Curacao=01001000010111111110111x,23,Curacao.bmp
Curacao=01001000010111111111xxxx,20,Curacao.bmp
Curacao=0100100001100000000xxxxx,19,Curacao.bmp
Curacao=01001000011000000010xxxx,20,Curacao.bmp
Curacao=010010000110000000110xxx,21,Curacao.bmp
Curacao=010010000110000000111000,24,Curacao.bmp

Netherlands=0100100001xxxxxxxxxxxxxx,10,Netherlands.bmp
Netherlands Mil=0100100000xxxxxxxxxxxxxx,10,Netherlands_Mil.bmp
Title: Re: Countries.dat file for Basestation
Post by: SteveHibberd on December 08, 2022, 10:46:17 PM
CURACAO.bmp
40x20 as per my zip
20x16 as per defaults

[attachment deleted reduce file load]
Title: Re: Countries.dat file for Basestation
Post by: SteveHibberd on December 09, 2022, 10:57:01 AM
If you like the larger country flags, I have a zip file with lots of others :)
Title: Re: Countries.dat file for Basestation
Post by: Faramir on December 09, 2022, 12:33:12 PM
Thanks Steve,

For me the 20x16 is perfect!
Title: Re: Countries.dat file for Basestation
Post by: David Finch on December 09, 2022, 02:05:10 PM
Hi Faramir

Thanks for the Aruba Lines, just a few queries.  I've numbered the lines for convenience.  Hope I've got this correct??

Aruba=010010000100000001110100,24,Aruba.bmp   484074 to   484074   1   
Aruba=010010000100000011000110,24,Aruba.bmp   4840C6 to   4840C7   2   
Aruba=010010000100000011011101,24,Aruba.bmp   4840DD to   4840DD   3   
Aruba=010010000100000011011110,24,Aruba.bmp   4840DE to   4840DE   4   
Aruba=010010000100000011101010,24,Aruba.bmp   4840EA to   4840EA   5   
Aruba=010010000100000011111011,24,Aruba.bmp   4840FB to   4840FB   6   
Aruba=010010000100000100000001,24,Aruba.bmp   484101 to   484101   7   
Aruba=010010000100000100000111,24,Aruba.bmp   484107 to   484107   8   
Aruba=010010000100000100011000,24,Aruba.bmp   484118 to   484118   9   
Aruba=01001000010000010001101x,23,Aruba.bmp   48411A to   48411B   10   
Aruba=0100100001000001000111xx,22,Aruba.bmp   48411C to   48411F   11   
Aruba=01001000010000010010xxxx,20,Aruba.bmp   484120 to   48412F   12   
Aruba=01001000010000110011101x,23,Aruba.bmp   48433A to   48433B   13   A1
Aruba=0100100001000011001111xx,22,Aruba.bmp   48433C to   48433F   14   A2
Aruba=01001000010000110011xxxx,20,Aruba.bmp   484330 to   48433F   15   A3
Aruba=01001000010000110100101x,23,Aruba.bmp   48434A to   48434B   16   B1
Aruba=0100100001000011010011xx,22,Aruba.bmp   48434C to   48434F   17   B2
Aruba=01001000010000110100xxxx,20,Aruba.bmp   484340 to   48434F   18   B3
Aruba=01001000010000110101101x,23,Aruba.bmp   48435A to   48435B   19   C1
Aruba=0100100001000011010111xx,22,Aruba.bmp   48435C to   48435F   20   C2
Aruba=01001000010000110101xxxx,20,Aruba.bmp   484350 to   48435F   21   C3
Aruba=010010000100001101100xxx,21,Aruba.bmp   484360 to   484367   22   
Aruba=0100100001000100100011xx,22,Aruba.bmp   48448C to   48448F   23   
Aruba=01001000010001001001101x,23,Aruba.bmp   48449A to   48449B   24   D1
Aruba=0100100001000100100111xx,22,Aruba.bmp   48449C to   48449F   25   D2
Aruba=01001000010001001001xxxx,20,Aruba.bmp   484490 to   48449F   26   D3
Aruba=01001000010001001010xxxx,20,Aruba.bmp   4844A0 to   4844AF   27   
Aruba=010010000100010010110xxx,21,Aruba.bmp   4844B0 to   4844B7   28   
Aruba=0100100001000100101110xx,22,Aruba.bmp   4844B8 to   4844BB   29   
Aruba=01001000010001001011110x,23,Aruba.bmp   4844BC to   4844CD   30   
Aruba=010010000101000010011001,24,Aruba.bmp   485099 to   485099   31   
Aruba=01001000010100001001101x,23,Aruba.bmp   48509A to   48509B   32   
Aruba=0100100001010000100111xx,22,Aruba.bmp   48509C to   48509F   33   
Aruba=0100100001010000101xxxxx,19,Aruba.bmp   4850A0 to   4850BF   34   
Aruba=010010000101000011000xxx,21,Aruba.bmp   4850C0 to   4850C7   35   
Aruba=0100100001010000110010xx,22,Aruba.bmp   4850C8 to   4850CB   36   

Line 15 484330 to 48433F covers the block so you do not need lines 13 & 14.
Line 18 484340 to 48434F covers the block so you do not need lines 16 & 17.
Line 21 484350 to 48435F covers the block so you do not need lines 19 & 20.
You can further combine the blocks to 484340 to 48435F, last 2 blocks being 010xxxxx,19,
Line 26 484490 to 48449F covers the block so you do not need lines 24 & 25.
Shame 484119 is not there as 484118 to 48411F could be one line instead of 3.

DF
Title: Re: Countries.dat file for Basestation
Post by: rikgale on March 19, 2023, 03:32:43 PM
I have been looking in the Countries.bat I have managed to acquire from Faramir. It would appear that for the Australians both entries are the same, so there would be no way of differentiating Australian from Australian Mil. He suggested I ask here

Australia=011111xxxxxxxxxxxxxxxxxx,6,Australia.bmp
Australia Mil=011111xxxxxxxxxxxxxxxxxx,6,Australia_Mil.bmp


Is there something wrong with the Aussie entries in my file?
Title: Re: Countries.dat file for Basestation
Post by: Anmer on March 19, 2023, 04:38:34 PM
This is what I have, if it helps:

Australia=011111xxxxxxxxxxxxxxxxxx,6,Australia.bmp
Australia Mil_1=01111100100000100010111x,23,Australia_Mil.bmp
Australia Mil_2=01111100100000100011xxxx,20,Australia_Mil.bmp
Australia Mil_3=011111001000001001xxxxxx,18,Australia_Mil.bmp
Australia Mil_4=01111100100000101xxxxxxx,17,Australia_Mil.bmp
Australia Mil_5=0111110010000011xxxxxxxx,16,Australia_Mil.bmp
Australia Mil_6=01111100100001xxxxxxxxxx,14,Australia_Mil.bmp
Australia Mil_7=0111110010001xxxxxxxxxxx,13,Australia_Mil.bmp
Australia Mil_8=011111001001xxxxxxxxxxxx,12,Australia_Mil.bmp
Australia Mil_9=01111100101xxxxxxxxxxxxx,11,Australia_Mil.bmp
Australia Mil_10=0111110011xxxxxxxxxxxxxx,10,Australia_Mil.bmp
Australia Mil_11=01111101xxxxxxxxxxxxxxxx,8,Australia_Mil.bmp
Australia Mil_12=0111111xxxxxxxxxxxxxxxxx,7,Australia_Mil.bmp
Title: Re: Countries.dat file for Basestation
Post by: rikgale on March 19, 2023, 04:53:11 PM
Thank you. I think that will be of great help. :)
Title: Re: Countries.dat file for Basestation
Post by: rikgale on March 20, 2023, 08:38:08 PM
Does anyone have any HEX ranges for Russian Mil?

I got 4 small and 1 large range sofar, but they seem to mix the Military Hex codes in with the Civil ones, which makes life awkward

Russia Mil=000101010100xxxxxxxxxxxx,12,Russia_Mil_154xxx.bmp
Russia Mil=0001010011110001xxxxxxxx,16,Russia_Mil_14F1xx.bmp
Russia Mil=0001010100000000xxxxxxxx,16,Russia_Mil_1500xx.bmp
Russia Mil=0001010100110011xxxxxxxx,16,Russia_Mil_1533xx.bmp
Russia Mil=0001010101010010xxxxxxxx,16,Russia_Mil_1522xx.bmp


The numbers in the bmp names are a way for me to keep notes
Title: Re: Countries.dat file for Basestation
Post by: DaveReid on March 21, 2023, 08:10:53 AM
In general, Russian civil ICAO24 addresses are algorithmically-based (like the USA, Canada, etc), with the highest such code being 15869F, assigned to RA-99999, albeit not used, plus GA codes (RA-nnnnG registrations) starting at 18xxxx.

Some of the codes that I know of in the above ranges are nominally civil-registered aircraft operated by the military, with the code still conforming to the algorithm (regardless of whether the reg is RA- or RF-.

So differentiating between civil and military based on ICAO24 is going to be challenging, to say the least.   ::)
Title: Re: Countries.dat file for Basestation
Post by: rikgale on March 21, 2023, 10:36:08 AM
Thanks for the additional information. Very useful. :)
Title: Re: Countries.dat file for Basestation
Post by: David Moore on March 21, 2023, 07:24:30 PM
Hi. My SBS display has never displayed a flag for Taiwanese aircraft. There is a Taiwan country flag in the folder but no line for Taiwan in my Countries.dat file.

Does anyone have a Taiwan line that I could add to my Countries.dat file, please?

Thank you very much,

David
Title: Re: Countries.dat file for Basestation
Post by: Faramir on March 21, 2023, 07:43:35 PM
The lines below are fro my countries.dat file for Taiwan.
Taiwan=10001001100100xxxxxxxxxx,14,Taiwan.bmp
Taiwan Mil=100010011001000101100000,24,Taiwan_Mil.bmp
Title: Re: Countries.dat file for Basestation
Post by: David Moore on March 21, 2023, 08:09:36 PM
Thank you very much for your prompt reponse, Faramir

Regards.

David
Title: Re: Countries.dat file for Basestation
Post by: David Finch on March 22, 2023, 12:38:04 PM
Hi
The Taiwan Mil line equates to 899160 which Planebase has as China Airlines A350 B-18912.

The only Mil lines I have for Taiwan are:-
P3   Taiwan Mil_3308=100010011001000000000111,24,Taiwan_Mil.bmp       899007
F50   Taiwan Mil_5001-03=1000100110010001100000xx,22,Taiwan_Mil.bmp  899180-899183

DF
Title: Re: Countries.dat file for Basestation
Post by: David Moore on April 01, 2023, 11:18:29 PM
Quote from: Faramir on March 21, 2023, 07:43:35 PM
The lines below are fro my countries.dat file for Taiwan.
Taiwan=10001001100100xxxxxxxxxx,14,Taiwan.bmp
Taiwan Mil=100010011001000101100000,24,Taiwan_Mil.bmp

I added these lines to my Countries.dat file but have noticed that Taiwanese airliners do not display a flag on my Base Station grid (e.g. B-16730 [899035], B-16735 [899039] & B-18910 [89912E]). Cam anyone suggest a fix for me, please?


Thank you! David
Title: Re: Countries.dat file for Basestation
Post by: mhm on April 02, 2023, 02:20:51 AM
The US military have now started to use AF351F used by F35 Lightning
and AF4A7B  on a Hawker beechcraft with the US Navy
Title: Re: Countries.dat file for Basestation
Post by: Anmer on April 02, 2023, 09:38:08 AM
Quote from: David Moore on April 01, 2023, 11:18:29 PM
I added these lines to my Countries.dat file but have noticed that Taiwanese airliners do not display a flag on my Base Station grid (e.g. B-16730 [899035], B-16735 [899039] & B-18910 [89912E]). Cam anyone suggest a fix for me, please?

Using the Countries.dat lookup, all those codes should work with the mentioned Countries.dat lines:

https://radarspotting.com/forum/index.php?topic=9361.0

I assume you have the necessary bmp files in the BMFlags folder?

How did you add the lines, what app did you use?  And did you save the file afterwards?  See attached to show how the lines should appear in the Countries.dat file.



Title: Re: Countries.dat file for Basestation
Post by: David Moore on April 02, 2023, 05:06:38 PM
Thank you for replying, Anmer.

Yes, I do have a Taiwan flag in the BMPFlags folder.

I edited the Countries.dat in WordPad. I couldn't save it within the Base Station folder but I can save it elsewhere and then copy and paste it into the folder. That works, I know, because it worked when I updated the Malta line to take acount of the recent Wizz Malta and Vistajet allocations.

I used the tool you linked to, and that showed me that I have some ICAO lines in the Countries.dat file. Hex code 899035 also matches with an ICAO (2) line in the Countries.dat file and I guess that is why the Taiwan flag is not displaying on my BaseStation grid for these Taiwan registrations.


So, to change the subject a bit, my Countries.dat file contains these 3 lines for the country 'ICAO': may I edit or remove any of these safely, please?

ICAO (1)=111100000xxxxxxx,9,
ICAO (2)=11110000100100xx,14,
ICAO (2)=10001001100100xx,14,


Thank you very much!

Regards

David
Title: Re: Countries.dat file for Basestation
Post by: Anmer on April 02, 2023, 05:41:47 PM
Take a copy of the Countries.dat file and save it somewhere in case you need a backup.  Then delete those three lines in the original file and save it.

That should work.

If not, please let me know.
Title: Re: Countries.dat file for Basestation
Post by: David Moore on April 02, 2023, 11:04:07 PM
Thanks again, Anmer.

The next flight from Taipei will come near me about 18:00 tomorrow so I will let you know what the display looks like!

Thank you,

David
Title: Re: Countries.dat file for Basestation
Post by: David Moore on April 06, 2023, 07:20:49 PM
This evening's EVA B777 B-16731 just flew over the house and the Taiwanese flag displayed on my Base Station's grid: thanks very much, Anmer!

Regards

David
Title: Re: Countries.dat file for Basestation
Post by: Anmer on April 06, 2023, 08:08:43 PM
Great and thanks for posting an update.
Title: Re: Countries.dat file for Basestation
Post by: David Moore on May 17, 2023, 05:30:04 PM
Montenegro.

4O-MNE flew past me just now and no flag was displayed on the grid of my Base Station.

Does anyone have a small version of the Montenegro flag that I might have please, and also tell me what line to insert into my countries.dat file to accommodate Montenegrin hex codes, please?

Thank you very much

Regards

David
Title: Re: Countries.dat file for Basestation
Post by: Anmer on May 17, 2023, 05:47:28 PM
This is the line I have in my Countries.dat file:

Montenegro=01010001011000xxxxxxxxxx,14,Montenegro.bmp

This should work for 4O-MNE hex 516001

BMP attached.
Title: Re: Countries.dat file for Basestation
Post by: David Moore on May 17, 2023, 06:33:04 PM
Bless you Anmer - thank you very much!

Regards

David
Title: Re: Countries.dat file for Basestation
Post by: rikgale on May 17, 2023, 08:44:53 PM
If it is of any help I am trying to keep a countries.dat file up-to-date and avaiable on github for anyone to download and use.

https://github.com/rikgale/VRSCountries.dat

I am using it to set the countries correctly in my VRS Basestation.sqb DB (using a piece of python that Farmir kindly wrote for me), hence the name of the repo.

EDIT: When downloaded from github - the hidden line retrun characters are set for Linux OS's only. If this file is used on Windows PCs then open the downloaded file in Notepad++, highlight the text (Ctrl+A), from the menu bar   EDIT -> EOL Conversion -> Windows (CR LF). Then save the file. Job done.

The uploaded file contains the correct line retrun characters, but the downloaded files does not. Apologies, but at least there is a work around.
Title: Re: Countries.dat file for Basestation
Post by: Andrewmer on January 07, 2024, 10:23:38 PM
Guernsey seem to be re-coding aircraft in a new HEX range, with 43F6C6, 43F700 AND 43F702 noted so far. Can some clever soul provide a Countries.dat line for these? These may be covered by an existing United Kingdom Mil entry, so would that line need adjusting?
Thanks, Andy
Title: Re: Countries.dat file for Basestation
Post by: rikgale on January 08, 2024, 08:53:50 AM
Guernsey=0100001111110110xxxxxxxx,16,Guernsey.bmp   for 43F6xx range

Guernsey=0100001111110111xxxxxxxx,16,Guernsey.bmp   for 43F7xx range

If I am wrong apologies in advance... I still can't wrap my head around bit masks. But I have tested with the ModeS_Country Spreadsheet and it seems to do the trick.


                              
Title: Re: Countries.dat file for Basestation
Post by: Andrewmer on February 05, 2024, 09:39:11 AM
Thanks Rik,
Title: Re: Countries.dat file for Basestation
Post by: aviationpete on February 18, 2024, 11:34:31 AM
I recently downloaded the larger Countries DAT file with no issues. How ever the Air Tahiti Nui flight called for French_Overseas country flag instead of a France flag so i renamed a 40 X 20 BMP France flag as French_Overseas as enclosed.


Title: Re: Countries.dat file for Basestation
Post by: Ospreyv22 on February 20, 2024, 06:44:40 PM
Or put this one in for French_Overseas