russellbdavis Posted June 11, 2010 Report Posted June 11, 2010 greetings, If this topic has been covered I do apologize. I'm just now getting back into using the FSUIPC library and have hit a roadblock. I am using FSX to playback research data captured from a Boeing 737 simulator, and an Airbus. I am attempting to pass the lat/long pairs to the proper offsets using FSUIPC. My lat/long pairs are in the form 40.xxx, -75.xxx, etc. Does someone have the proper equation to convert these to the 8 bit doubles needed for the proper FSUIPC_Write function? I am using VB6.0 and I think it does not support 64 bit doubles, I am getting an overflow error. Thanks.
Pete Dowson Posted June 11, 2010 Report Posted June 11, 2010 My lat/long pairs are in the form 40.xxx, -75.xxx, etc. Does someone have the proper equation to convert these to the 8 bit doubles needed for the proper FSUIPC_Write function? The FS coordinates are not "8 bit doubles" or even "8 byte doubles", but 64-bit fixed point integers. Doubles are floating point, something completely different from "fixed point"! The formulae are given in the Offset tables which are included in the documentation in the FSUIPC SDK. I'm rather surprised that you are attempting to interface to FSUIPC without reference to the SDK. I am using VB6.0 and I think it does not support 64 bit doubles. It certainly does support 64-bit doubles -- they are the only "doubles" any 32-bit language supports on Intel type processors. However, it is not doubles you need. Please do refer to the documentation. You need 64-bit integers, defined by __int64 in Microsoft C/C++, and probably something along those lines in Microsoft VB. You need a reference guide for VB to determine the correct declaration. I have seen folks refer to something called "currency", but that seems rather obtuse to me. It might just be "Long", but that is a 32-bit integer in 32-bit C/C++ compilers. Some references talk about "long long" but that's probably an ANSI or ISO C/C++ type. Regards Pete
russellbdavis Posted June 12, 2010 Author Report Posted June 12, 2010 Yes Pete I am using the SDK, I just purchased it a few days ago. And yes it appears double is a falacy on my part. I will look into the integer variables. But I'm not certian, but I think VB 6.0 does not have a 64 bit integer type. I am aware of the currency type and that may be the solution. Thanks.
Pete Dowson Posted June 12, 2010 Report Posted June 12, 2010 Yes Pete I am using the SDK, I just purchased it a few days ago. The SDK is free. I hope no one has charged you for it! Regards, Pete
Paul Henty Posted June 12, 2010 Report Posted June 12, 2010 ... but I think VB 6.0 does not have a 64 bit integer type. I am aware of the currency type and that may be the solution. Hi Russell, Yes you need to use currency as that's actually a 64bit integer in VB6. The code at the top of the following thread shows how to read the lon and lat in VB6. You just need to reverse the process to write them. http://forums.simflight.com/viewtopic.php?f=54&t=72968&start=0&st=0&sk=t&sd=a Paul
russellbdavis Posted June 12, 2010 Author Report Posted June 12, 2010 Pete, I purchased a license for FSUIPC for FSX at simMarket. And then I obtained the FREE SDK.
russellbdavis Posted June 12, 2010 Author Report Posted June 12, 2010 ... but I think VB 6.0 does not have a 64 bit integer type. I am aware of the currency type and that may be the solution. Hi Russell, Yes you need to use currency as that's actually a 64bit integer in VB6. The code at the top of the following thread shows how to read the lon and lat in VB6. You just need to reverse the process to write them. http://forums.simflight.com/viewtopic.php?f=54&t=72968&start=0&st=0&sk=t&sd=a Paul Thanks Paul, this will help me greatly.
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