TomasContreras Posted June 12, 2020 Report Posted June 12, 2020 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!
Pete Dowson Posted June 12, 2020 Report Posted June 12, 2020 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
TomasContreras Posted June 20, 2020 Author Report Posted June 20, 2020 (edited) It was a bug on my end. Both offsets work perfectly. Thanks Pete Edited June 20, 2020 by TomasContreras
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now