Dragonsigns Posted October 16, 2009 Report Posted October 16, 2009 Heading Indicator not returning same result. Heading Displays 30 Dec but my code returns 18 Dec. double Heading = 0; double Variation = 0; result = fsuipc.FSUIPC_Read(0x0580, 4, ref token, ref dwResult); result = fsuipc.FSUIPC_Process(ref dwResult); result = fsuipc.FSUIPC_Get(ref token, ref dwResult); Heading = dwResult; result = fsuipc.FSUIPC_Read(0x02A0, 4, ref token, ref dwResult); result = fsuipc.FSUIPC_Process(ref dwResult); result = fsuipc.FSUIPC_Get(ref token, ref dwResult); Variation = dwResult; Heading = Heading * 360 / (65536.0 * 65536.0); Variation = Heading - (Variation * 360 / 65536.0); if (Variation < 0) { Variation += 360; } else if (Variation > 360) { Variation -= 360; } textBox11.Text = String.Format("{0:#}", Variation) + " Dec";
Pete Dowson Posted October 16, 2009 Report Posted October 16, 2009 Heading Indicator not returning same result. Heading Displays 30 Dec but my code returns 18 Dec. You posted this twice. I responded to the first one I saw. Pete
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now