AirNav Systems Forum

AirNav Radar => AirNav Radar Discussion => Topic started by: Bell 407 on August 21, 2011, 06:44:37 AM

Title: D008 Country Flag Correction - Am I Missing Something Here?
Post by: Bell 407 on August 21, 2011, 06:44:37 AM
Hi All,

I have been editing the D008 file quite successfully for the past year or so in order to correct the country flag display for a number of incorrectly listed ModeS codes of aircraft. However, I have never been able to resolve the following three listings to display the correct country flag:

NA,Namibia_ZS-SKW,1011000010110011-------- (ModeS code = 00B0B3).
ZA,South Africa_ZS-GAT,111111111100------------ (ModeS code = 000FFC).
ZA,South Africa_ZS-SSZ,11010000000101111100---- (ModeS code = 0D017C).

Is there someone who could enlighten me as to why these three listings are being such sticklers?

Is it because of the "dashes" used to make up the 24 code required?

Or is there some other file in RB that I should be editing to get the correct country flag displayed?

Would appreciate feedback.

Regards,
Title: Re: D008 Country Flag Correction - Am I Missing Something Here?
Post by: bearcat on August 21, 2011, 08:45:51 AM
I would delete the bracked information after the hex code as it may be looking for this in the hex look up. If you need this i would include it in the where you've put the registration.
Title: Re: D008 Country Flag Correction - Am I Missing Something Here?
Post by: Bell 407 on August 21, 2011, 08:55:47 AM
Sorry, should have stated that the info in the brackets is just for explanation purposes as to what the Hex code is for the ModeS. It is not listed in the D008 file at all.
Title: Re: D008 Country Flag Correction - Am I Missing Something Here?
Post by: bearcat on August 21, 2011, 08:59:52 AM
I think this is how it should look

ZA,South Africa_ZS-SSZ (ModeS code = 0D017C),11010000000101111100----.
Title: Re: D008 Country Flag Correction - Am I Missing Something Here?
Post by: Bell 407 on August 21, 2011, 09:09:41 AM
I don't think that is correct. It should be: ZA,South Africa_ZS-SSZ,11010000000101111100---- but that still does not change the flag from Mexico to South Africa.

There should be 24 numbers in the Hex code but in this case there are only 20 hence the four dashes added as per the rules in the Help File in RadarBox. But still no luck with a change to the South Africa flag.

Could there be a ModeS or Hex code listed in another RB file that needs to be changed as well?
Title: Re: D008 Country Flag Correction - Am I Missing Something Here?
Post by: tarbat on August 21, 2011, 09:13:59 AM
A lot depends on what other entries you have in the D008 file that may be overriding your new entries.
Title: Re: D008 Country Flag Correction - Am I Missing Something Here?
Post by: Bell 407 on August 21, 2011, 09:20:02 AM
I have done a search on all three Hex Codes for any others listed and there are no conflicts. Attached is my full D008 file for reference.
Title: Re: D008 Country Flag Correction - Am I Missing Something Here?
Post by: bearcat on August 21, 2011, 09:34:14 AM
Whilst agreeing with what Tarbat says,for aircraft  need I have the following entries in my Dat file

REQ,G-EZGJ,010000000110010100111001,
REQ,D-AIDA-H,00111100011001001000----

This brings up a  REQ flag I made not the country flag to notify me of the aircraft in the list I require.

All my entries are at the top of the list and looks to work fine
Title: Re: D008 Country Flag Correction - Am I Missing Something Here?
Post by: tarbat on August 21, 2011, 09:35:16 AM
Your ModeS hex to bin conversion looks wrong.
ModeS code = 00B0B3 ===> BIN = 000000001011000010110011

Have you considered using my D008 file - see http://www.airnavsystems.com/forum/index.php?topic=5797
Title: Re: D008 Country Flag Correction - Am I Missing Something Here?
Post by: Bell 407 on August 21, 2011, 09:38:04 AM
Quote from: bearcat on August 21, 2011, 09:34:14 AM
All my entries are at the top of the list and looks to work fine

That sounds interesting. Does RB read entries in the D008 file until it has found an item for correction and once it does, it stops there and looks no further?
Title: Re: D008 Country Flag Correction - Am I Missing Something Here?
Post by: Bell 407 on August 21, 2011, 09:43:45 AM
Quote from: tarbat on August 21, 2011, 09:35:16 AM
Your ModeS hex to bin conversion looks wrong.
ModeS code = 00B0B3 ===> BIN = 000000001011000010110011

Have you considered using my D008 file - see http://www.airnavsystems.com/forum/index.php?topic=5797

Thanks Tarbat,

The website I am using for conversion to Bin is: http://easycalculation.com/hex-converter.php and this definitely gives a different result to you. My result is 1011000010110011 but yours includes a number of zeros up front?What site or programme are you using for your BIN conversions?

I originally did use your D008 file about a year ago but mine has changed quite a bit since then. Will review you post in the other thread and check for differences between the two.
Title: Re: D008 Country Flag Correction - Am I Missing Something Here?
Post by: tarbat on August 21, 2011, 09:57:47 AM
Quote from: Bell 407 on August 21, 2011, 09:43:45 AMThe website I am using for conversion to Bin is: http://easycalculation.com/hex-converter.php and this definitely gives a different result to you. My result is 1011000010110011 but yours includes a number of zeros up front?What site or programme are you using for your BIN conversions?

I just use the standard Windows calculator in Programmer mode.

00B0B3 = 0000 0000 1011 0000 1011 0011
000FFC = 0000 0000 0000 1111 1111 1100
0D017C = 0000 1101 0000 0001 0111 1100
Title: Re: D008 Country Flag Correction - Am I Missing Something Here?
Post by: Bell 407 on August 21, 2011, 10:10:41 AM
OK, learning something new every day. Get the Scientific calculator showing but I can't enter "00". How do you enter Programmer Mode?
Title: Re: D008 Country Flag Correction - Am I Missing Something Here?
Post by: tarbat on August 21, 2011, 10:23:28 AM
In the menu (I'm running Win7).  The select BIN, HEX, etc.

The only mistake you're making is leading zeros.  Take each hex digit, convert to binary, and add leading zeros for any leading zeros in the hex.
Title: Re: D008 Country Flag Correction - Am I Missing Something Here?
Post by: Bell 407 on August 21, 2011, 10:31:52 AM
Thanks Tarbat, using Windows XP which doesn't have Programmer mode.

Appreciate the help as I now know that I have lost some "zeros" along the way. Leading zeros are not converted. Will check those problem one in my D008 file and correct. Should work fine then.

Cheers,
Title: Re: D008 Country Flag Correction - Am I Missing Something Here?
Post by: tarbat on August 21, 2011, 10:38:22 AM
Also note, the "-" characters are wild cards.  So, in your first example, 1011 0000 1011 0011 ---- ----, you're covering the range B0B300 to B0B3FF.
Title: Re: D008 Country Flag Correction - Am I Missing Something Here?
Post by: Bell 407 on August 21, 2011, 11:00:04 AM
That makes sense that the dashes are wildcards.

Also, I will now look more closely at the conversions to ensure that they are correct. Just goes to show you can't believe everything you see on the interweb :-).

Interesting that a few conversion sites do not take into account any leading zeros in the Hex Code. Therefore the 24 Bin Code will always be wrong.

Have just re-uploaded my corrected D008 file so will give feedback on its ability to correct the country flags later.

Appreciate the help.
Title: Re: D008 Country Flag Correction - Am I Missing Something Here?
Post by: Bell 407 on August 21, 2011, 01:34:30 PM
I can confirm that all issues have been resolved. Correct country flags are now displaying. Thanks for the assistance.
Title: Re: D008 Country Flag Correction - Am I Missing Something Here?
Post by: ACW367 on August 23, 2011, 10:27:22 AM
Quote from: tarbat on August 21, 2011, 09:35:16 AM

Have you considered using my D008 file - see http://www.airnavsystems.com/forum/index.php?topic=5797

Tarbat
The Bermudans have now reached the VQ-BN* series and they are currently showing with a Union Jack.  It is possible for you to research your D008 to see if you can update the file to cover the entire VQ-BAA to VQ-BZZ range under the Bermudan flag.

Regards
ACW367
Title: Re: D008 Country Flag Correction - Am I Missing Something Here?
Post by: tarbat on August 23, 2011, 10:47:57 AM
Quote from: ACW367 on August 23, 2011, 10:27:22 AMThe Bermudans have now reached the VQ-BN* series and they are currently showing with a Union Jack.  It is possible for you to research your D008 to see if you can update the file to cover the entire VQ-BAA to VQ-BZZ range under the Bermudan flag.

Sorry, but I'm very lazy, and only use whatever the SBS community publish as their countries.dat file.  The latest one is dated 7th April 2011, and contains the following Bermudan entries:
BM,Bermuda_1,01000000000000001-------
BM,Bermuda_2,01000000000000010-------
BM,Bermuda_3,010000000000000110------
BM,Bermuda_4,0100001001000000--------
BM,Bermuda_5,0100001001000001000-----
BM,Bermuda_6,01000010010000010010----
BM,Bermuda_7,0100001001000001001100--
BM,Bermuda_8,01000010010000100011----
BM,Bermuda_9,010000100100001001------
BM,Bermuda_10,010000100100100011011---
BM,Bermuda_11,0100001001001000111-----
BM,Bermuda_12,01000010010010010-------
BM,Bermuda_13,0100001001001001100-----
BM,Bermuda_14,0100001001001001101-----
BM,Bermuda_15,0100001110111110100-----