Jump to content
The simFlight Network Forums

Recommended Posts

Posted

I'm using Delphi2007 to get altitude with $ 0570 using (* 3.28084 / (65536 * 65536)). But the result is a huge number with 8 digits.

please, help

my code

 
var
  altitude: comp;
begin 
  if FSUIPC_read($570, 8, @altitude, dwResult) then
  if FSUIPC_Process(dwResult) then
   altitude :=  altitude * 3.28084/(65536.0*65536.0);
  altitude := round(altitude);
end;

 

Posted

What actual value of altitude does  that expression give when it is executed?

 

Read the description of $0570 - it isn't what you think it is.

 

altitude := altitude * 3.28084/(65536.0*65536.0);

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.