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 Dragonsigns said: 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
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