Jump to content
The simFlight Network Forums

FSUIPC Offset for AP HDG


Recommended Posts

Hello,

Is there an offset or way for me to have the AP HDG bug align with the current heading. I know that there is an AP HDG Offset that allows me to set the heading based on the equation: headingbug desired * (65536/360). Is there an offset that will set the AP HDG to the current HDG...or do I have to write an add-on to do this...

Any heap is greatly appreciated!

Gil

Link to comment
Share on other sites

Is there an offset or way for me to have the AP HDG bug align with the current heading. I know that there is an AP HDG Offset that allows me to set the heading based on the equation: headingbug desired * (65536/360). Is there an offset that will set the AP HDG to the current HDG...or do I have to write an add-on to do this...

No, there's no such offset. Normally you'd just wind the A/P heading knob until the readout matches the compass heading, before pressing the A/P HDG mode select button.

There is an FS control, assignable to key or button, to do it -- "AP HDG HOLD" -- but this also enables the hold. It's the same as setting the value then pressing the hold button. You could send it twice, to toggle the mode on then off immediately. If you must use offsets you can send any control via offset 3110.

Or you can do it via a Lua plug-in, so

hdg = ipc.readSW(0x582) -- Gets current TRUE heading, in same units as AP Hdg
hdg = hdg - ipc.readSW(0x2A0) -- convert to MAGNETIC by subtracting Mag Var
ipc.writeSW(0x7cc, hdg) -- write to the A/P Hdg bug[/CODE]

Regards

Pete

Link to comment
Share on other sites

Hi Pete,

Thank you for the reply. I may have misled you in what I wrote so I apologize. I only need the heading bug to slew to the current compass heading when I "press" a pushbutton (the pushbutton portion of the rotary encoder used to "rotate" my heading bug); however, I do not need to enable the AP master or HDG mode on the AP.

However, your response really demonstates the power of Lua so I need to get off my duff and figure it out. Which I will do. While I am sure you have heard this a thousand times, I want to extend my true apprecaition for FSUIPC and your effort. This morning, I was flying (for real) with a student as we were practicing an ILS and a VOR-A approach. It was a beautiful morning CAVU, light winds, and the student did a great job. We pushed the airplane back into the hangar and my student left. Then I turned on my "sim"...I flew multiple appraoches to several airports to minimums. I had just as much fun flying my sim as I did my airplane. This would have not been possible without FSUIPC, your effort, and countless others. My hat is "off" to you as much as it is to Clyde Cessna. Thank you.

Link to comment
Share on other sites

Hi Pete,

Thank you for the reply. I may have misled you in what I wrote so I apologize. I only need the heading bug to slew to the current compass heading when I "press" a pushbutton (the pushbutton portion of the rotary encoder used to "rotate" my heading bug); however, I do not need to enable the AP master or HDG mode on the AP.

No, you did not mislead me -- this is why i suggested sending the AP Heading Hold control twice, rapidly, because that would set the heasding bug to your current heading and flick the A/{ on and off so quickly it wouldn't do anything (oh, except just possibly sound the disconnect warning. I don't know if doing it rapidly can avoid that or not).

I found the LUA documentation and I can't believe how powerful this is. And easy to understand and implement. I'm off and running. Thanks again!

Okay, have fun!

Pete

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.