Jump to content
The simFlight Network Forums

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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

  • 3 months later...
Posted

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,

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.