Control: AP bugfix
This commit is contained in:
parent
76683730a6
commit
861eea1d24
4 changed files with 109 additions and 39 deletions
|
@ -291,8 +291,8 @@ var lateral = func {
|
|||
setprop("/it-autoflight/input/lat-arm", 0);
|
||||
setprop("/it-autoflight/output/loc-armed", 0);
|
||||
setprop("/it-autoflight/output/appr-armed", 0);
|
||||
var hdg5sec = math.round(getprop("/it-autoflight/internal/heading-predicted"));
|
||||
setprop("/it-autoflight/input/hdg", hdg5sec);
|
||||
var hdgpredic = math.round(getprop("/it-autoflight/internal/heading-predicted"));
|
||||
setprop("/it-autoflight/input/hdg", hdgpredic);
|
||||
setprop("/it-autoflight/output/lat", 0);
|
||||
setprop("/it-autoflight/mode/lat", "HDG");
|
||||
setprop("/it-autoflight/mode/arm", " ");
|
||||
|
@ -367,9 +367,9 @@ var vertical = func {
|
|||
} else {
|
||||
setprop("/it-autoflight/mode/arm", " ");
|
||||
}
|
||||
var alt5sec = math.round(getprop("/it-autoflight/internal/altitude-predicted"), 100);
|
||||
setprop("/it-autoflight/input/alt", alt5sec);
|
||||
setprop("/it-autoflight/internal/alt", alt5sec);
|
||||
var altpredic = math.round(getprop("/it-autoflight/internal/altitude-predicted"), 100);
|
||||
setprop("/it-autoflight/input/alt", altpredic);
|
||||
setprop("/it-autoflight/internal/alt", altpredic);
|
||||
thrustmode();
|
||||
} else if (vertset == 1) {
|
||||
alandt.stop();
|
||||
|
@ -378,7 +378,7 @@ var vertical = func {
|
|||
setprop("/it-autoflight/output/appr-armed", 0);
|
||||
var altinput = getprop("/it-autoflight/input/alt");
|
||||
setprop("/it-autoflight/internal/alt", altinput);
|
||||
var vsnow = math.round(getprop("/it-autoflight/internal/vert-speed-fpm"), 100);
|
||||
vsnow = math.round(getprop("/it-autoflight/internal/vert-speed-fpm"), 100);
|
||||
setprop("/it-autoflight/input/vs", vsnow);
|
||||
setprop("/it-autoflight/output/vert", 1);
|
||||
setprop("/it-autoflight/mode/vert", "V/S");
|
||||
|
@ -421,7 +421,7 @@ var vertical = func {
|
|||
var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
|
||||
var alt = getprop("/it-autoflight/internal/alt");
|
||||
var dif = calt - alt;
|
||||
var vsnow = getprop("/it-autoflight/internal/vert-speed-fpm");
|
||||
vsnow = getprop("/it-autoflight/internal/vert-speed-fpm");
|
||||
if (calt < alt) {
|
||||
setprop("/it-autoflight/internal/max-vs", vsnow);
|
||||
} else if (calt > alt) {
|
||||
|
@ -1205,7 +1205,7 @@ var mng_altcapt = func {
|
|||
}
|
||||
|
||||
var mng_capture_alt = func {
|
||||
var vsnow = getprop("/it-autoflight/internal/vert-speed-fpm");
|
||||
vsnow = getprop("/it-autoflight/internal/vert-speed-fpm");
|
||||
mng_altcaptt.stop();
|
||||
mng_des_fpmt.stop();
|
||||
var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
|
||||
|
|
|
@ -606,16 +606,46 @@
|
|||
<gain>1.0</gain>
|
||||
<enable>
|
||||
<condition>
|
||||
<and>
|
||||
<not-equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>4</value>
|
||||
</not-equals>
|
||||
<not-equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>7</value>
|
||||
</not-equals>
|
||||
</and>
|
||||
<not>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>4</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>7</value>
|
||||
</equals>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>8</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert-mng</property>
|
||||
<value>4</value>
|
||||
</equals>
|
||||
</and>
|
||||
</or>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</not>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>/it-autoflight/internal/vert-speed-fpm</input>
|
||||
|
@ -629,10 +659,30 @@
|
|||
<gain>1.0</gain>
|
||||
<enable>
|
||||
<condition>
|
||||
<not-equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>5</value>
|
||||
</not-equals>
|
||||
<not>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>5</value>
|
||||
</equals>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</not>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>/it-autoflight/internal/vert-speed-fpm</input>
|
||||
|
|
|
@ -135,26 +135,46 @@
|
|||
<debug>false</debug>
|
||||
<enable>
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>4</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>7</value>
|
||||
</equals>
|
||||
<and>
|
||||
<and>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>8</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert-mng</property>
|
||||
<value>4</value>
|
||||
</equals>
|
||||
</and>
|
||||
</or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>7</value>
|
||||
</equals>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>8</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert-mng</property>
|
||||
<value>4</value>
|
||||
</equals>
|
||||
</and>
|
||||
</or>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</and>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>
|
||||
|
|
|
@ -1 +1 @@
|
|||
4611
|
||||
4613
|
Reference in a new issue