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 convert Hex to Binary code for the D008.dat file?  (Read 3442 times)

0 Members and 1 Guest are viewing this topic.

Bell 407

  • Full Member
  • ***
  • Posts: 124
How to convert Hex to Binary code for the D008.dat file?
« on: April 10, 2010, 02:46:55 PM »
Hi All,

I have been reading up on the editing of the D008.dat file in terms of changing flags to the correct country display, i.e. I still have an Indian registered A343 flying now for SAA but the Indian flag is displayed. I want to change it to a ZA flag for South Africa.

If I read the AirNav RB Manual correctly you are able to insert individual registrations with allocated .bmp flag files.

The thing that is getting to me is how do I convert the Hex code to Binary (24 character) code? They say all you need is a calculator?!?!?!

(1) The Mode C code is 80018B so what would that be in Hex or Binary?
(2) My code insert into the D008.dat file would be:

ZA,South Africa_ZS-SXE,010010000100010010100010 (Here the binary code is just made up).

Is this process correct? Any help would be much appreciated.

Cheers,

Marc
« Last Edit: April 10, 2010, 02:53:34 PM by Bell 407 »

RodBearden

  • Hero Member
  • *****
  • Posts: 9128
    • Rod's RadarBox Downloads
Re: How to convert Hex to Binary code for the D008.dat file?
« Reply #1 on: April 10, 2010, 02:58:06 PM »
Hi Marc I just Googled "hex to binary converter" and came up with http://easycalculation.com/hex-converter.php

It converts 80018B as 100000000000000110001011

In point 2, I think your process is correct.

Rod
Rod

Bell 407

  • Full Member
  • ***
  • Posts: 124
Re: How to convert Hex to Binary code for the D008.dat file?
« Reply #2 on: April 10, 2010, 03:02:02 PM »
Rod, thanks. As always you are extremely quick with your replies.

OK, I will give it a try and see if it works. If it does it will allow me to "fix" a number of incorrect Country Flags that are displayed for aircraft now registered in South Africa.

Anybody else given this a try before?

Cheers,

Marc

RodBearden

  • Hero Member
  • *****
  • Posts: 9128
    • Rod's RadarBox Downloads
Re: How to convert Hex to Binary code for the D008.dat file?
« Reply #3 on: April 10, 2010, 03:03:57 PM »
I've done it myself (some time ago) for a local air ambulance which doesn't always broadcast a Flight ID.

Works a treat!

Rod
Rod

DaveReid

  • Hero Member
  • *****
  • Posts: 1815
    • Heathrow last 100 ADS-B arrivals
Re: How to convert Hex to Binary code for the D008.dat file?
« Reply #4 on: April 10, 2010, 03:07:51 PM »
The thing that is getting to me is how do I convert the Hex code to Binary (24 character) code? They say all you need is a calculator?!?!?!

If you have any version of Windows, you already have what you need:  Start -> Accessories -> Calculator

Select View -> Scientific, and then use the radio buttons to toggle between hex and binary.  The only gotcha is that the Windows Calculator strips out leading zeroes, so if your hex code is less that 800000 you will need to add them back in to make 24 bits.
This post has been scanned for any traces of negativity, bias, sarcasm and general anti-social behaviour

Bell 407

  • Full Member
  • ***
  • Posts: 124
Re: How to convert Hex to Binary code for the D008.dat file?
« Reply #5 on: April 10, 2010, 03:13:14 PM »
Thanks to all. I have just given it a bash and it has corrected a flag from USA to ZA. Now there is a bit of donkey work ahead of me to clean up the database.

To be honest there was a bit of trepidation in messing around with the RadarBox programme files but it seems to work fine. Just make sure you back up your files before using them.

Cheers,

Marc