• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

P3D v4 A few questions about 3D virtual cockpit

Thanks for response! I'll try to check it.
Now a new question. What about autopilot? Any chance to do it custom by xml? I saw PID speed control by Heretic, but I don't understand how to use it.
First - when autopilot button is on, aircraft maintain pitch and bank angels what it have on the moment of switching on, or if bank was less of 4 degree, airplane set bank to 0 and back and maintain heading what it have on the moment of switching on ap. Is it do that by default? Also in this mode pilot may control the aircraft for change pitch or bank for heading by the yoke and rudder pedals. How to do it? Everything must be written by code with conditions in mouserect section?
as far as I know, no one can't modified FSX/P3D default autopilot.

Maybe you can help me with my project and write c++ code for gauges? ;-)
I prefer give help for learning, so you can do anything what you want with the code and own it.
 
as far as I know, no one can't modified FSX/P3D default autopilot.

I doesn't mean modified default, I say about add a some code for add (change) a some function. Like a: when autopilot is swithing on and bank is 4 degrees and less and LNAV or TRK mode is off will be on heading mode and hold it. This is a first function. Or also conditions, but bank is greater 4 degrees, then autopilot will maintain present bank angle. Also add condition for vertical mode and limitations. Or this able only by c++ coding? And it is not possible to implement by xml?
 
no you can't, it quite complicated and high possibility doesn't work. the option is make modification (which is not possible) or build completely new autopilot.
both xml and C++ can do code an autopilot, the mater is the programmer behind it.
 
Pitch hold and heading hold can be set as a default mode when the autopilot is engaged without any other mode set. See here (default_pitch_mode, default_bank_mode) :
https://msdn.microsoft.com/en-us/library/cc526949.aspx#mozTocId942782
Bank hold is only possible by continuously moving the heading bug in heading hold mode to make the autopilot try to "catch" up and therefor use one of its bank angle limiter modes.

Alternatively, an aircraft can be defined as fly-by-wire, which will hold pitch and bank when there is no control input and all the computers are running.
(See "fly_by_wire" here: https://msdn.microsoft.com/en-us/library/cc526949.aspx#mozTocId548772)
The computers will have to be disabled when the autopilot is not engaged to avoid conflict with manual flying.

All of this needs to be controlled in a background gauge.

And again: You will really really need to improve your XML skills if you want to implement something complicated like this.
 
And again: You will really really need to improve your XML skills if you want to implement something complicated like this.

Yes, I try, but it's a little bit harder when doing all by only one (by yourself). Because need to educate everything: SDK, 3dmax, photoshop..etc. Also I was make a flight dynamic with many many digits, for it looks like in reality.
 
I spent learning and creating aircraft about 7 years start from 2010, in 2017 I finally release my very first aircraft, Osprey, you can find in Showroom thread.
I got boost learn at 2015 after I deeply learning C++ code came with SDK, then @JB3DG and @rcbarend give a hand to assist me in code and perspective. they aren't create code for me, but they show how to coding. it like when we got first bicycle and it depend on you to make a ride with new bicycle. if you hunger enough to became a cyclist then our parent(or friend) will told how to grab the steer, how to drive it, how to push the pedal, they will give a little push forward, then here we go, I paddling and I steer on my own, if I out of track or possibility going wrong path, they just shout out. it good. after all it became very good, I like it.

after all it depend on you hunger. there no such shortcut without sacrifice,
if you won't learn any, but have a good aircraft then buy it or pay someone to build aircraft for you.
other way is learn SDK and all related ( SDK only is not enough), build on your own, and ask us (fsdeveloper.com community) if you have a problem. it would be more worth than you pay but this will spent your time to learn.
 
Yes, I try, but it's a little bit harder when doing all by only one (by yourself). Because need to educate everything: SDK, 3dmax, photoshop..etc. Also I was make a flight dynamic with many many digits, for it looks like in reality.

It's a long way. I've been doing this for 10 years and still haven't done everything that can be done with the FSX SDK.
 
My brains are about to burst. What's wrong? I try to make a autopilot switch. We have a one switch for AP on and one for OFF.
autopilot.jpg


From the right side. If i take a almost default code like this:
Code:
    <PartInfo>
        <Name>switch_ap_on</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Sim>
                    <Variable>AUTOPILOT MASTER</Variable>
                    <Units>bool</Units>
                    <Scale>50</Scale>
                </Sim>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_AUTOPILOT_MASTER</HelpID>
            <TooltipID>TOOLTIPTEXT_AUTOPILOT_MASTER</TooltipID>
            <EventID>AUTOPILOT_ON</EventID>
        </MouseRect>
    </PartInfo>
    
        <PartInfo>
        <Name>switch_ap_off</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Sim>
                    <Variable>AUTOPILOT MASTER</Variable>
                    <Units>bool</Units>
                    <Scale>50</Scale>
                </Sim>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_AUTOPILOT_MASTER</HelpID>
            <TooltipID>TOOLTIPTEXT_AUTOPILOT_MASTER</TooltipID>
            <EventID>AUTOPILOT_OFF</EventID>
        </MouseRect>
    </PartInfo>


Both buttons move when I press one of them.

If i take code like this:
Code:
 <PartInfo>
        <Name>switch_ap_on</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                    (L:switch_ap_on, bool) 50 *
                </Code>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_AUTOPILOT_MASTER</HelpID>
            <TooltipID>TOOLTIPTEXT_AUTOPILOT_MASTER</TooltipID>
            <EventID>AUTOPILOT_ON</EventID>
        </MouseRect>
    </PartInfo>

Animation not work.

What need to change? Make a callbackcode with K:variable in mouserect?
 
You are not controlling this custom variable (L:switch_ap_on, bool) in your mouse click event!

Code:
      <MouseFlags>LeftSingle</MouseFlags>
      <CallbackCode>
        (M:Event) 'LeftSingle' scmp 0 == if{ 1 (>L:switch_ap_on, bool) (>K:AUTOPILOT_ON) }
      </CallbackCode>
With the <CallbackCode> above you are now controlling the custom variable as well as the actual key event you wish to occur.

The obvious question then is just why would you wish to use a custom variable when you already know the default sim variable(s) work? :scratchch
 
You are not controlling this custom variable (L:switch_ap_on, bool) in your mouse click event!

Code:
      <MouseFlags>LeftSingle</MouseFlags>
      <CallbackCode>
        (M:Event) 'LeftSingle' scmp 0 == if{ 1 (>L:switch_ap_on, bool) (>K:AUTOPILOT_ON) }
      </CallbackCode>
With the <CallbackCode> above you are now controlling the custom variable as well as the actual key event you wish to occur.

Thank you! I'll try it.

The obvious question then is just why would you wish to use a custom variable when you already know the default sim variable(s) work? :scratchch

For animation. If i use sim variable for button "ap_on" and for button "ap_off" i will have a double animation - buttons will be pressed together when i will press only one of them.
 
Guys, you are really programming masters! Thank you so much for responses and for all helps! It's a really hard scripting by xml.

It's strange, but animation work only one time with this code:
Code:
 <PartInfo>
        <Name>switch_ap_on</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                 (L:switch_ap_on,bool) 50 *
                </Code>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <TooltipID>TOOLTIPTEXT_AUTOPILOT_MASTER</TooltipID>
            <MouseFlags>LeftSingle</MouseFlags>
            <CallbackCode>
              (M:Event) 'LeftSingle' scmp 0 == if{ 1 (>L:switch_ap_on, bool) (>K:AUTOPILOT_ON) }
            </CallbackCode>
        </MouseRect>
    </PartInfo>

I press the button - it turns on (animation is played once) and then turn off the autopilot another button, I click again ap_on but the animation is not played, although the button turns on.

Do not understand anything:banghead:
 
make 2 Lvars for animation and I think you need 2 again for visibility (for button light)

this for animation, it my sample
it use Lvars MASTER_AP1, another Lvars you could use MASTER_AP2, both have identical code except the naming

XML:
    <PartInfo>
        <Name>master_ap1</Name>
        <AnimLength>10</AnimLength>
        <Animation>
            <Parameter>
                <Code>(L:MASTER_AP1, bool) 10 *</Code>
                <Lag>50</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <TooltipText>Autopilot</TooltipText>   
            <MouseFlags>LeftSingle+LeftRelease</MouseFlags>
            <CallbackCode>
                (M:Event) 'LeftSingle' scmp 0 == if{ 1 (&gt;L:MASTER_AP1, bool) (>K:AUTOPILOT_ON) }
                (M:Event) 'LeftRelease' scmp 0 == if{ 0 (&gt;L:MASTER_AP1, bool) }
            </CallbackCode>
        </MouseRect>
    </PartInfo>
 
make 2 Lvars for animation and I think you need 2 again for visibility (for button light)

Yes, I have code for button light.

I did according to your example. But now there is another problem. Sometimes animation is played twice. Here is a code for two buttons:
Code:
       <Animation name="switch_ap_on" guid="298ff33b-f949-45c4-9858-88ebd9b62450" length="50" type="Sim" typeParam2="switch_ap_on" typeParam="AutoPlay" />

 <PartInfo>
        <Name>switch_ap_on</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                 (L:switch_ap_on,bool) 50 *
                </Code>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <TooltipText>Autopilot</TooltipText>
            <MouseFlags>LeftSingle+LeftRelease</MouseFlags>
            <CallbackCode>
              (M:Event) 'LeftSingle' scmp 0 == if{ 1 (&gt;L:switch_ap_on, bool) (>K:AUTOPILOT_ON) }
              (M:Event) 'LeftRelease' scmp 0 == if{ 0 (&gt;L:switch_ap_on, bool) }
            </CallbackCode>
        </MouseRect>
    </PartInfo>
  <PartInfo>
    <Name>light_ap_ON</Name>
    <Visibility>
      <Parameter>
        <Code>
          (A:AUTOPILOT MASTER,bool)
          (A:ELECTRICAL MASTER BATTERY,bool)
          and
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>


       <Animation name="switch_ap_off" guid="b395dc64-7e6a-484e-adcc-393711df5ac6" length="50" type="Sim" typeParam2="switch_ap_off" typeParam="AutoPlay" />

 <PartInfo>
        <Name>switch_ap_off</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                    (L:switch_ap_off, bool) 50 *
                </Code>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <TooltipText>Autopilot</TooltipText>
            <MouseFlags>LeftSingle+LeftRelease</MouseFlags>
            <CallbackCode>
              (M:Event) 'LeftSingle' scmp 0 == if{ 1 (&gt;L:switch_ap_off, bool) (>K:AUTOPILOT_OFF) }
              (M:Event) 'LeftRelease' scmp 0 == if{ 0 (&gt;L:switch_ap_off, bool) }
            </CallbackCode>
        </MouseRect>
    </PartInfo>

Look the video.
 
Looking what we have... I try to understand how to realise autopilot logic.
First need a conditions. AP on when hight is above 120 meters. Ok, we will take a (A:RADIO HEIGHT, meters) 120 &gt - thats will be like this (L:switch_ap_on,bool) if (A:RADIO HEIGHT, meters) 120 %gt ? Correct? Need to add it to the animation section or to the callbackcode?
Next we have a some hard logic... when ap is on in vertical mode pitch will be hold if it was from -10 to +20 degrees or if pitch was greater than this limits ap will be reduce pitch to this limits. Also in lateral mode will be hold bank angle if it was from 4 to 30 degrees, if bank was more than 30deg ap will reduce it to 30 and stabilized, if bank will be less than 4 degrees will be hold current heading what was at the moment when ap is swithing on and also heading display is on and can be change heading by heading knob. If no another lateral or vertical modes is on (LNAV, TRK, VS, LVLCHNG) autopilot will be in "maneuvering" mode - thats mean if we turn the yoke more than some degrees plane will be change bank angle with ap is on also this mode work with change pitch be the yoke and heading by the rudder pedals. Fuf, I hope I understood clearly.

Sorry for my English:)
 
I did according to your example. But now there is another problem. Sometimes animation is played twice. Here is a code for two buttons
First need a conditions. AP on when hight is above 120 meters. Ok, we will take a (A:RADIO HEIGHT, meters) 120 &gt - thats will be like this (L:switch_ap_on,bool) if (A:RADIO HEIGHT, meters) 120 %gt ? Correct? Need to add it to the animation section or to the callbackcode?

you did wrongly, and I give not correct sample, see at autopilot EVENT ID, and you only need 1 <PartInfo>
with 2 <PartInfo> switch_ap_on and switch_ap_off it made animation do twice

XML:
<PartInfo>
        <Name>switch_ap1</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                 (L:switch_ap1,bool) 50 *
                </Code>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <TooltipText>Autopilot</TooltipText>
            <MouseFlags>LeftSingle+LeftRelease</MouseFlags>
         <CallbackCode>
              (M:Event) 'LeftSingle' scmp 0 == if{ 1 (&gt;L:switch_ap1, bool)
                                                    (A:RADIO HEIGHT, feet) 0.3048 120 * &gt; if{ (>K:AP_MASTER) } &amp;&amp; }
                                                 }
              (M:Event) 'LeftRelease' scmp 0 == if{ 0 (&gt;L:switch_ap1, bool) }
         </CallbackCode>
<PartInfo>

but this make autopilot only work when aircraft height is 120 meters, this not automatic autopilot, it need button to pushed. for me I always use very simple xml code in modeldef.xml like sample I give on previous post. then I do all code simulation in xml/C++ gauge. coding in modeldef.xml we usually call it "hardcoded" because it quite not easy to maintain.
sample:
XML:
<CallbackCode>
    (M:Event) 'LeftSingle' scmp 0 == if{ 1 (&gt;L:switch_ap_off, bool) }
    (M:Event) 'LeftRelease' scmp 0 == if{ 0 (&gt;L:switch_ap_off, bool) }
</CallbackCode>
           
<!--in gauge xml  code-->

(L:switch_ap_off, bool) 1 == &amp;&amp; (A:RADIO HEIGHT, feet) 0.308 120 * if{ >K:AP_MASTER }


Next we have a some hard logic... when ap is on in vertical mode pitch will be hold if it was from -10 to +20 degrees or if pitch was greater than this limits ap will be reduce pitch to this limits. Also in lateral mode will be hold bank angle if it was from 4 to 30 degrees, if bank was more than 30deg ap will reduce it to 30 and stabilized, if bank will be less than 4 degrees will be hold current heading what was at the moment when ap is swithing on and also heading display is on and can be change heading by heading knob. If no another lateral or vertical modes is on (LNAV, TRK, VS, LVLCHNG) autopilot will be in "maneuvering" mode - thats mean if we turn the yoke more than some degrees plane will be change bank angle with ap is on also this mode work with change pitch be the yoke and heading by the rudder pedals. Fuf, I hope I understood clearly.

Sorry for my English:)
you must learn what Avars and EVENT ID have in SDK (autopilot in your case), not all aircraft behave is provide by default. gather all what you need and look what could possible with autopilot simulation. I only say good luck


note:
I'm not XML programmer expert, I could be wrong doing sample code in xml.
 
you did wrongly, and I give not correct sample, see at autopilot EVENT ID, and you only need 1 <PartInfo>
with 2 <PartInfo> switch_ap_on and switch_ap_off it made animation do twice

But there is two buttons... First - is autopilot on switch and the second is autopilot off switch. I can not understand how to logically combine them. I'm sure i don't need event AP_MASTER because it's a switch for on and off...

I need to use separate commands K:AUTOPILOT_ON - for first button and K:AUTOPILOT_OFF - for second. But i don't understand how to do that, for animation worked fine.
 
oh... there 2 button for on and off. keep your code then, just check your animation, it should have not press and fully press.
 
My brains will explode now:D
It is hard to make a autopilot logic be C++? I really try to understand xml programming, but can't do that:-(
What I want to do... This autopilot logic like in boeing 737 (777)... for examle pmdg is good.
Here is my autopilot

autopilot2.jpg


I want to do this...
I have a some problems. First - is how to realize AP logic when we switching on it.
Second - how to make a TRK button - it's like a heading lock, but locking magnetic track (was try GPS GROUND MAGNETIC TRACK, but it's not working).
Then divide LOC capture button and APP (LOC and GS capture) button... i work on this.
Then VS button is not working too... not switchin on AUTOPILOT VERTICAL HOLD.
Also N1 button too... AP_N1_HOLD give me 0
And LVL CHNG - is also don't know how

Here is a all modeldef code for autopilot (is in the works, therefore some parts may not be true or absent)
Code:
       <Animation name="switch_ap_on" guid="298ff33b-f949-45c4-9858-88ebd9b62450" length="50" type="Sim" typeParam2="switch_ap_on" typeParam="AutoPlay" />

 <PartInfo>
        <Name>switch_ap_on</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                 (L:switch_ap_on,bool) 50 *
                </Code>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <TooltipText>Autopilot</TooltipText>
            <MouseFlags>LeftSingle+LeftRelease</MouseFlags>
            <CallbackCode>
              (M:Event) 'LeftSingle' scmp 0 == if{ 1 (&gt;L:switch_ap_on, bool) (>K:AUTOPILOT_ON) }
            </CallbackCode>
        </MouseRect>
    </PartInfo>
  <PartInfo>
    <Name>light_ap_ON</Name>
    <Visibility>
      <Parameter>
        <Code>
          (A:AUTOPILOT MASTER,bool)
          (A:ELECTRICAL MASTER BATTERY,bool)
          and
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>


       <Animation name="switch_ap_off" guid="b395dc64-7e6a-484e-adcc-393711df5ac6" length="50" type="Sim" typeParam2="switch_ap_off" typeParam="AutoPlay" />

 <PartInfo>
        <Name>switch_ap_off</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                    (L:switch_ap_off, bool) 50 *
                </Code>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <TooltipText>Autopilot</TooltipText>
            <MouseFlags>LeftSingle+LeftRelease</MouseFlags>
            <CallbackCode>
              (M:Event) 'LeftSingle' scmp 0 == if{ 1 (&gt;L:switch_ap_off, bool) (>K:AUTOPILOT_OFF) }
              (M:Event) 'LeftRelease' scmp 0 == if{ 0 (&gt;L:switch_ap_on, bool) }
            </CallbackCode>
        </MouseRect>
    </PartInfo>


       <Animation name="switch_ap_AT" guid="cb310a40-6021-4c66-848e-fdb45ec91d75" length="50" type="Sim" typeParam2="switch_ap_AT" typeParam="AutoPlay" />
 <PartInfo>
        <Name>switch_ap_AT</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                    (L:switch_ap_AT, bool) 50 *
                </Code>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_AUTOPILOT_AUTOTHROTTLE</HelpID>
            <TooltipID>TOOLTIPTEXT_AUTOPILOT_AUTOTHROTTLE</TooltipID>
            <EventID>AUTO_THROTTLE_ARM</EventID>
        </MouseRect>
    </PartInfo>
  <PartInfo>
    <Name>light_ap_AT</Name>
    <Visibility>
      <Parameter>
        <Code>
          (A:AUTOPILOT THROTTLE ARM,bool)
          (A:ELECTRICAL MASTER BATTERY,bool)
          and
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>


       <Animation name="switch_ap_AT_off" guid="b2a800e4-976d-488e-ad7f-8d2a831601b2" length="50" type="Sim" typeParam2="switch_ap_AT_off" typeParam="AutoPlay" />
 <PartInfo>
        <Name>switch_ap_AT_off</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                    (L:switch_ap_AT_off, bool) 50 *
                </Code>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_AUTOPILOT_AUTOTHROTTLE</HelpID>
            <TooltipID>TOOLTIPTEXT_AUTOPILOT_AUTOTHROTTLE</TooltipID>
            <EventID>AUTO_THROTTLE_ARM</EventID>
        </MouseRect>
    </PartInfo>

       <Animation name="switch_ap_tyaga" guid="1bd5aacc-9115-46d2-8226-5b436351943d" length="50" type="Sim" typeParam2="switch_ap_tyaga" typeParam="AutoPlay" />
 <PartInfo>
        <Name>switch_ap_tyaga</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                    (L:switch_ap_tyaga, bool) 50 *
                </Code>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_B737_REFERENCE_N1</HelpID>
            <TooltipID>TOOLTIPTEXT_B737_N1_KNOB</TooltipID>
            <EventID>AP_N1_HOLD</EventID>
        </MouseRect>
    </PartInfo>
  <PartInfo>
    <Name>light_ap_tyaga</Name>
    <Visibility>
      <Parameter>
        <Code>
          (L:switch_ap_tyaga, bool)
          (A:ELECTRICAL MASTER BATTERY,bool)
          and
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>


       <Animation name="switch_FD" guid="ffb4c530-3314-4b8a-8068-52205d912a0b" length="50" type="Sim" typeParam2="switch_FD" typeParam="AutoPlay" />
    <PartInfo>
        <Name>switch_FD</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Sim>
                    <Variable>AUTOPILOT FLIGHT DIRECTOR ACTIVE</Variable>
                    <Units>bool</Units>
                    <Scale>50</Scale>
                </Sim>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_AUTOPILOT_FLIGHT_DIRECTOR_SWITCH</HelpID>
            <TooltipID>TOOLTIPTEXT_AUTOPILOT_FLIGHT_DIRECTOR_SWITCH</TooltipID>
            <EventID>TOGGLE_FLIGHT_DIRECTOR</EventID>
        </MouseRect>
    </PartInfo>


       <Animation name="switch_ap_speed" guid="b641fd57-f352-4c0c-a058-65eea02630f3" length="50" type="Sim" typeParam2="switch_ap_speed" typeParam="AutoPlay" />

 <PartInfo>
        <Name>switch_ap_speed</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                    (L:switch_ap_speed, bool) 50 *
                </Code>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_AUTOPILOT_SPEED_HOLD</HelpID>
            <TooltipID>TOOLTIPTEXT_AUTOPILOT_SPEED_HOLD</TooltipID>
            <EventID>AP_PANEL_SPEED_HOLD</EventID>
        </MouseRect>
    </PartInfo>
  <PartInfo>
    <Name>light_ap_speed</Name>
    <Visibility>
      <Parameter>
        <Code>
          (A:AUTOPILOT AIRSPEED HOLD,bool)
          (A:ELECTRICAL MASTER BATTERY,bool)
          and
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>


       <Animation name="switch_ap_altitude" guid="bb39b975-b5ac-42d1-a484-84b491c6b6f9" length="50" type="Sim" typeParam2="switch_ap_altitude" typeParam="AutoPlay" />

 <PartInfo>
        <Name>switch_ap_altitude</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                    (L:switch_ap_altitude, bool) 50 *
                </Code>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_AUTOPILOT_ALTITUDE_HOLD</HelpID>
            <TooltipID>TOOLTIPTEXT_AUTOPILOT_ALTITUDE_HOLD</TooltipID>
            <EventID>AP_PANEL_ALTITUDE_HOLD</EventID>
        </MouseRect>
    </PartInfo>
  <PartInfo>
    <Name>light_ap_altitude</Name>
    <Visibility>
      <Parameter>
        <Code>
          (A:AUTOPILOT ALTITUDE LOCK,bool)
          (A:ELECTRICAL MASTER BATTERY,bool)
          and
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>



       <Animation name="switch_ap_VS" guid="d1ee994a-fea4-42a7-ab85-8e0dc58a96eb" length="50" type="Sim" typeParam2="switch_ap_VS" typeParam="AutoPlay" />

 <PartInfo>
        <Name>switch_ap_VS</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                    (L:switch_ap_VS, bool) 50 *
                </Code>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_AUTOPILOT_VSI_HOLD</HelpID>
            <TooltipID>TOOLTIPTEXT_AUTOPILOT_VSI_HOLD</TooltipID>
            <EventID>AP_VS_VAR_SET_ENGLISH</EventID>
        </MouseRect>
    </PartInfo>
  <PartInfo>
    <Name>light_ap_VS</Name>
    <Visibility>
      <Parameter>
        <Code>
          (A:AUTOPILOT VERTICAL HOLD,bool)
          (A:ELECTRICAL MASTER BATTERY,bool)
          and
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>


       <Animation name="switch_ap_kzona" guid="71d022ae-1016-4cc4-b98c-ce304900e9be" length="50" type="Sim" typeParam2="switch_ap_kzona" typeParam="AutoPlay" />

 <PartInfo>
        <Name>switch_ap_kzona</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                    (L:switch_ap_kzona, bool) 50 *
                </Code>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_AUTOPILOT_APP_HOLD</HelpID>
            <TooltipID>TOOLTIPTEXT_AUTOPILOT_APP_HOLD</TooltipID>
            <EventID>AP_LOC_HOLD</EventID>
        </MouseRect>
    </PartInfo>
  <PartInfo>
    <Name>light_ap_kzona</Name>
    <Visibility>
      <Parameter>
        <Code>
          (L:switch_ap_kzona, bool)
          (A:ELECTRICAL MASTER BATTERY,bool)
          and
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>



       <Animation name="switch_ap_app" guid="3a580a0a-ac46-4574-8807-bd74282fdc85" length="50" type="Sim" typeParam2="switch_ap_app" typeParam="AutoPlay" />

 <PartInfo>
        <Name>switch_ap_app</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                    (L:switch_ap_app, bool) 50 *
                </Code>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_AUTOPILOT_APP_HOLD</HelpID>
            <TooltipID>TOOLTIPTEXT_AUTOPILOT_APP_HOLD</TooltipID>
            <EventID>AP_APR_HOLD</EventID>
        </MouseRect>
    </PartInfo>
  <PartInfo>
    <Name>light_ap_app</Name>
    <Visibility>
      <Parameter>
        <Code>
          (A:AUTOPILOT APPROACH HOLD,bool)
          (A:ELECTRICAL MASTER BATTERY,bool)
          and
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>



       <Animation name="switch_ap_gnav" guid="a3296d68-c8e3-46f4-baa0-23a2b94058bf" length="50" type="Sim" typeParam2="switch_ap_gnav" typeParam="AutoPlay" />

 <PartInfo>
        <Name>switch_ap_gnav</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                    (A:GPS drives nav1,bool) (A:Autopilot nav1 lock, bool) and 50 *
                </Code>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_AUTOPILOT_NAV_HOLD</HelpID>
            <TooltipID>TOOLTIPTEXT_AUTOPILOT_NAV_HOLD</TooltipID>
            <CallbackCode>
             0 (&gt;K:AP_NAV1_HOLD) (A:GPS drives nav1,bool) ! if{ (&gt;K:TOGGLE_GPS_DRIVES_NAV1)
            </CallbackCode>
        </MouseRect>
    </PartInfo>
  <PartInfo>
    <Name>light_ap_gnav</Name>
    <Visibility>
      <Parameter>
        <Code>
          (A:AUTOPILOT NAV1 LOCK,bool)
          (A:ELECTRICAL MASTER BATTERY,bool)
          and
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>


       <Animation name="switch_ap_zpu" guid="a3e9b8c7-6dc3-4b65-aeb2-2d8bb69ecabe" length="50" type="Sim" typeParam2="switch_ap_zpu" typeParam="AutoPlay" />

 <PartInfo>
        <Name>switch_ap_zpu</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                    (L:switch_ap_zpu, bool) 50 *
                </Code>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <TooltipText>ZPU%((A:Autopilot heading lock, bool))%{if} (ON)%{else} (OFF)%{end}</TooltipText>
            <MouseFlags>LeftSingle+LeftRelease</MouseFlags>
            <CallbackCode>
              (M:Event) 'LeftSingle' scmp 0 == if{ 1 (&gt;L:switch_ap_zpu, bool) (>A:GPS GROUND MAGNETIC TRACK, degree) }
              (M:Event) 'LeftRelease' scmp 0 == if{ 0 (&gt;L:switch_ap_zpu, bool) }
            </CallbackCode>
        </MouseRect>
    </PartInfo>
  <PartInfo>
    <Name>light_ap_zpu</Name>
    <Visibility>
      <Parameter>
        <Code>
          (L:switch_ap_zpu, bool)
          (A:ELECTRICAL MASTER BATTERY,bool)
          and
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>


       <Animation name="Autopilot VS Selector" guid="9f4876ae-4952-456e-be6a-40cbe12b4d9f" length="100" type="Sim" typeParam2="Autopilot VS Selector" typeParam="AutoPlay" />

 <PartInfo>
        <Name>Autopilot VS Selector</Name>
        <AnimLength>100</AnimLength>
      <Animation>
      <Parameter>
        <Code>(A:Autopilot vertical hold var, feet per minute)</Code>
      </Parameter>
  </Animation>
 <MouseRect>
      <Cursor>Hand</Cursor>
      <TooltipID>TOOLTIPTEXT_AUTOPILOT_VSI_INDICATOR_FTMIN</TooltipID>
      <MouseFlags>LeftSingle+LeftDrag+Wheel</MouseFlags>
      <CallbackJumpDragging>
        <XMovement>
          <Delta>3</Delta>
          <EventIdInc>AP_VS_VAR_INC</EventIdInc>
          <EventIdDec>AP_VS_VAR_DEC</EventIdDec>
        </XMovement>
      </CallbackJumpDragging>
    </MouseRect>
    </PartInfo>

       <Animation name="Autopilot_Altitude_Selector" guid="f628b1be-0ab1-417b-8180-99a7039052a0" length="360" type="Sim" typeParam2="Autopilot_Altitude_Selector" typeParam="AutoPlay" />


  <PartInfo>
    <Name>Autopilot_Altitude_Selector</Name>
    <AnimLength>360</AnimLength>
    <Animation>
      <Parameter>
        <Code>(A:AUTOPILOT ALTITUDE LOCK VAR, meters)</Code>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <TooltipID>TOOLTIPTEXT_AUTOPILOT_ALTITUDE_INDICATOR_METERS</TooltipID>
      <MouseFlags>LeftSingle+LeftDrag+Wheel</MouseFlags>
      <CallbackJumpDragging>
        <XMovement>
          <Delta>3</Delta>
          <EventIdInc>AP_ALT_VAR_DEC</EventIdInc>
          <EventIdDec>AP_ALT_VAR_INC</EventIdDec>
        </XMovement>
      </CallbackJumpDragging>
    </MouseRect>
  </PartInfo>

       <Animation name="Autopilot_speed_selector" guid="901d20a4-3cf7-4406-95b9-a1f1fe745f79" length="360" type="Sim" typeParam2="Autopilot_speed_selector" typeParam="AutoPlay" />
  <PartInfo>
    <Name>Autopilot_speed_selector</Name>
    <AnimLength>360</AnimLength>
    <Animation>
      <Parameter>
        <Code>(A:AUTOPILOT AIRSPEED HOLD VAR, Knots) 36 *</Code>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <TooltipID>TOOLTIPTEXT_AUTOPILOT_SPEED_INDICATOR_KILOS</TooltipID>
      <MouseFlags>LeftSingle+LeftDrag+Wheel</MouseFlags>
      <CallbackJumpDragging>
        <XMovement>
          <Delta>5</Delta>
          <EventIdInc>AP_SPD_VAR_DEC</EventIdInc>
          <EventIdDec>AP_SPD_VAR_INC</EventIdDec>
        </XMovement>
      </CallbackJumpDragging>
    </MouseRect>
  </PartInfo>
 
Back
Top