Jump to content
The simFlight Network Forums

Recommended Posts

  • 2 years later...
Posted
i have a same problem, are you fixed ?

Why is there any problem? I don't know Delphi, but the conversion is only arithmetic, involving multiplications and divisions only, as documented. I'm certain Delphi can do such things -- have a look at FSInterrogate, which is written in Delphi.

Regards

Pete

Posted

hi pete i explaining for you.

my plain on KFJK fs-interrograte2 give to 19389166912339968 this for latitude and give to -3780828464629678080 for longtitude

our program is give 40,6224209853394 this for latitude and give 0,378391984002775 for longtitude

this is longtitude function

function GetLon: Int64;

var

deger : Int64;

begin

FSUIPC_Open(SIM_Any,dwResult);

FSUIPC_Read($0560, 8, @deger, dwResult);

if FSUIPC_Process(dwResult) then

begin

Result := deger * 360 / (65536.0 * 65536.0 * 65536.0 * 65536.0);

end else

begin

Result := -100;

end;

end;

and

this is

function GetLat: Int64;

var

deger : Int64;

begin

FSUIPC_Open(SIM_Any,dwResult);

FSUIPC_Read($0560, 8, @deger, dwResult);

if FSUIPC_Process(dwResult) then

begin

Result := deger * 90 / (10001750.0 * 65536.0 * 65536.0);

end else

begin

Result := -100;

end;

end;

FS Interrogate2 say for latitude

Variable type Int64 and expression #*90/(10001750*65536*65536)

FS Interrogate2 say for longtitude

variable type Int64 and expression #*360/(65536*65536*65536*65536))

where is my problem ?

thank you for your helps

Regards

Burak ÖĞÜTKEN

Posted

my plain on KFJK fs-interrograte2 give to 19389166912339968 this for latitude and give to -3780828464629678080 for longtitude

These are not the "factored" values, which would be in degrees.

our program is give 40,6224209853394 this for latitude and give 0,378391984002775 for longtitude

For where? 40.62 degrees North and 0.378 degrees West? How can I tell where you are?

Result := deger * 360 / (65536.0 * 65536.0 * 65536.0 * 65536.0);

Is "Result" a floating point value? I don't see it defined anywhere. If it is an integer value it cannot retain any good value.

FS Interrogate2 say for latitude

Variable type Int64 and expression #*90/(10001750*65536*65536)

FS Interrogate2 say for longtitude

variable type Int64 and expression #*360/(65536*65536*65536*65536))

Yes, as does the documentation. And what is the result in FSInterrogate? You don't say. How can I compare your result?

Pete

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.