Jump to content
The simFlight Network Forums

Afin

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Afin

  1. hi pete and everyone,

    I'm glad to know you Pete. You are genius and really kind. :)

    I'm trying to understanding the bgl file structure in fs2004. I have read analysis about new bgl file structure from Winfried Orthmann:

    http://www.scenery.org/_downloads/newbgucture.zip.

    There are thing I want to ask, about the ICAO data type coding.

    It's said on the "newbglfilestructure.pdf":

    ICAO Identifiers and region codes are coded in a special format. Each number and letter has a value from 0 .. 37:

    blank = 00

    digits 0 .. 9 = 02 .. 11

    letters A .. Z = 12 .. 37

    The code is calculated by starting from left: the value of the first digit/letter is multiplied by 38, then the value of the next digit/letter to the right is added, the sum s multiplied by 38, and as long as there are more digits/letters this process is repeated. The region codes have only 2 digits/letters and the result is used as such; for the ICAO identifiers for airports, ILS, VOR, NDB and waypoints there are up to 5 digits/letters, and the result is shifted left by 5 positions, i.e. multiplied by 0x20. Bits 0 .. 4 of the resulting DWORD are frequently used for other purposes.

    The ICAO identifiers for primary and secondary ILS in a runway record are not shifted.

    I am trying to decompile the bgl file with the airport ICAO code "WIPR" and found the coded dword on the bgl is "03 9D 93 E1". And then I am manually calculated the coded dword for "WIPR" And here is my calculation:

    value of "W"= 34

    value of "I"= 20

    value of "P"= 37

    value of "R"= 39

    (34* 38 )= 1292 + 20 = 1312*38 = 49856 +37 = 49893*38=1895934+39=

    1895973 * 38 = 72046974(decimal) = 44B597E (hexadecimal) shift left by 5 = 896B2FC0 (result).

    The result is really different with the coded dword I found on the bgl. Is there something I've done wrong?

    Pete, can you give more explanation about ICAO data type coding? How "WIPR" coded so that it become ""03 9D 93 E1"? I have also attach the bgl file I used on this post.

    Thank you very much,

    Arifin

    Sorry for my bad English.

    AF2_WIPR.zip

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.