Jump to content
The simFlight Network Forums

GPS Altitude not working


Recommended Posts

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

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

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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.