arnthelge Posted September 25, 2003 Report Posted September 25, 2003 Hi, I am trying my best to make a little utility to keep track of active AI aircraft in the area. It is supposed to be some what a traffic board for AI spotting. I have managed to read values like GS, VS, HDG. Now I am trying to figure out how to read latitude, longitude and altitude for AI aircraft. I cannot seem to find out how. The FSU SDK says: float lat; // 32-bit float, in degrees, –ve = South float lon; // 32-bit float, in degrees, –ve = West float alt; // 32-bit float, in feet I have read the four bytes, but where do I go form here? How do I convert the 32bit float into lat, lon and altitude? Hope someone can help me... :shock: Regards, Arnt Helge Haland
Pete Dowson Posted September 25, 2003 Report Posted September 25, 2003 I have read the four bytes, but where do I go form here? How do I convert the 32bit float into lat, lon and altitude? No conversion is necessary. The values are 32-bit floating point values, which are supported as standard on all Intel type PCs. They already are latitude, longitude (both in degrees) and altitude (in metres), as described. You should read them into variables declared as float (for C/C++) or whatever the equivalent is in the language you are using. If it is not C/C++ please look up in your programming book to find out about floating point numbers and how to declare them and use them. Regards, Pete
arnthelge Posted September 26, 2003 Author Report Posted September 26, 2003 Thanks Pete, I finally managed to figure out how to read it in VB. :D Arnt
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