PHILC67 Posted March 13, 2005 Report Share Posted March 13, 2005 Pete, First off... FSUIPC is a wonderful product! I recently purchased my own license so I can "play" with FS2004 via your powerful tool. I'm trying to extract the "next waypoint" latitude and longitude information from the GPS offsets ($60AC, $60B4). I seem to be getting crazy results in boht 8-byte segments. I have no problem getting the latitude and longitude of the aircraft from the standard offsets ($0560, $0568). I do have an active Flight Plan loaded. I am using Delphi 6 Professional. (code shown below) Might you have any suggestions? Thanks much! Phil FSUIPC_Read($60AC, 8, @eLat, dwResult); if FSUIPC_Process(dwResult) then begin Latitude := eLat * 90.0 / (10001750.0 * 65536.0 * 65536.0); end; FSUIPC_Read($60B4, 8, @eLon, dwResult); if FSUIPC_Process(dwResult) then begin Longitude := eLon * 360.0 /(65536.0 * 65536.0 * 65536.0 * 65536.0); end; Link to comment Share on other sites More sharing options...
Pete Dowson Posted March 13, 2005 Report Share Posted March 13, 2005 I'm trying to extract the "next waypoint" latitude and longitude information from the GPS offsets ($60AC, $60B4). I seem to be getting crazy results in boht 8-byte segments... Might you have any suggestions? You seem to be applying the conversions needed for the aircraft positon at 0560, 0568 to those from the GPS too! Why are you doing that? It clearly says in the documentation provided that the GPS values are double floating point degrees. You just read then into a normal 64 bit floating point value and don't multiple or divide them by anything. Please, if in doubt, always look things up in the documentation. That is what it is for! Also, if you look carefully in the FSUIPC SDK package you will find a program called FSInterrogate. There's documentation for it too. If you run that, and use it to load the FSUIPC.FSI file I worked so hard on, you will find you can read all these things and see the values obtained. You will see immediately that the GPS values are 64 bit floating point values. Please check both ways. Regards, 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