Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hello everybody,

does anyone know how to derive the name of a VOR/NDB composed of 3 letters? FSUIPC provides the relative offsets for example VOR1 Identity is reported in the offset 3000 which is composed of 6 bytes but I don't understand how to get the letters from the string.

Thanks for your help.🙃

Valerio

Posted
3 hours ago, BABA767 said:

does anyone know how to derive the name of a VOR/NDB composed of 3 letters? FSUIPC provides the relative offsets for example VOR1 Identity is reported in the offset 3000 which is composed of 6 bytes but I don't understand how to get the letters from the string.

How are you trading the offset? For example, in lua you would use
    n = ipc.readSTR(offset, length)

John

 

Posted

Hi John,

I read the offset by SIOC (iocp console) and see a string of bits but I'm trying to figure out how to get the identified VOR (or NDB) in letters..

cheers,

V.

Posted

..just add a photo to show what I would like to understand; in practice on the offset 3000 I read a bit string with the decimal value next to it but I don't understand the relationship between the string and the VOR ident in the example highlighted the Ident corresponds to the letters OST.

In lua I would read the same string?

Valerio

image.thumb.jpeg.aafa413b5b26333bd615ad6183830972.jpeg

Posted
1 hour ago, BABA767 said:

.just add a photo to show what I would like to understand; in practice on the offset 3000 I read a bit string with the decimal value next to it but I don't understand the relationship between the string and the VOR ident in the example highlighted the Ident corresponds to the letters OST.

Every variable type is a sequence of bits, whether it is a string, an integer, a floating point number or any other type. You just have to read it as a string. Each letter is one byte / 8 bits:
   O = 0x4F (Virtual Key Code) = 01001111
   S = 0x53 = 01010011
   T = 0x54 = 01010100

And so the string  OST in binary is (in reverse order - how strings are stored) :
     
010101000101001101001111
which is what your picture shows. And 010101000101001101001111 as an integer is 5526351, also as your picture shows.

1 hour ago, BABA767 said:

In lua I would read the same string?

As I said, to read it as a string in lua you would use
    n = ipc.readSTR(offset, length)

John

Posted
3 hours ago, John Dowson said:

Every variable type is a sequence of bits, whether it is a string, an integer, a floating point number or any other type. You just have to read it as a string. Each letter is one byte / 8 bits:
   O = 0x4F (Virtual Key Code) = 01001111
   S = 0x53 = 01010011
   T = 0x54 = 01010100

And so the string  OST in binary is (in reverse order - how strings are stored) :
     
010101000101001101001111
which is what your picture shows. And 010101000101001101001111 as an integer is 5526351, also as your picture shows.

John this is exactly the explanation I was looking for!
I didn't know how to interpret the string, maybe it is reported in the FSUIPC manual anyway, problem solved😊
thank you!
V.

  • Upvote 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.