YankeeFan Posted July 28, 2003 Report Posted July 28, 2003 Hi, I am trying to retrieve the Ground Speed shown in the GPS, and the only offset I found in the FSUIPC SDK was located at offset (02B4), 4 bytes, "GS: Ground Speed, as 65536*metres/sec. Not updated in Slew mode!" During a flight where I was showing 385GS in the GPS, the value returned at this offset location was 1297.9 I am not clear on how to convert the value to knots based on the description. If somebody could show me an example of what formula to use for the conversion, I would surely appreciate it. Thanks in Advance! John "YankeeFan" McCormack
Pete Dowson Posted July 28, 2003 Report Posted July 28, 2003 GS: Ground Speed, as 65536*metres/sec. Not updated in Slew mode!" During a flight where I was showing 385GS in the GPS, the value returned at this offset location was 1297.9 I am not clear on how to convert the value to knots based on the description. A knot is a nautical mile per hour. There are 60 seconds in a minute and 60 minutes in an hour. Therefore to convert metres/sec to metres/hour, multiply by 60 x 60 or 3600. Now you need to convert metres to nautical miles. Since there are 1852 metres in a nautical mile, you divide by 1852.giving you nautical miles per hour, which are knots. However, this is never going to make 1297.9 anything like 385. So my question to you is: How are you reading a 32-bit integer as 1297.9 anyway? There are no fractions in integers. Pete
YankeeFan Posted July 29, 2003 Author Report Posted July 29, 2003 Hi Pete, Thanks for the very quick reply! I discovered I was using the wrong type variable, I changed to a Long Integer and the value returned showed 12978711. So the formula that I used to convert this to GS Knots is as follows; Long32Bit = 12978711 (this is the value returned from offset) GS = Long32Bit / 65536# GS = GS * 3600# / 1852# The above resulted in GS = 384.96 which appears to be correct according to the GPS window shown in the a/c. I've tried diff. speeds and it seems to be accurate. If you see anything incorrect with the above formulas, please let me know and thanks again! John McCormack
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