Jump to content
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
Guest BFG

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)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest BFG

Bill you make me feel more clever every day

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) }


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...