gravedig2 Posted August 30, 2009 Report Share Posted August 30, 2009 I am sorry if this has been already posted or is in the FSUIPC SDK Manual, but doesn't anybody have the offset for ground speed for VB? I know altitude is "&H570" and "lat" is "&HB560", but I don't know what GS is. Also, is there a website that can easily convert the offsets in the SDK Manual to the ones for VB? Thanks! Link to comment Share on other sites More sharing options...
Pete Dowson Posted August 30, 2009 Report Share Posted August 30, 2009 I am sorry if this has been already posted or is in the FSUIPC SDK Manual, but doesn't anybody have the offset for ground speed for VB? I know altitude is "&H570" and "lat" is "&HB560" B560 is not correct for Latitude! It is 0560. You need to look in the document provided in the FSUIPC SDK, the one called "FSUIPC for Programmers". ... is there a website that can easily convert the offsets in the SDK Manual to the ones for VB? Thanks! They don't need "converting". The offsets are provided in hexadecimal, used in C/C++ as "0x..." and in VB as "&H ...". there's just different conventions for telling the compiler they are hexadecimal numbers instead of decimal, that's all! Pete Link to comment Share on other sites More sharing options...
gravedig2 Posted August 30, 2009 Author Report Share Posted August 30, 2009 Thanks, now... Know I am asking stupid questions but the offset for Ground Speed, 02B4, comes with the description of "GS: Ground Speed, as 65536*metres/sec. Not updated in Slew mode!". Do you have to multiply it by 65536, or just use it as is, because when I use the variable without doing anything to it, it is comes as entirely different numbers every time, and not the actual in game GS. Thanks! Link to comment Share on other sites More sharing options...
Pete Dowson Posted August 30, 2009 Report Share Posted August 30, 2009 ... the offset for Ground Speed, 02B4, comes with the description of "GS: Ground Speed, as 65536*metres/sec. Not updated in Slew mode!". Do you have to multiply it by 65536, or just use it as is, because when I use the variable without doing anything to it, it is comes as entirely different numbers every time, and not the actual in game GS. Thanks! When it says "as ..." it means that is how it is stored there -- in other words in units of 1/65536ths of a metre per second. If you want whole numbers of metres per second, rounded down, just divide it by 65536, or shift right 16 bits which amounts to the same thing. If you want more accuracy, copy it to a floating point variable and then divide by 65536 so you get the fraction too. Please try using the FSInterrogate program provided in the SDK to help you understand things better. That is what it is for. You can see all the representations, side by side, in real time as they are changing. Pete Link to comment Share on other sites More sharing options...
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