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)

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...