wr_test1 Posted April 25, 2004 Report Posted April 25, 2004 Hello ! Someone can help me, I need a code in delphi for capturing a Latitude and Longitude from fsuipc and convert it to correct degrees. please help :/ Regards,
bydamien Posted November 27, 2006 Report Posted November 27, 2006 i have a same problem, are you fixed ? regards Burak M.
Pete Dowson Posted November 27, 2006 Report Posted November 27, 2006 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
bydamien Posted November 27, 2006 Report Posted November 27, 2006 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
Pete Dowson Posted November 27, 2006 Report Posted November 27, 2006 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 latitudeVariable 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
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