Jump to content
The simFlight Network Forums

Getting GPS information


Recommended Posts

I'm trying to get the GPS name string from FS, it says the length is 6 and the type is a string, however the program tends to hang and produce an error that asks me to send information to Microsoft. I'm programming in VB and it seems like I can only get numreric variables from FSUIPC but not strings.

Here's a code-sample:

If FSUIPC_Read(&H60A4, 6, VarPtr(Tmp), dwResult) Then

If FSUIPC_Process(dwResult) Then

ArrICAO = Tmp

End If

End If

Text1.Text = ArrICAO

This only produce a value around 20000, and not the ICAO which currently should be KPHX.

Link to comment
Share on other sites

Ok,

If you are reading strings from FSUIPC you need to convert them into charecters from the ASCII table.

First grab the info until you you find the 0 byte. This will let you know that the string of bytes have ended.

Put them into an array.

Then you can loop through the array with MyByte = MyByte & Chr(YourByte(2))

Hope this helps,

Mike

Link to comment
Share on other sites

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.