lordofwings Posted February 1, 2013 Report Share Posted February 1, 2013 I am using FSUIPCClient.dll (.NET) to connect to FSX. I wrote a simple program to experiment with the connect/disconnect behaviour so I started by simply monitoring GPS latitude, GPS longitude and GPS altitude and a few others. According to the documentation offset 0x030C (aircraft vertical speed) the value is updated while airborne. However, it does not specify whether these 4 bytes represent a Single or Integer value. With Single I was getting very bad results, apparently it works better with integer. However, I noticed that the offset's Value property returns something that doesn't match what you see on the V/S gauge or its tooltip. For example, in this flight (C172) during climb the gauge showed exactly on the +400 fpm line but the value obtained with the offset read +485 fpm. Also, the offset doesn;t say the units (FPM or MPM). In observing the values I noticed the difference changes considerably, sometimes it is off by 200 units or more. Link to comment Share on other sites More sharing options...
Pete Dowson Posted February 1, 2013 Report Share Posted February 1, 2013 I am using FSUIPCClient.dll (.NET) to connect to FSX. I wrote a simple program to experiment with the connect/disconnect behaviour so I started by simply monitoring GPS latitude, GPS longitude and GPS altitude and a few others. You entitled this thread "GPS Altitude not working", yet I see no further reference to this. Why is that? According to the documentation offset 0x030C (aircraft vertical speed) the value is updated while airborne. However, it does not specify whether these 4 bytes represent a Single or Integer value. With Single I was getting very bad results, apparently it works better with integer. I have no idea what you mean by "Single" (is this a term applicable to whichever .NET language you are using?), but as a programmer you must know that a 4 byte value contains 32-bits (4 x 8 ), which is the standard integer size in a 32-bit process (as of course both FS9 and FSX are). You therefore need to use whatever variable type a 32-bit integer is in the language you've chosen. However, I noticed that the offset's Value property returns something that doesn't match what you see on the V/S gauge or its tooltip. For example, in this flight (C172) during climb the gauge showed exactly on the +400 fpm line but the value obtained with the offset read +485 fpm. Are you converting it properly into FPM? Sounds like you are not! Also, the offset doesn;t say the units (FPM or MPM). If you refer to the offset documentation again, you will see that this offset is only a COPY of the proper V/S at 02C8. Unless you are only wanting touchdown speed (which is what this is for) you should be using 02C8. If you bothered to refer to 02C8 you will see it clearly says that the units are in 256ths of a metre/sec. It even tells you how to convert it!!! Pete Link to comment Share on other sites More sharing options...
lordofwings Posted February 1, 2013 Author Report Share Posted February 1, 2013 You entitled this thread "GPS Altitude not working", yet I see no further reference to this. Why is that? I have no idea what you mean by "Single" (is this a term applicable to whichever .NET language you are using?), but as a programmer you must know that a 4 byte value contains 32-bits (4 x 8 ), which is the standard integer size in a 32-bit process (as of course both FS9 and FSX are). You therefore need to use whatever variable type a 32-bit integer is in the language you've chosen. Are you converting it properly into FPM? Sounds like you are not! If you refer to the offset documentation again, you will see that this offset is only a COPY of the proper V/S at 02C8. Unless you are only wanting touchdown speed (which is what this is for) you should be using 02C8. If you bothered to refer to 02C8 you will see it clearly says that the units are in 256ths of a metre/sec. It even tells you how to convert it!!! Pete My mistake, I was originally going to post about the GPS altitude but this more important issue came by. However, I am mentioning what I observed by monitoring the V/S at the given offset as documented in your latest PDF. No need to get so hostile Pete, Jesus, take it easy man. I cross referenced to the FSUIPC.NET Client document which indicated that for a 4 byte FSUIPC value, it could either be a single precision value or an integer. Link to comment Share on other sites More sharing options...
Pete Dowson Posted February 1, 2013 Report Share Posted February 1, 2013 I am mentioning what I observed by monitoring the V/S at the given offset as documented in your latest PDF. No need to get so hostile Pete, Jesus, take it easy man. Not hostile, just don't understand why you don't read what it says. Those two entries in the offsets lists have not been changed in years, having been correct all that time. And I don't understand how you can misunderstand them. As I said, you are even told how to convert to fpm. I cross referenced to the FSUIPC.NET Client document which indicated that for a 4 byte FSUIPC value, it could either be a single precision value or an integer. Sorry, you'll need to ask Paul about that document. In my document all numerical values are integers unless otherwise stated as Doubles (64-bit floating point), or Floats (32-bit floating point). However, the units may indicate that they are effectively fixed point rational numbers in integer format, hence the conversions. 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