February 18, 200818 yr 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.
February 18, 200818 yr 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.
February 19, 200818 yr Moderator 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
February 23, 200818 yr Author 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
February 24, 200818 yr Moderator 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
February 24, 200818 yr Author 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
Create an account or sign in to comment