Merge branch 'master' of https://github.com/it0uchpods/IDG-A32X
This commit is contained in:
commit
a40e2c4dbc
7 changed files with 147 additions and 45 deletions
|
@ -2187,16 +2187,28 @@
|
||||||
<type>select</type>
|
<type>select</type>
|
||||||
<object-name>pitch-mode-armed-box</object-name>
|
<object-name>pitch-mode-armed-box</object-name>
|
||||||
<condition>
|
<condition>
|
||||||
<or>
|
<and>
|
||||||
<equals>
|
<or>
|
||||||
<property>modes/pfd/fma/pitch-mode-armed-box</property>
|
<equals>
|
||||||
<value>1</value>
|
<property>modes/pfd/fma/pitch-mode-armed-box</property>
|
||||||
</equals>
|
<value>1</value>
|
||||||
<equals>
|
</equals>
|
||||||
<property>modes/pfd/fma/pitch-mode2-armed-box</property>
|
<equals>
|
||||||
<value>1</value>
|
<property>modes/pfd/fma/pitch-mode2-armed-box</property>
|
||||||
</equals>
|
<value>1</value>
|
||||||
</or>
|
</equals>
|
||||||
|
</or>
|
||||||
|
<or>
|
||||||
|
<not-equals>
|
||||||
|
<property>modes/pfd/fma/pitch-mode-armed</property>
|
||||||
|
<value> </value>
|
||||||
|
</not-equals>
|
||||||
|
<not-equals>
|
||||||
|
<property>modes/pfd/fma/pitch-mode2-armed</property>
|
||||||
|
<value> </value>
|
||||||
|
</not-equals>
|
||||||
|
</or>
|
||||||
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
</animation>
|
</animation>
|
||||||
|
|
||||||
|
@ -2215,10 +2227,16 @@
|
||||||
<type>select</type>
|
<type>select</type>
|
||||||
<object-name>roll-mode-armed-box</object-name>
|
<object-name>roll-mode-armed-box</object-name>
|
||||||
<condition>
|
<condition>
|
||||||
<equals>
|
<and>
|
||||||
<property>modes/pfd/fma/roll-mode-armed-box</property>
|
<equals>
|
||||||
<value>1</value>
|
<property>modes/pfd/fma/roll-mode-armed-box</property>
|
||||||
</equals>
|
<value>1</value>
|
||||||
|
</equals>
|
||||||
|
<not-equals>
|
||||||
|
<property>modes/pfd/fma/roll-mode-armed</property>
|
||||||
|
<value> </value>
|
||||||
|
</not-equals>
|
||||||
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
</animation>
|
</animation>
|
||||||
|
|
||||||
|
|
|
@ -2187,16 +2187,28 @@
|
||||||
<type>select</type>
|
<type>select</type>
|
||||||
<object-name>pitch-mode-armed-box</object-name>
|
<object-name>pitch-mode-armed-box</object-name>
|
||||||
<condition>
|
<condition>
|
||||||
<or>
|
<and>
|
||||||
<equals>
|
<or>
|
||||||
<property>modes/pfd/fma/pitch-mode-armed-box</property>
|
<equals>
|
||||||
<value>1</value>
|
<property>modes/pfd/fma/pitch-mode-armed-box</property>
|
||||||
</equals>
|
<value>1</value>
|
||||||
<equals>
|
</equals>
|
||||||
<property>modes/pfd/fma/pitch-mode2-armed-box</property>
|
<equals>
|
||||||
<value>1</value>
|
<property>modes/pfd/fma/pitch-mode2-armed-box</property>
|
||||||
</equals>
|
<value>1</value>
|
||||||
</or>
|
</equals>
|
||||||
|
</or>
|
||||||
|
<or>
|
||||||
|
<not-equals>
|
||||||
|
<property>modes/pfd/fma/pitch-mode-armed</property>
|
||||||
|
<value> </value>
|
||||||
|
</not-equals>
|
||||||
|
<not-equals>
|
||||||
|
<property>modes/pfd/fma/pitch-mode2-armed</property>
|
||||||
|
<value> </value>
|
||||||
|
</not-equals>
|
||||||
|
</or>
|
||||||
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
</animation>
|
</animation>
|
||||||
|
|
||||||
|
@ -2215,10 +2227,16 @@
|
||||||
<type>select</type>
|
<type>select</type>
|
||||||
<object-name>roll-mode-armed-box</object-name>
|
<object-name>roll-mode-armed-box</object-name>
|
||||||
<condition>
|
<condition>
|
||||||
<equals>
|
<and>
|
||||||
<property>modes/pfd/fma/roll-mode-armed-box</property>
|
<equals>
|
||||||
<value>1</value>
|
<property>modes/pfd/fma/roll-mode-armed-box</property>
|
||||||
</equals>
|
<value>1</value>
|
||||||
|
</equals>
|
||||||
|
<not-equals>
|
||||||
|
<property>modes/pfd/fma/roll-mode-armed</property>
|
||||||
|
<value> </value>
|
||||||
|
</not-equals>
|
||||||
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
</animation>
|
</animation>
|
||||||
|
|
||||||
|
|
|
@ -308,6 +308,8 @@ var vertical = func {
|
||||||
setprop("/it-autoflight/mode/vert", "ALT HLD");
|
setprop("/it-autoflight/mode/vert", "ALT HLD");
|
||||||
if (getprop("/it-autoflight/output/loc-armed")) {
|
if (getprop("/it-autoflight/output/loc-armed")) {
|
||||||
setprop("/it-autoflight/mode/arm", "LOC");
|
setprop("/it-autoflight/mode/arm", "LOC");
|
||||||
|
} else if (getprop("/it-autoflight/input/lat-arm") == 1) {
|
||||||
|
setprop("/it-autoflight/mode/arm", "LNV");
|
||||||
} else {
|
} else {
|
||||||
setprop("/it-autoflight/mode/arm", " ");
|
setprop("/it-autoflight/mode/arm", " ");
|
||||||
}
|
}
|
||||||
|
@ -328,6 +330,8 @@ var vertical = func {
|
||||||
setprop("/it-autoflight/mode/vert", "V/S");
|
setprop("/it-autoflight/mode/vert", "V/S");
|
||||||
if (getprop("/it-autoflight/output/loc-armed")) {
|
if (getprop("/it-autoflight/output/loc-armed")) {
|
||||||
setprop("/it-autoflight/mode/arm", "LOC");
|
setprop("/it-autoflight/mode/arm", "LOC");
|
||||||
|
} else if (getprop("/it-autoflight/input/lat-arm") == 1) {
|
||||||
|
setprop("/it-autoflight/mode/arm", "LNV");
|
||||||
} else {
|
} else {
|
||||||
setprop("/it-autoflight/mode/arm", " ");
|
setprop("/it-autoflight/mode/arm", " ");
|
||||||
}
|
}
|
||||||
|
@ -381,6 +385,8 @@ var vertical = func {
|
||||||
}
|
}
|
||||||
if (getprop("/it-autoflight/output/loc-armed")) {
|
if (getprop("/it-autoflight/output/loc-armed")) {
|
||||||
setprop("/it-autoflight/mode/arm", "LOC");
|
setprop("/it-autoflight/mode/arm", "LOC");
|
||||||
|
} else if (getprop("/it-autoflight/input/lat-arm") == 1) {
|
||||||
|
setprop("/it-autoflight/mode/arm", "LNV");
|
||||||
} else {
|
} else {
|
||||||
setprop("/it-autoflight/mode/arm", " ");
|
setprop("/it-autoflight/mode/arm", " ");
|
||||||
}
|
}
|
||||||
|
@ -397,8 +403,10 @@ var vertical = func {
|
||||||
setprop("/it-autoflight/input/fpa", fpanow);
|
setprop("/it-autoflight/input/fpa", fpanow);
|
||||||
setprop("/it-autoflight/output/vert", 5);
|
setprop("/it-autoflight/output/vert", 5);
|
||||||
setprop("/it-autoflight/mode/vert", "FPA");
|
setprop("/it-autoflight/mode/vert", "FPA");
|
||||||
if (getprop("/it-autoflight/output/loc-armed") == 1) {
|
if (getprop("/it-autoflight/output/loc-armed")) {
|
||||||
setprop("/it-autoflight/mode/arm", "LOC");
|
setprop("/it-autoflight/mode/arm", "LOC");
|
||||||
|
} else if (getprop("/it-autoflight/input/lat-arm") == 1) {
|
||||||
|
setprop("/it-autoflight/mode/arm", "LNV");
|
||||||
} else {
|
} else {
|
||||||
setprop("/it-autoflight/mode/arm", " ");
|
setprop("/it-autoflight/mode/arm", " ");
|
||||||
}
|
}
|
||||||
|
@ -438,6 +446,8 @@ var vertical = func {
|
||||||
setprop("/it-autoflight/internal/alt", altinput);
|
setprop("/it-autoflight/internal/alt", altinput);
|
||||||
if (getprop("/it-autoflight/output/loc-armed")) {
|
if (getprop("/it-autoflight/output/loc-armed")) {
|
||||||
setprop("/it-autoflight/mode/arm", "LOC");
|
setprop("/it-autoflight/mode/arm", "LOC");
|
||||||
|
} else if (getprop("/it-autoflight/input/lat-arm") == 1) {
|
||||||
|
setprop("/it-autoflight/mode/arm", "LNV");
|
||||||
} else {
|
} else {
|
||||||
setprop("/it-autoflight/mode/arm", " ");
|
setprop("/it-autoflight/mode/arm", " ");
|
||||||
}
|
}
|
||||||
|
@ -458,6 +468,8 @@ var vertical = func {
|
||||||
setprop("/it-autoflight/mode/vert", " ");
|
setprop("/it-autoflight/mode/vert", " ");
|
||||||
if (getprop("/it-autoflight/output/loc-armed")) {
|
if (getprop("/it-autoflight/output/loc-armed")) {
|
||||||
setprop("/it-autoflight/mode/arm", "LOC");
|
setprop("/it-autoflight/mode/arm", "LOC");
|
||||||
|
} else if (getprop("/it-autoflight/input/lat-arm") == 1) {
|
||||||
|
setprop("/it-autoflight/mode/arm", "LNV");
|
||||||
} else {
|
} else {
|
||||||
setprop("/it-autoflight/mode/arm", " ");
|
setprop("/it-autoflight/mode/arm", " ");
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,9 @@ var loopFMA = maketimer(0.05, func {
|
||||||
var thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
|
var thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
|
||||||
var thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
|
var thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
|
||||||
var wow = getprop("/gear/gear[0]/wow");
|
var wow = getprop("/gear/gear[0]/wow");
|
||||||
if ((state1 == "TOGA" or state2 == "TOGA") or (flx == 1 and (state1 == "MCT" or state2 == "MCT")) or (flx == 1 and ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)))) {
|
var engstate1 = getprop("/engines/engine[0]/state");
|
||||||
|
var engstate2 = getprop("/engines/engine[1]/state");
|
||||||
|
if (((state1 == "TOGA" or state2 == "TOGA") or (flx == 1 and (state1 == "MCT" or state2 == "MCT")) or (flx == 1 and ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)))) and (engstate1 == 3 or engstate2 == 3)) {
|
||||||
# RWY Engagement would go here, but automatic ILS selection is not simulated yet.
|
# RWY Engagement would go here, but automatic ILS selection is not simulated yet.
|
||||||
if (wow and getprop("/FMGC/internal/v2-set") == 1 and getprop("/it-autoflight/output/vert") != 7) {
|
if (wow and getprop("/FMGC/internal/v2-set") == 1 and getprop("/it-autoflight/output/vert") != 7) {
|
||||||
setprop("/it-autoflight/input/vert", 7);
|
setprop("/it-autoflight/input/vert", 7);
|
||||||
|
|
|
@ -35,6 +35,8 @@ setlistener("/sim/signals/fdm-initialized", func {
|
||||||
var thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
|
var thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
|
||||||
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 engstate1 = getprop("/engines/engine[0]/state");
|
||||||
|
var engstate2 = getprop("/engines/engine[1]/state");
|
||||||
var eprtoga = getprop("/systems/thrust/epr/toga-lim");
|
var eprtoga = getprop("/systems/thrust/epr/toga-lim");
|
||||||
var eprmct = getprop("/systems/thrust/epr/mct-lim");
|
var eprmct = getprop("/systems/thrust/epr/mct-lim");
|
||||||
var eprflx = getprop("/systems/thrust/epr/flx-lim");
|
var eprflx = getprop("/systems/thrust/epr/flx-lim");
|
||||||
|
@ -50,6 +52,8 @@ setlistener("/sim/signals/fdm-initialized", func {
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/controls/engines/engine[0]/throttle-pos", func {
|
setlistener("/controls/engines/engine[0]/throttle-pos", func {
|
||||||
|
engstate1 = getprop("/engines/engine[0]/state");
|
||||||
|
engstate2 = getprop("/engines/engine[1]/state");
|
||||||
thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
|
thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
|
||||||
if (getprop("/systems/thrust/alpha-floor") == 0 and getprop("/systems/thrust/toga-lk") == 0) {
|
if (getprop("/systems/thrust/alpha-floor") == 0 and getprop("/systems/thrust/toga-lk") == 0) {
|
||||||
if (thr1 < 0.01) {
|
if (thr1 < 0.01) {
|
||||||
|
@ -66,23 +70,20 @@ setlistener("/controls/engines/engine[0]/throttle-pos", func {
|
||||||
setprop("/systems/thrust/state1", "MAN THR");
|
setprop("/systems/thrust/state1", "MAN THR");
|
||||||
unflex();
|
unflex();
|
||||||
} else if (thr1 >= 0.78 and thr1 < 0.83) {
|
} else if (thr1 >= 0.78 and thr1 < 0.83) {
|
||||||
if (getprop("/gear/gear[0]/wow") == 1) {
|
|
||||||
setprop("/it-autoflight/input/athr", 1);
|
|
||||||
}
|
|
||||||
if (getprop("/controls/engines/thrust-limit") == "FLX") {
|
if (getprop("/controls/engines/thrust-limit") == "FLX") {
|
||||||
|
if (getprop("/gear/gear[0]/wow") == 1 and (engstate1 == 3 or engstate2 == 3)) {
|
||||||
|
setprop("/it-autoflight/input/athr", 1);
|
||||||
|
}
|
||||||
setprop("/controls/engines/engine[0]/throttle-fdm", 0.99);
|
setprop("/controls/engines/engine[0]/throttle-fdm", 0.99);
|
||||||
} else {
|
} else {
|
||||||
setprop("/controls/engines/engine[0]/throttle-fdm", 0.95);
|
setprop("/controls/engines/engine[0]/throttle-fdm", 0.95);
|
||||||
}
|
}
|
||||||
setprop("/systems/thrust/state1", "MCT");
|
setprop("/systems/thrust/state1", "MCT");
|
||||||
} else if (thr1 >= 0.83 and thr1 < 0.95) {
|
} else if (thr1 >= 0.83 and thr1 < 0.95) {
|
||||||
if (getprop("/gear/gear[0]/wow") == 1) {
|
|
||||||
setprop("/it-autoflight/input/athr", 1);
|
|
||||||
}
|
|
||||||
setprop("/systems/thrust/state1", "MAN THR");
|
setprop("/systems/thrust/state1", "MAN THR");
|
||||||
unflex();
|
unflex();
|
||||||
} else if (thr1 >= 0.95) {
|
} else if (thr1 >= 0.95) {
|
||||||
if (getprop("/gear/gear[0]/wow") == 1) {
|
if (getprop("/gear/gear[0]/wow") == 1 and (engstate1 == 3 or engstate2 == 3)) {
|
||||||
setprop("/it-autoflight/input/athr", 1);
|
setprop("/it-autoflight/input/athr", 1);
|
||||||
}
|
}
|
||||||
setprop("/controls/engines/engine[0]/throttle-fdm", 0.99);
|
setprop("/controls/engines/engine[0]/throttle-fdm", 0.99);
|
||||||
|
@ -110,6 +111,8 @@ setlistener("/controls/engines/engine[0]/throttle-pos", func {
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/controls/engines/engine[1]/throttle-pos", func {
|
setlistener("/controls/engines/engine[1]/throttle-pos", func {
|
||||||
|
engstate1 = getprop("/engines/engine[0]/state");
|
||||||
|
engstate2 = getprop("/engines/engine[1]/state");
|
||||||
thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
|
thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
|
||||||
if (getprop("/systems/thrust/alpha-floor") == 0 and getprop("/systems/thrust/toga-lk") == 0) {
|
if (getprop("/systems/thrust/alpha-floor") == 0 and getprop("/systems/thrust/toga-lk") == 0) {
|
||||||
if (thr2 < 0.01) {
|
if (thr2 < 0.01) {
|
||||||
|
@ -126,23 +129,20 @@ setlistener("/controls/engines/engine[1]/throttle-pos", func {
|
||||||
setprop("/systems/thrust/state2", "MAN THR");
|
setprop("/systems/thrust/state2", "MAN THR");
|
||||||
unflex();
|
unflex();
|
||||||
} else if (thr2 >= 0.78 and thr2 < 0.83) {
|
} else if (thr2 >= 0.78 and thr2 < 0.83) {
|
||||||
if (getprop("/gear/gear[0]/wow") == 1) {
|
|
||||||
setprop("/it-autoflight/input/athr", 1);
|
|
||||||
}
|
|
||||||
if (getprop("/controls/engines/thrust-limit") == "FLX") {
|
if (getprop("/controls/engines/thrust-limit") == "FLX") {
|
||||||
|
if (getprop("/gear/gear[0]/wow") == 1 and (engstate1 == 3 or engstate2 == 3)) {
|
||||||
|
setprop("/it-autoflight/input/athr", 1);
|
||||||
|
}
|
||||||
setprop("/controls/engines/engine[1]/throttle-fdm", 0.99);
|
setprop("/controls/engines/engine[1]/throttle-fdm", 0.99);
|
||||||
} else {
|
} else {
|
||||||
setprop("/controls/engines/engine[1]/throttle-fdm", 0.95);
|
setprop("/controls/engines/engine[1]/throttle-fdm", 0.95);
|
||||||
}
|
}
|
||||||
setprop("/systems/thrust/state2", "MCT");
|
setprop("/systems/thrust/state2", "MCT");
|
||||||
} else if (thr2 >= 0.83 and thr2 < 0.95) {
|
} else if (thr2 >= 0.83 and thr2 < 0.95) {
|
||||||
if (getprop("/gear/gear[0]/wow") == 1) {
|
|
||||||
setprop("/it-autoflight/input/athr", 1);
|
|
||||||
}
|
|
||||||
setprop("/systems/thrust/state2", "MAN THR");
|
setprop("/systems/thrust/state2", "MAN THR");
|
||||||
unflex();
|
unflex();
|
||||||
} else if (thr2 >= 0.95) {
|
} else if (thr2 >= 0.95) {
|
||||||
if (getprop("/gear/gear[0]/wow") == 1) {
|
if (getprop("/gear/gear[0]/wow") == 1 and (engstate1 == 3 or engstate2 == 3)) {
|
||||||
setprop("/it-autoflight/input/athr", 1);
|
setprop("/it-autoflight/input/athr", 1);
|
||||||
}
|
}
|
||||||
setprop("/controls/engines/engine[1]/throttle-fdm", 0.99);
|
setprop("/controls/engines/engine[1]/throttle-fdm", 0.99);
|
||||||
|
|
|
@ -1330,6 +1330,50 @@
|
||||||
<!-- =============================================================== -->
|
<!-- =============================================================== -->
|
||||||
<!-- Yaw Damper/Turn Coordinator -->
|
<!-- Yaw Damper/Turn Coordinator -->
|
||||||
<!-- =============================================================== -->
|
<!-- =============================================================== -->
|
||||||
|
|
||||||
|
<filter>
|
||||||
|
<name>IT-FBW: YAW DAMPER/TURN COORDINATOR FEEDBACK IF DISABLED</name>
|
||||||
|
<enable>
|
||||||
|
<condition>
|
||||||
|
<or>
|
||||||
|
<equals>
|
||||||
|
<property>/gear/gear[1]/wow</property>
|
||||||
|
<value>1</value>
|
||||||
|
</equals>
|
||||||
|
<equals>
|
||||||
|
<property>/gear/gear[2]/wow</property>
|
||||||
|
<value>1</value>
|
||||||
|
</equals>
|
||||||
|
<not-equals>
|
||||||
|
<property>/it-fbw/law</property>
|
||||||
|
<value>0</value>
|
||||||
|
</not-equals>
|
||||||
|
<greater-than-equals>
|
||||||
|
<property>/controls/flight/rudder</property>
|
||||||
|
<value>0.1</value>
|
||||||
|
</greater-than-equals>
|
||||||
|
<less-than-equals>
|
||||||
|
<property>/controls/flight/rudder</property>
|
||||||
|
<value>-0.1</value>
|
||||||
|
</less-than-equals>
|
||||||
|
<less-than>
|
||||||
|
<property>/position/gear-agl-ft</property>
|
||||||
|
<value>50</value>
|
||||||
|
</less-than>
|
||||||
|
<equals>
|
||||||
|
<property>/it-autoflight/output/lat</property>
|
||||||
|
<value>4</value>
|
||||||
|
</equals>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
</enable>
|
||||||
|
<type>gain</type>
|
||||||
|
<gain>1</gain>
|
||||||
|
<input>/controls/flight/rudder-fbw</input>
|
||||||
|
<output>/controls/flight/rudder-fbw-cmd</output>
|
||||||
|
<min>-0.2</min>
|
||||||
|
<max>0.2</max>
|
||||||
|
</filter>
|
||||||
|
|
||||||
<pid-controller>
|
<pid-controller>
|
||||||
<name>IT-FBW: YAW DAMPER/TURN COORDINATOR</name>
|
<name>IT-FBW: YAW DAMPER/TURN COORDINATOR</name>
|
||||||
|
@ -1357,6 +1401,14 @@
|
||||||
<property>/it-autoflight/output/lat</property>
|
<property>/it-autoflight/output/lat</property>
|
||||||
<value>4</value>
|
<value>4</value>
|
||||||
</not-equals>
|
</not-equals>
|
||||||
|
<less-than>
|
||||||
|
<property>/controls/flight/rudder</property>
|
||||||
|
<value>0.1</value>
|
||||||
|
</less-than>
|
||||||
|
<greater-than>
|
||||||
|
<property>/controls/flight/rudder</property>
|
||||||
|
<value>-0.1</value>
|
||||||
|
</greater-than>
|
||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
</enable>
|
</enable>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
3040
|
3043
|
Reference in a new issue