lordofwings Posted May 26, 2007 Report Posted May 26, 2007 I am playing with the C# version and noticed it does not have a member to read doubles (Float64) items from FSUIPC. I am trying to read the payload stations, and for example while the weight of the first station (0x1400) displays on FS as 2720, when I read an 8 byte array (don't know how to convert that) I get [0] = 0 [1] = 0 [2] = 0 [3] = 0 [4] = 0 [5] = 64 [6] = 165 [7] = 64 I come up with numbers much much greater than 2720 pounds! How can I read doubles from what FS returns?
lordofwings Posted May 26, 2007 Author Report Posted May 26, 2007 Ah, got it: in C# use the BitConverter.ToDouble(byte[]) method, that does it.
Paul Henty Posted May 27, 2007 Report Posted May 27, 2007 Incase you don't already know, I have a .NET dll available for interfacing with FSUIPC. It has a number of advantages over the original SDK, for example it has support for doubles and it's object-oriented rather than procedural. Details and download in the sticky near the top of this forum. Paul
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