GaryO Posted October 7, 2003 Report Posted October 7, 2003 Hi There, Im writing some software to write a LAT/LONG to FS to send the aircraft to it. Its basically meaning we can use MSFS outside view and X-Plane for the flight model. Problem is i cant get my head round converting a Long/Lat to the FS format FSUIPC requires. I did a quick search on the forum and found nothing. Has anyone got any code in any language? I can convert it, Delphi would be especially good. Thanks Gary Oliver
Pete Dowson Posted October 7, 2003 Report Posted October 7, 2003 Problem is i cant get my head round converting a Long/Lat to the FS format FSUIPC requires. I did a quick search on the forum and found nothing. Has anyone got any code in any language? I can convert it, Delphi would be especially good. The formulae together with hints on converting them are provided in the FSUIPC SDK. Regards, Pete
GaryO Posted October 8, 2003 Author Report Posted October 8, 2003 Ahhh, Solved it, before i was using doubles for reading. But had a quick browse to see delphi had a COMP datatype which allows the 64 integers so a nice simple conversion to write. Sorry bout that. Gaz
Pete Dowson Posted October 8, 2003 Report Posted October 8, 2003 Solved it, before i was using doubles for reading. But had a quick browse to see delphi had a COMP datatype which allows the 64 integers so a nice simple conversion to write. Sorry bout that. No need to apologise. It is possible to manipulate the values with two parts, derived from the two 32-bit values -- but you have to read them as regular integers not floating point, then convert them. The complication then comes in dealing correctly with the sign -- the high part is signed, the lower part is not, of course, but effectively has the same sign as the upper part. If Delphi supports 64-bit integers then it is definitely MUCH easier, so well done for finding that. I think some C/C++ compilers support a "long long" which I think is the same. Regards, Pete
jjjanezic Posted January 30, 2004 Report Posted January 30, 2004 Hi GaryO, we have the same idea as you and I had a few questions about the XPlane Aerodynamics and MS Visualisation, but in your profile I cannot see your Mail-adress. Could you please contact me? Thanks,
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