Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi Pete,

I'm working on a small project to gather some info about my flights.

I'm having some problems with the ground Altitude. 

Lets say that I'm in an airport at 23 ft, and after take off while the plane starts going over higher terrain some times the Ground altitude provided by FSIPC goes up time 1038942500 ft!!

Im using Offset &HB4C value and then mutiply by 3.28084.

My FSUIPC version is 6.008 and P4D v4.5

Do you have any idea what could be going on here?

Best regards!

 

Posted
2 hours ago, TomasContreras said:

Lets say that I'm in an airport at 23 ft, and after take off while the plane starts going over higher terrain some times the Ground altitude provided by FSIPC goes up time 1038942500 ft!!

Im using Offset &HB4C value and then mutiply by 3.28084.

Considering that the value at 0B4C is only 16 bits long (2 bytes), its value cannot possibly be more than 65535, when treated as a positive short integer. This multiplied by 3.28084 therefore cannot be greater than 215,010.  In fact, however, of course it is a signed value so it ranges from -32768 to +32768, giving a maximum altitude possible to read of 107,503 feet.

I suspect you are reading it as a 32-bit (4-byte) value and are therefore also including some unspecified 16 bits beyond.

If you want a 32-bit value and more accuracy use offset 0020 as it suggests in the offsets list.

Pete

 

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.