• 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.

AutoThrottle with AP on 'only'

Messages
10,163
Country
us-arizona
Hey guys,

I wish my auto-throttle on this small plane to 'turn off' when the master AP is also off, so that when you turn off the AP, auto throttle disconnects also.

I have tried a few different approaches, none of which are working.

This is also a 'set' command function where I have visible + / - buttons for adjusting the airspeed with, then 'click' to activate airspeed.

This is a mouse click zone.


(A:AUTOPILOT MASTER,bool)
if{ 1 (A:AUTOPILOT MASTER,enum)
1 (>K:AP_AIRSPEED_SET)
if{ 0 (A:AUTOPILOT MASTER,enum)
0 (>K:AP_AIRSPEED_SET)
1 (>L:XMLSND59,enum)

(A:AUTOPILOT MASTER,bool)
if{ 1 (A:AUTOPILOT MASTER,bool)
1 (>K:AP_AIRSPEED_SET)
if{ 0 (A:AUTOPILOT MASTER,bool)
0 (>K:AP_AIRSPEED_SET)
1 (>L:XMLSND59,enum)


This one works fine but will not shut off with AP Master.

(K:AP_AIRSPEED_SET) ! (>K:AP_AIRSPEED_SET)
 
Ok, got it to activate, but now I cannot get it to turn off, lol...

arrgh..



1 (A:AUTOPILOT MASTER,bool)
if{ 1 (A:AUTOPILOT MASTER,bool)
(>K:AP_AIRSPEED_SET) 1 ==
if{ 0 (A:AUTOPILOT MASTER,bool)
(>K:AP_AIRSPEED_SET) 0 ==
1 (>L:XMLSND59,enum)
 
Tried this one, and a couple of others..

1 (A:AUTOPILOT MASTER,bool)
1 (>L:XMLSND60,enum)
if{ 1 (A:AUTOPILOT MASTER,bool)
(>K:AP_AIRSPEED_SET) 1 == }
els{ 0 (A:AUTOPILOT MASTER,bool)
(>K:AP_AIRSPEED_OFF)
}


hmmm... so many ways to write this, its scary. which one will work??
 
Last edited:
Well, this one is working a little better. It still will not shut off via shutting down the master AP.

Quick set Speed lock button;


(K:AP_AIRSPEED_HOLD,bool) ! (>K:AP_AIRSPEED_HOLD,bool)
1 (>L:XMLSND60,enum)
1 (A:AP MASTER, bool) ==
if{ 0 (A:AUTOPILOT MASTER,bool)
(>K:AP_AIRSPEED_OFF) }


....and the Set Speed button;


1 (A:AUTOPILOT MASTER,bool)
1 (>L:XMLSND59,enum)
if{ 1 (A:AUTOPILOT MASTER,bool)
(>K:AP_AIRSPEED_SET) 1 == }
if{ 0 (A:AUTOPILOT MASTER,bool)
(>K:AP_AIRSPEED_SET) 0 == }
els{ 0 (A:AUTOPILOT MASTER,bool)
(>K:AP_AIRSPEED_OFF) 1 == }


Note above, last two lines; els, is a repeat of the second set up, but with els instead of if. Thought I would give it a try.. Still will not shut off with AP shut down.

I need the auto throttle to shut off when the master AP is shut off.. arrgh.
 
Well, now I have completely figured out that I cannot 'figure out' how to do a single click zone that would;
* Power a AP SET (activate a system that is preset, such as HDG)
....and
* Click it off.

Example, these two lines;

(A:AP_PANEL_HEADING_SET,bool)
(K:AP_PANEL_HEADING_OFF,bool)


It has to be so terribly easy and I cannot figure it out.....

Some versions and variations...

1 (A:AUTOPILOT MASTER,bool)
if{ (A:AP_PANEL_HEADING_SET,bool)
if{ (>K:AP_PANEL_HEADING_OFF) }
els{ (>K:AP_PANEL_HEADING_ON) } }


(K:AP_PANEL_HEADING_SET,bool)
1 (>L:XMLSND59,enum)
if{ 1 (K:AP_PANEL_HEADING_SET,bool)
1 (K:AP_PANEL_HEADING_OFF,bool) == }


A long day of coding... whew...
 
I know you're trying Bill, but honestly it really is quite simple:

Code:
<!-- TURN ON AUTOPILOT MASTER -->
<Click>
  (>K:AUTOPILOT_ON)
  1 (>L:XMLSND59,enum)
</Click>

<!-- TURN ON SPEED HOLD -->
<Click>
  (>K:AP_AIRSPEED_ON)
  1 (>L:XMLSND60,enum)
</Click>

<!-- TURN OFF SPEED HOLD -->
<Click>
  (>K:AP_AIRSPEED_OFF)
  1 (>L:XMLSND60,enum)
</Click>

<!-- TURN OFF AUTOPILOT AND SPEED HOLD WITH ONE CLICK -->
<Click>
  (>K:AUTOPILOT_OFF)
  (>K:AP_AIRSPEED_OFF)
  1 (>L:XMLSND59,enum)
</Click>

Note that there are two sets of "on" commands for "airspeed hold" that do different things entirely:

1. AP_AIRSPEED_ON - turns on airspeed hold at preselected airspeed

2. AP_PANEL_SPEED_ON - turns on airspeed hold at current airspeed!

You can use any of the "off" commands, but I suggest sticking with the matching commands for consistency:

AP_AIRSPEED_OFF
AP_PANEL_SPEED_OFF

There are also a selection of "toggle" type commands for airspeed hold but it's difficult to keep two different "toggles" synchronized without a LOT of conditional cross-checking.

Just for information's sake though, I've never seen an autopilot that was cross-connected to the airspeed hold system. They are kept separate for a reason... :twocents:
 
Last edited:
Hey Bill,

Many thanks. That answers why it was cancelling out the preset's.

It occurred to me this morning, when I was waking up, that I needed to set the AP Speed control to turn off when the AP Master switches off, in the upper Element sections, not in a clickzone, so that it will be automated with the plane.


My problem now, is to have 'one clickzone' that will handle turning on the preset auto throttle 'and' be able to turn it off. So I would need to cross the AP Airspeed On with AP Airspeed Off in the same click zone.

Something like,
<Click>
(K:AP_AIRSPEED_ON,bool) ! (>K:AP_AIRSPEED_OFF,bool) !
</Click>
 
Something like,
<Click>
(K:AP_AIRSPEED_ON,bool) ! (>K:AP_AIRSPEED_OFF,bool) !
</Click>

That would never work. You can only use that "trick" for the same command!

If you require a single clickspot for both on and off, then you'll have to use the "toggle version" of the same command event:

(>K:AP_AIRSPEED_HOLD) - toggles on/off preselected airspeed hold function

(>K:AP_PANEL_SPEED_HOLD_TOGGLE) - toggles on/off current airspeed hold function

To automatically turn off preselected airspeed hold whenever the autopilot is turned off:
Code:
<Update Hidden="Yes">

<!-- TURN OFF AIRSPEED HOLD WHEN AUTOPILOT IS OFF! -->
   (A:AUTOPILOT MASTER,bool) !
   (A:AUTOPILOT AIRSPEED HOLD,bool)
   and
       if{ (>K:AP_AIRSPEED_OFF) }

</Update>

Note carefully that this is scripted to run ONLY ONCE! In other words it will only execute IF the autopilot is off AND the airspeed hold is on...

...once it is executed, then airspeed hold will be off, so the script will be ignored until the next time its needed. ;)
 
Back
Top