anything
AirNav RadarBox
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 


Author Topic: How to display military flags instead of country flags  (Read 29129 times)

0 Members and 1 Guest are viewing this topic.

AirNav Team

  • AirNav Systems
  • Jr. Member
  • *****
  • Posts: 57
How to display military flags instead of country flags
« on: March 20, 2008, 02:04:22 PM »
Any "flag" can be shown in place of the standard country flag in the aircraft lists.  This makes particular aircraft much easier to see in the list.  This FAQ briefly covers how to display UK and USA military flags.



This is reasonably simple to get working and does improve enjoyment of RB.  This guide is written assuming that the operating system is Windows XP - I have no idea how or where Windows Vista stores its program files.

Here we go then:

1. Shut down RadarBox

2. Use MS Explorer to navigate to the RadarBox Data directory, the default should be:

c:/Program Files/AirNav Systems/AirNav RadarBox 2008/Data

3. Make a copy of the D008.dat file and rename it (for example D008.dat.org) so you can revert to the default settings if you need to.  If you can't see the file extension (.dat), you will need to go to Tools/Folder options/View and untick "Hide extensions for known file types".

4. Using Windows Notepad, open the original D008.dat file (not the one you have just saved as a copy) and you will see that the file is in this format but has many more lines:

AF,Afghanistan,011100000000------------
AL,Albania,01010000000100----------
DZ,Algeria,000010100---------------
AO,Angola,000010010000------------
AG,Antigua and Barbuda,00001100101000----------
AR,Argentina,111000------------------
AM,Armenia,01100000000000----------
AU,Australia,011111------------------
AT,Austria,010001000---------------
AZ,Azerbaijan,01100000000010----------
BS,Bahamas,000010101000------------

5. Copy the following line and insert it in the D008.dat file above the UK line:

RAF,RAF,0100001111--------------

So that the appropriate bit of the .dat file looks like this:

TM,Turkmenistan,01100000000110----------
UG,Uganda,000001101000------------
UA,Ukraine,010100001---------------
AE,United Arab Emirates,100010010110------------
RAF,RAF,0100001111--------------
UK,United Kingdom,010000------------------
TZ,United Republic of Tanzania,000010000000------------

6. Copy the following lines and insert them above the US line in the .dat file:

UF,US Mil 5,101011011111011111001---
UF,US Mil 4,10101101111101111101----
UF,US Mil 3,1010110111110111111-----
UF,US Mil 2,1010110111111-----------
UF,US Mil 1,1010111-----------------

So the appropriate section of the .dat file now looks like looks like this:

TM,Turkmenistan,01100000000110----------
UG,Uganda,000001101000------------
UA,Ukraine,010100001---------------
AE,United Arab Emirates,100010010110------------
RAF,RAF,0100001111--------------
UK,United Kingdom,010000------------------
TZ,United Republic of Tanzania,000010000000------------
UF,US Mil 5,101011011111011111001---
UF,US Mil 4,10101101111101111101----
UF,US Mil 3,1010110111110111111-----
UF,US Mil 2,1010110111111-----------
UF,US Mil 1,1010111-----------------
US,United States,1010--------------------
UY,Uruguay,111010010000------------
UZ,Uzbekistan,01010000011111----------
VU,Vanuatu,11001001000000----------

7. Click "Save" in notepad to save the modified D008.dat file.  Points to note here:

- the numer of "-" characters is vital.  Every Mode S Hex code (111010010000------------) MUST be 24 characters in length.

- make sure that you don't insert any blank lines or spaces when you are inserting the new lines.

- the D008.dat file MUST be saved as a txt file (so don't use Word or Wordpad any other program) and it must be named D008.dat and NOT D008.dat.txt which might happen if you use "Save as".  Look at the file in Explorer to make sure the name is correct.

8. Right click on this image and choose "Save picture as"



The picture must be saved as a bmp to the

c:/Program Files/AirNav Systems/AirNav RadarBox 2007/Data/Flags directory

and must be named RAF.BMP

Same again for this one, but this time it must be saved as UF.BMP



9. Close Notepad and run RadarBox.  Wait for a Brit Mil or US Mil aircraft to be picked up either as live or network traffic and you should see the Mil flag in the aircraft list if you have the Flags set to show in Preferences.

_______________________________________________________________________

OK, so how does this work?

The D008.dat file contains the aircraft Mode S allocations plus wild cards in the form:

UK,United Kingdom,010000------------------

where UK represents the UK.BMP flag in the Data/Flags directory

United Kingdom is the description

and 010000------------------ is the 24 character Mode S Binary version of the 6 character Hex code (with wildcards for the) UK.

All UK Mode S codes start with Bin 010000 (a sweeping generalisation, but you get the idea!)

When RB detects a Mode S Binary 010000 then it shows the UK.BMP in the aircraft list.

However, Brit Mil aircraft codes are a block within UK allocation, starting with 0100001111, so a line in the D008.dat as follows, will "trap" these:

RAF,RAF,0100001111--------------

and now codes starting with this will show the RAF.BMP flag.  Putting the 2 lines together you can see how it works.

RAF,RAF,0100001111--------------
UK,United Kingdom,010000------------------

The same principle applies to the US military codes, but as there are more allocations, it's a bit more complicated:

UF,US Mil 5,101011011111011111001---
UF,US Mil 4,10101101111101111101----
UF,US Mil 3,1010110111110111111-----
UF,US Mil 2,1010110111111-----------
UF,US Mil 1,1010111-----------------
US,United States,1010--------------------

_____________________________________________________________________

Update: RadarBox V1.5 onwards allows the use of bmp flag names of any length, so now it is easy to have more meaningful names in your D008.dat file.  For example:

UG,Uganda,000001101000------------
UA,Ukraine,010100001---------------
AE,United Arab Emirates,100010010110------------
UAE_Mil,UAE Mil 1211,100010010110000000101001
UAE_Mil,UAE Mil 1212,100010010110000000101010
UAE_Mil,UAE Mil 1213,100010010110000000101011
UAE_Mil,UAE Mil 1216,100010010110000000101110
UK,United Kingdom,010000------------------
SPIT,Spitfire G-AIST,010000000000111111101111
IF,Isle of Man 1,01000011111001110001011-
IF,Isle of Man 2,010000111110011100011---
IF,Isle of Man 3,0100001111100111001-----
IF,Isle of Man 4,010000111110011101------
IF,Isle of Man 5,01000011111001111-------
IF,Isle of Man 6,0100001111101000--------
IF,Isle of Man 7,010000111110100100000---
IF,Isle of Man 8,01000011111010010000100-
NPT,L188 G-FIJR,010000000000100001001110
NPT,L188 G-FIZU,010000000000100001010000
NPT,L188 G-LOFB,010000000000100001001010
NPT,L188 G-LOFE,010000000000100001001101
NPT,L188 G-LOFC,010000000000100001001011
NPT,ATP G-OAAF,010000000000101010010010
UnitedKingdom_Mil,RAF,0100001111--------------
FRA,FRA G-FPLA,010000000000100001000000
FRA,FRA G-FPLB,010000000000100001000001
FRA,FRA G-FPLD,010000000000100101111000
FRA,FRA G-FPLE,010000000000110110010111
FRA,FRA G-FFRA,010000000000100111001000
FRA,FRA G-FRAF,010000000000100111001001

Also note that it is easy to have specific flags for individual registrations.  There are more examples of how to display flags in the forum.