homer09001 Posted February 10, 2008 Report Posted February 10, 2008 i copied the code form the example in the SDK for C# but im getting a value of 0 when pulling the longitude from FS? the code: double longHi = 0; double longLo = 0; double longitude = 0; // Get longitude result = fsuipc.FSUIPC_Read(0x056C, 4, ref token, ref dwResult); result = fsuipc.FSUIPC_Process(ref dwResult); result = fsuipc.FSUIPC_Get(ref token, ref dwResult); longHi = dwResult; result = fsuipc.FSUIPC_Read(0x0568, 4, ref token, ref dwResult); result = fsuipc.FSUIPC_Process(ref dwResult); result = fsuipc.FSUIPC_Get(ref token, ref dwResult); longLo = dwResult; if (longLo != 0) { longLo = longLo / (65536.0 * 65536.0); } if (longHi > 0) { longitude = longHi + longLo; input3.Text = Convert.ToString(Convert.ToInt32(longitude)); } else { longitude = longHi - longLo; input3.Text = Convert.ToString(Convert.ToInt32(longitude)); }
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