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
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now