Sign in to follow this  
airmiller

Autopilot Heading

Recommended Posts

HI,I'm trying to find the code that will make my Heading gauge active (armed)without the AP master being on; so, that the HDG light on my autopilot gauge is on and waiting for the AP master switch be be turned on to initiate the desired turn.I've tried different K codes and (A:Autopilot Heading Lock, bool), etc. I've tried to have it turn on when the panel is loaded but no luck.Any help will be appreciated.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

I've been wondering about this myself. Sorry I can't answer, hope someone has a solution.Setting the heading bug on a directional gyro doesn't turn on the AP, but setting the AP Panel Heading does. Doesn't make sense really.

Share this post


Link to post
Share on other sites

Well, you can't... at least not directly.But, it's simple enough to have use a custom variable to fire the HDG indication, then check that variable whenever the AP master is switched on...In pseudo-code:if (L:HeadingHoldSwitch,bool = 1) then (turn on AP Master and HDG Hold) else (turn on AP Master)

Share this post


Link to post
Share on other sites

Hi Bill,Well I got a little time to work on this and so far from your suggestion I have the following code:"if (L:HeadingHoldSwitch,bool = 1) then (turn on AP Master andHDG Hold) else (turn on AP Master)"(L:HeadingHoldSwitch,bool) if{ (A:Autopilot master, bool) (L:HeadingHoldSwitch,bool) && } else{ (A:Autopilot master, bool) }The code doesn't seam to work to activate the Heading Hold, even when the autopilot master is activated. Is this code wrong to what you wanted in previous post?Should there also be an "intro" code mixing the (L:HeadingHoldSwitch,bool) with the (A:Autopilot heading lock, bool), and how do I do that? Please helpThanks,Benny

Share this post


Link to post
Share on other sites

A:vars are READ ONLY VARIABLES!K:events are COMMANDS!Don't confuse the two, or you'll loose all your hair... ;) (L:HeadingHoldSwitch,bool) 1 == if{ (>K:AP_MASTER) (>K:AP_HDG_HOLD_ON) } else{ (>K:AP_MASTER) }

Share this post


Link to post
Share on other sites

Thanks Bill,I was down to my last 3 hairs:)The code worked perfectly. I didn't know you could use the K events in the value section - only the click section.I really appreciate the help.Best Regards,Benny

Share this post


Link to post
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
Sign in to follow this