A32X: Fix elevator trim behavior on touchdown, fix autoland rollout elevator
This commit is contained in:
parent
9e92109208
commit
3181d07169
4 changed files with 45 additions and 32 deletions
|
@ -32,8 +32,7 @@ setlistener("/sim/signals/fdm-initialized", func {
|
||||||
var database2 = getprop("/FMGC/internal/navdatabase2");
|
var database2 = getprop("/FMGC/internal/navdatabase2");
|
||||||
var code1 = getprop("/FMGC/internal/navdatabasecode");
|
var code1 = getprop("/FMGC/internal/navdatabasecode");
|
||||||
var code2 = getprop("/FMGC/internal/navdatabasecode2");
|
var code2 = getprop("/FMGC/internal/navdatabasecode2");
|
||||||
var gear1 = getprop("/gear/gear[1]/wow");
|
var gear0 = getprop("/gear/gear[0]/wow");
|
||||||
var gear2 = getprop("/gear/gear[2]/wow");
|
|
||||||
var state1 = getprop("/systems/thrust/state1");
|
var state1 = getprop("/systems/thrust/state1");
|
||||||
var state2 = getprop("/systems/thrust/state2");
|
var state2 = getprop("/systems/thrust/state2");
|
||||||
var flaps = getprop("/controls/flight/flap-pos");
|
var flaps = getprop("/controls/flight/flap-pos");
|
||||||
|
@ -149,19 +148,18 @@ setlistener("/gear/gear[2]/wow", func {
|
||||||
});
|
});
|
||||||
|
|
||||||
var flarecheck = func {
|
var flarecheck = func {
|
||||||
gear1 = getprop("/gear/gear[1]/wow");
|
gear0 = getprop("/gear/gear[0]/wow");
|
||||||
gear2 = getprop("/gear/gear[2]/wow");
|
|
||||||
state1 = getprop("/systems/thrust/state1");
|
state1 = getprop("/systems/thrust/state1");
|
||||||
state2 = getprop("/systems/thrust/state2");
|
state2 = getprop("/systems/thrust/state2");
|
||||||
flaps = getprop("/controls/flight/flap-pos");
|
flaps = getprop("/controls/flight/flap-pos");
|
||||||
if (gear1 == 1 and gear2 == 1 and (state1 == "MCT" or state1 == "MAN THR" or state1 == "TOGA") and (state2 == "MCT" or state2 == "MAN THR" or state2 == "TOGA") and flaps < 4) {
|
if (gear0 == 1 and (state1 == "MCT" or state1 == "MAN THR" or state1 == "TOGA") and (state2 == "MCT" or state2 == "MAN THR" or state2 == "TOGA") and flaps < 5) {
|
||||||
setprop("/FMGC/status/to-state", 1);
|
setprop("/FMGC/status/to-state", 1);
|
||||||
}
|
}
|
||||||
if (getprop("/position/gear-agl-ft") >= 55) {
|
if (getprop("/position/gear-agl-ft") >= 55) {
|
||||||
setprop("/FMGC/status/to-state", 0);
|
setprop("/FMGC/status/to-state", 0);
|
||||||
}
|
}
|
||||||
if (gear1 == 1 and gear2 == 1 and getprop("/FMGC/status/to-state") == 0 and flaps >= 4) {
|
if (gear0 == 1 and getprop("/FMGC/status/to-state") == 0 and (flaps >= 5 or (flaps >= 4 and getprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap3-override") == 1))) {
|
||||||
setprop("/controls/flight/elevator-trim", 0.0);
|
interpolate("/controls/flight/elevator-trim", 0.0, 1.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ setlistener("/sim/signals/fdm-initialized", func {
|
||||||
var rev2 = 0;
|
var rev2 = 0;
|
||||||
var thr1 = 0;
|
var thr1 = 0;
|
||||||
var thr2 = 0;
|
var thr2 = 0;
|
||||||
|
var wow0 = getprop("/gear/gear[0]/wow");
|
||||||
var wow1 = getprop("/gear/gear[1]/wow");
|
var wow1 = getprop("/gear/gear[1]/wow");
|
||||||
var wow2 = getprop("/gear/gear[2]/wow");
|
var wow2 = getprop("/gear/gear[2]/wow");
|
||||||
var gnd_speed = getprop("/velocities/groundspeed-kt");
|
var gnd_speed = getprop("/velocities/groundspeed-kt");
|
||||||
|
@ -70,11 +71,10 @@ var absChk = maketimer(0.2, func {
|
||||||
rev2 = getprop("/engines/engine[1]/reverser-pos-norm");
|
rev2 = getprop("/engines/engine[1]/reverser-pos-norm");
|
||||||
thr1 = getprop("/controls/engines/engine[0]/throttle");
|
thr1 = getprop("/controls/engines/engine[0]/throttle");
|
||||||
thr2 = getprop("/controls/engines/engine[1]/throttle");
|
thr2 = getprop("/controls/engines/engine[1]/throttle");
|
||||||
wow1 = getprop("/gear/gear[1]/wow");
|
wow0 = getprop("/gear/gear[0]/wow");
|
||||||
wow2 = getprop("/gear/gear[2]/wow");
|
|
||||||
gnd_speed = getprop("/velocities/groundspeed-kt");
|
gnd_speed = getprop("/velocities/groundspeed-kt");
|
||||||
if (gnd_speed > 60 and rev1 < 0.01 and rev2 < 0.01) {
|
if (gnd_speed > 60 and rev1 < 0.01 and rev2 < 0.01) {
|
||||||
if (getprop("/controls/autobrake/mode") != 0 and thr1 < 0.15 and thr2 < 0.15 and wow1 and wow2) {
|
if (getprop("/controls/autobrake/mode") != 0 and thr1 < 0.15 and thr2 < 0.15 and wow0) {
|
||||||
setprop("/controls/autobrake/active", 1);
|
setprop("/controls/autobrake/active", 1);
|
||||||
if (getprop("/controls/autobrake/mode") == 1) { # LO
|
if (getprop("/controls/autobrake/mode") == 1) { # LO
|
||||||
interpolate("/controls/gear/brake-left", 0.4, 0.5);
|
interpolate("/controls/gear/brake-left", 0.4, 0.5);
|
||||||
|
|
|
@ -299,7 +299,7 @@
|
||||||
</or>
|
</or>
|
||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
<value>0.05</value>
|
<value>0.0</value>
|
||||||
</input>
|
</input>
|
||||||
<input>
|
<input>
|
||||||
<expression>
|
<expression>
|
||||||
|
@ -1087,26 +1087,14 @@
|
||||||
<input>
|
<input>
|
||||||
<condition>
|
<condition>
|
||||||
<and>
|
<and>
|
||||||
<or>
|
<equals>
|
||||||
<equals>
|
<property>/gear/gear[1]/wow</property>
|
||||||
<property>/it-autoflight/output/ap1</property>
|
<value>0</value>
|
||||||
<value>1</value>
|
</equals>
|
||||||
</equals>
|
<equals>
|
||||||
<equals>
|
<property>/gear/gear[2]/wow</property>
|
||||||
<property>/it-autoflight/output/ap2</property>
|
<value>0</value>
|
||||||
<value>1</value>
|
</equals>
|
||||||
</equals>
|
|
||||||
<and>
|
|
||||||
<equals>
|
|
||||||
<property>/gear/gear[1]/wow</property>
|
|
||||||
<value>0</value>
|
|
||||||
</equals>
|
|
||||||
<equals>
|
|
||||||
<property>/gear/gear[2]/wow</property>
|
|
||||||
<value>0</value>
|
|
||||||
</equals>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
<or>
|
<or>
|
||||||
<equals>
|
<equals>
|
||||||
<property>/it-fbw/law</property>
|
<property>/it-fbw/law</property>
|
||||||
|
@ -1150,6 +1138,33 @@
|
||||||
</condition>
|
</condition>
|
||||||
<property>/controls/flight/elevator-input-fast</property>
|
<property>/controls/flight/elevator-input-fast</property>
|
||||||
</input>
|
</input>
|
||||||
|
<input>
|
||||||
|
<condition>
|
||||||
|
<and>
|
||||||
|
<or>
|
||||||
|
<equals>
|
||||||
|
<property>/it-autoflight/output/ap1</property>
|
||||||
|
<value>1</value>
|
||||||
|
</equals>
|
||||||
|
<equals>
|
||||||
|
<property>/it-autoflight/output/ap2</property>
|
||||||
|
<value>1</value>
|
||||||
|
</equals>
|
||||||
|
</or>
|
||||||
|
<or>
|
||||||
|
<equals>
|
||||||
|
<property>/gear/gear[1]/wow</property>
|
||||||
|
<value>1</value>
|
||||||
|
</equals>
|
||||||
|
<equals>
|
||||||
|
<property>/gear/gear[2]/wow</property>
|
||||||
|
<value>1</value>
|
||||||
|
</equals>
|
||||||
|
</or>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<value>0.1</value>
|
||||||
|
</input>
|
||||||
<input>
|
<input>
|
||||||
<condition>
|
<condition>
|
||||||
<equals>
|
<equals>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
3057
|
3058
|
Reference in a new issue