pub00515 Posted May 21, 2004 Report Posted May 21, 2004 Hi! I've just begun using FSUIPC and I'm having difficulty accessing pitch information from FS. I am able to read the data, just don't know how to get a reasonable value! According to the documentation, the size of pitch is 4, so I have an array of 5 chars. But how do I convert this array into a reasonable double or float value? I don't have a lot of experience with bytes and memory so I'd be grateful if someone could give me a small hint on how to proceed! Thanks a lot, Mark
Pete Dowson Posted May 21, 2004 Report Posted May 21, 2004 According to the documentation, the size of pitch is 4, so I have an array of 5 chars. But how do I convert this array into a reasonable double or float value? Don't read it into an array of characters. The 4 byte length is simply the length of the number -- it is 32 bits (4 x 8 = 32), i.e. a standard Integer. Just read it into an integer. The you can copy it into a double or whatever afterwards and perform the conversion to degrees. Pete
pub00515 Posted May 22, 2004 Author Report Posted May 22, 2004 Thanks a ton, Pete! Now why didn't I think of that :-) Regards, Mark
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