A3XX: Prepare for Alpha Floor
This commit is contained in:
parent
4a062364e0
commit
2654eb0341
8 changed files with 228 additions and 87 deletions
|
@ -2052,6 +2052,14 @@
|
||||||
<object-name>throttle-mode-box</object-name>
|
<object-name>throttle-mode-box</object-name>
|
||||||
<condition>
|
<condition>
|
||||||
<and>
|
<and>
|
||||||
|
<equals>
|
||||||
|
<property>systems/thrust/alpha-floor</property>
|
||||||
|
<value>0</value>
|
||||||
|
</equals>
|
||||||
|
<equals>
|
||||||
|
<property>systems/thrust/toga-lk</property>
|
||||||
|
<value>0</value>
|
||||||
|
</equals>
|
||||||
<equals>
|
<equals>
|
||||||
<property>it-autoflight/output/athr</property>
|
<property>it-autoflight/output/athr</property>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
|
@ -2980,7 +2988,7 @@
|
||||||
<font type="string">helvetica_medium.txf</font>
|
<font type="string">helvetica_medium.txf</font>
|
||||||
<draw-text type="bool">true</draw-text>
|
<draw-text type="bool">true</draw-text>
|
||||||
<draw-alignment type="bool">false</draw-alignment>
|
<draw-alignment type="bool">false</draw-alignment>
|
||||||
<draw-boundingbox type="bool">true</draw-boundingbox>
|
<draw-boundingbox type="bool">false</draw-boundingbox>
|
||||||
<character-size>0.0055</character-size>
|
<character-size>0.0055</character-size>
|
||||||
<font-resolution>
|
<font-resolution>
|
||||||
<width type="int">32</width>
|
<width type="int">32</width>
|
||||||
|
@ -3003,7 +3011,7 @@
|
||||||
<font type="string">helvetica_medium.txf</font>
|
<font type="string">helvetica_medium.txf</font>
|
||||||
<draw-text type="bool">true</draw-text>
|
<draw-text type="bool">true</draw-text>
|
||||||
<draw-alignment type="bool">false</draw-alignment>
|
<draw-alignment type="bool">false</draw-alignment>
|
||||||
<draw-boundingbox type="bool">true</draw-boundingbox>
|
<draw-boundingbox type="bool">false</draw-boundingbox>
|
||||||
<character-size>0.0055</character-size>
|
<character-size>0.0055</character-size>
|
||||||
<font-resolution>
|
<font-resolution>
|
||||||
<width type="int">32</width>
|
<width type="int">32</width>
|
||||||
|
@ -3045,6 +3053,24 @@
|
||||||
</condition>
|
</condition>
|
||||||
</animation>
|
</animation>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>select</type>
|
||||||
|
<object-name>athr-afloor-fma</object-name>
|
||||||
|
<object-name>alpha-floor-box</object-name>
|
||||||
|
<condition>
|
||||||
|
<or>
|
||||||
|
<equals>
|
||||||
|
<property>systems/thrust/alpha-floor</property>
|
||||||
|
<value>1</value>
|
||||||
|
</equals>
|
||||||
|
<equals>
|
||||||
|
<property>systems/thrust/toga-lk</property>
|
||||||
|
<value>1</value>
|
||||||
|
</equals>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
</animation>
|
||||||
|
|
||||||
<!-- Manually Set Altitude -->
|
<!-- Manually Set Altitude -->
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
|
@ -3567,6 +3593,8 @@
|
||||||
<object-name>pitch-mode-fma</object-name>
|
<object-name>pitch-mode-fma</object-name>
|
||||||
<object-name>land-mode-fma</object-name>
|
<object-name>land-mode-fma</object-name>
|
||||||
<object-name>roll-mode-fma</object-name>
|
<object-name>roll-mode-fma</object-name>
|
||||||
|
<object-name>athr-afloor-fma</object-name>
|
||||||
|
<object-name>athr-togalk-fma</object-name>
|
||||||
<diffuse>
|
<diffuse>
|
||||||
<red>0</red>
|
<red>0</red>
|
||||||
<green>0.843</green>
|
<green>0.843</green>
|
||||||
|
@ -3702,8 +3730,6 @@
|
||||||
<!-- Amber -->
|
<!-- Amber -->
|
||||||
<animation>
|
<animation>
|
||||||
<type>material</type>
|
<type>material</type>
|
||||||
<object-name>athr-afloor-fma</object-name>
|
|
||||||
<object-name>athr-togalk-fma</object-name>
|
|
||||||
<object-name>usemanpitchtrim</object-name>
|
<object-name>usemanpitchtrim</object-name>
|
||||||
<diffuse>
|
<diffuse>
|
||||||
<red>1</red>
|
<red>1</red>
|
||||||
|
|
|
@ -2052,6 +2052,14 @@
|
||||||
<object-name>throttle-mode-box</object-name>
|
<object-name>throttle-mode-box</object-name>
|
||||||
<condition>
|
<condition>
|
||||||
<and>
|
<and>
|
||||||
|
<equals>
|
||||||
|
<property>systems/thrust/alpha-floor</property>
|
||||||
|
<value>0</value>
|
||||||
|
</equals>
|
||||||
|
<equals>
|
||||||
|
<property>systems/thrust/toga-lk</property>
|
||||||
|
<value>0</value>
|
||||||
|
</equals>
|
||||||
<equals>
|
<equals>
|
||||||
<property>it-autoflight/output/athr</property>
|
<property>it-autoflight/output/athr</property>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
|
@ -2980,7 +2988,7 @@
|
||||||
<font type="string">helvetica_medium.txf</font>
|
<font type="string">helvetica_medium.txf</font>
|
||||||
<draw-text type="bool">true</draw-text>
|
<draw-text type="bool">true</draw-text>
|
||||||
<draw-alignment type="bool">false</draw-alignment>
|
<draw-alignment type="bool">false</draw-alignment>
|
||||||
<draw-boundingbox type="bool">true</draw-boundingbox>
|
<draw-boundingbox type="bool">false</draw-boundingbox>
|
||||||
<character-size>0.0055</character-size>
|
<character-size>0.0055</character-size>
|
||||||
<font-resolution>
|
<font-resolution>
|
||||||
<width type="int">32</width>
|
<width type="int">32</width>
|
||||||
|
@ -3003,7 +3011,7 @@
|
||||||
<font type="string">helvetica_medium.txf</font>
|
<font type="string">helvetica_medium.txf</font>
|
||||||
<draw-text type="bool">true</draw-text>
|
<draw-text type="bool">true</draw-text>
|
||||||
<draw-alignment type="bool">false</draw-alignment>
|
<draw-alignment type="bool">false</draw-alignment>
|
||||||
<draw-boundingbox type="bool">true</draw-boundingbox>
|
<draw-boundingbox type="bool">false</draw-boundingbox>
|
||||||
<character-size>0.0055</character-size>
|
<character-size>0.0055</character-size>
|
||||||
<font-resolution>
|
<font-resolution>
|
||||||
<width type="int">32</width>
|
<width type="int">32</width>
|
||||||
|
@ -3045,6 +3053,24 @@
|
||||||
</condition>
|
</condition>
|
||||||
</animation>
|
</animation>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>select</type>
|
||||||
|
<object-name>athr-afloor-fma</object-name>
|
||||||
|
<object-name>alpha-floor-box</object-name>
|
||||||
|
<condition>
|
||||||
|
<or>
|
||||||
|
<equals>
|
||||||
|
<property>systems/thrust/alpha-floor</property>
|
||||||
|
<value>1</value>
|
||||||
|
</equals>
|
||||||
|
<equals>
|
||||||
|
<property>systems/thrust/toga-lk</property>
|
||||||
|
<value>1</value>
|
||||||
|
</equals>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
</animation>
|
||||||
|
|
||||||
<!-- Manually Set Altitude -->
|
<!-- Manually Set Altitude -->
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
|
@ -3567,6 +3593,8 @@
|
||||||
<object-name>pitch-mode-fma</object-name>
|
<object-name>pitch-mode-fma</object-name>
|
||||||
<object-name>land-mode-fma</object-name>
|
<object-name>land-mode-fma</object-name>
|
||||||
<object-name>roll-mode-fma</object-name>
|
<object-name>roll-mode-fma</object-name>
|
||||||
|
<object-name>athr-afloor-fma</object-name>
|
||||||
|
<object-name>athr-togalk-fma</object-name>
|
||||||
<diffuse>
|
<diffuse>
|
||||||
<red>0</red>
|
<red>0</red>
|
||||||
<green>0.843</green>
|
<green>0.843</green>
|
||||||
|
@ -3702,8 +3730,6 @@
|
||||||
<!-- Amber -->
|
<!-- Amber -->
|
||||||
<animation>
|
<animation>
|
||||||
<type>material</type>
|
<type>material</type>
|
||||||
<object-name>athr-afloor-fma</object-name>
|
|
||||||
<object-name>athr-togalk-fma</object-name>
|
|
||||||
<object-name>usemanpitchtrim</object-name>
|
<object-name>usemanpitchtrim</object-name>
|
||||||
<diffuse>
|
<diffuse>
|
||||||
<red>1</red>
|
<red>1</red>
|
||||||
|
|
BIN
Models/Instruments/PFD/res/box-amber.png
Normal file
BIN
Models/Instruments/PFD/res/box-amber.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 65 KiB |
|
@ -3,7 +3,61 @@ MATERIAL "ac3dmat1" rgb 1 1 1 amb 0 0 0 emis 0.658824 0.670588 0.67451 spec 0
|
||||||
MATERIAL "white" rgb 1 1 1 amb 1 1 1 emis 0.798 0.798 0.798 spec 0 0 0 shi 0 trans 0
|
MATERIAL "white" rgb 1 1 1 amb 1 1 1 emis 0.798 0.798 0.798 spec 0 0 0 shi 0 trans 0
|
||||||
MATERIAL "ac3dmat0" rgb 0 0 0 amb 0 0 0 emis 0 0 0 spec 0 0 0 shi 0 trans 0
|
MATERIAL "ac3dmat0" rgb 0 0 0 amb 0 0 0 emis 0 0 0 spec 0 0 0 shi 0 trans 0
|
||||||
OBJECT world
|
OBJECT world
|
||||||
kids 54
|
kids 55
|
||||||
|
OBJECT poly
|
||||||
|
name "alpha-floor-box"
|
||||||
|
loc 0.000391098 0.0698612 0.054728
|
||||||
|
data 6
|
||||||
|
Circle
|
||||||
|
texture "box-amber.png"
|
||||||
|
crease 30.000000
|
||||||
|
numvert 16
|
||||||
|
0 -0.00181732 -0.0145195
|
||||||
|
0 -0.00242402 -0.0145195
|
||||||
|
0 -0.00242404 0.0144925
|
||||||
|
0 -0.00181733 0.0144925
|
||||||
|
0 0.00457313 -0.0144955
|
||||||
|
0 0.00396641 -0.0144955
|
||||||
|
0 0.00396641 0.0145165
|
||||||
|
0 0.00457313 0.0145165
|
||||||
|
0 0.00462595 0.0151633
|
||||||
|
0 0.00462595 0.0145566
|
||||||
|
0 -0.00248282 0.0145566
|
||||||
|
0 -0.00248282 0.0151633
|
||||||
|
0 0.004665 -0.0145566
|
||||||
|
0 0.004665 -0.0151633
|
||||||
|
0 -0.00244377 -0.0151633
|
||||||
|
0 -0.00244377 -0.0145566
|
||||||
|
numsurf 4
|
||||||
|
SURF 0x0
|
||||||
|
mat 1
|
||||||
|
refs 4
|
||||||
|
3 0.654297 0.439453
|
||||||
|
2 0.679687 0.439453
|
||||||
|
1 0.679687 0.464844
|
||||||
|
0 0.654297 0.464844
|
||||||
|
SURF 0x0
|
||||||
|
mat 1
|
||||||
|
refs 4
|
||||||
|
7 0.654297 0.439453
|
||||||
|
6 0.679687 0.439453
|
||||||
|
5 0.679687 0.464844
|
||||||
|
4 0.654297 0.464844
|
||||||
|
SURF 0x0
|
||||||
|
mat 1
|
||||||
|
refs 4
|
||||||
|
11 0.654297 0.439453
|
||||||
|
10 0.679687 0.439453
|
||||||
|
9 0.679687 0.464844
|
||||||
|
8 0.654297 0.464844
|
||||||
|
SURF 0x0
|
||||||
|
mat 1
|
||||||
|
refs 4
|
||||||
|
15 0.654297 0.439453
|
||||||
|
14 0.679687 0.439453
|
||||||
|
13 0.679687 0.464844
|
||||||
|
12 0.654297 0.464844
|
||||||
|
kids 0
|
||||||
OBJECT poly
|
OBJECT poly
|
||||||
name "horizonhdg"
|
name "horizonhdg"
|
||||||
loc -0.000614104 0.000830183 0.00541043
|
loc -0.000614104 0.000830183 0.00541043
|
||||||
|
@ -392,7 +446,7 @@ refs 4
|
||||||
kids 0
|
kids 0
|
||||||
OBJECT poly
|
OBJECT poly
|
||||||
name "throttle-mode-box"
|
name "throttle-mode-box"
|
||||||
loc 0.000380651 0.0698612 0.054728
|
loc 0.000384133 0.0698612 0.054728
|
||||||
data 6
|
data 6
|
||||||
Circle
|
Circle
|
||||||
texture "box.png"
|
texture "box.png"
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
setprop("/FMGC/internal/overspeed", 338);
|
setprop("/FMGC/internal/overspeed", 338);
|
||||||
setprop("/FMGC/internal/minspeed", 204);
|
setprop("/FMGC/internal/minspeed", 204);
|
||||||
|
setprop("/FMGC/internal/alpha-prot-speed", 193);
|
||||||
setprop("/position/gear-agl-ft", 0);
|
setprop("/position/gear-agl-ft", 0);
|
||||||
setprop("/FMGC/internal/mng-spd", 157);
|
setprop("/FMGC/internal/mng-spd", 157);
|
||||||
setprop("/FMGC/internal/mng-spd-cmd", 157);
|
setprop("/FMGC/internal/mng-spd-cmd", 157);
|
||||||
|
@ -248,21 +249,27 @@ var phasecheck = maketimer(0.2, func {
|
||||||
if (flap == 0) {
|
if (flap == 0) {
|
||||||
setprop("/FMGC/internal/overspeed", 338);
|
setprop("/FMGC/internal/overspeed", 338);
|
||||||
setprop("/FMGC/internal/minspeed", 202);
|
setprop("/FMGC/internal/minspeed", 202);
|
||||||
|
setprop("/FMGC/internal/alpha-prot-speed", 187);
|
||||||
} else if (flap == 1) {
|
} else if (flap == 1) {
|
||||||
setprop("/FMGC/internal/overspeed", 216);
|
setprop("/FMGC/internal/overspeed", 216);
|
||||||
setprop("/FMGC/internal/minspeed", 184);
|
setprop("/FMGC/internal/minspeed", 184);
|
||||||
|
setprop("/FMGC/internal/alpha-prot-speed", 167);
|
||||||
} else if (flap == 2) {
|
} else if (flap == 2) {
|
||||||
setprop("/FMGC/internal/overspeed", 207);
|
setprop("/FMGC/internal/overspeed", 207);
|
||||||
setprop("/FMGC/internal/minspeed", 169);
|
setprop("/FMGC/internal/minspeed", 171);
|
||||||
|
setprop("/FMGC/internal/alpha-prot-speed", 154);
|
||||||
} else if (flap == 3) {
|
} else if (flap == 3) {
|
||||||
setprop("/FMGC/internal/overspeed", 189);
|
setprop("/FMGC/internal/overspeed", 189);
|
||||||
setprop("/FMGC/internal/minspeed", 156);
|
setprop("/FMGC/internal/minspeed", 156);
|
||||||
|
setprop("/FMGC/internal/alpha-prot-speed", 143);
|
||||||
} else if (flap == 4) {
|
} else if (flap == 4) {
|
||||||
setprop("/FMGC/internal/overspeed", 174);
|
setprop("/FMGC/internal/overspeed", 174);
|
||||||
setprop("/FMGC/internal/minspeed", 147);
|
setprop("/FMGC/internal/minspeed", 147);
|
||||||
|
setprop("/FMGC/internal/alpha-prot-speed", 138);
|
||||||
} else if (flap == 5) {
|
} else if (flap == 5) {
|
||||||
setprop("/FMGC/internal/overspeed", 163);
|
setprop("/FMGC/internal/overspeed", 163);
|
||||||
setprop("/FMGC/internal/minspeed", 134);
|
setprop("/FMGC/internal/minspeed", 134);
|
||||||
|
setprop("/FMGC/internal/alpha-prot-speed", 123);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -139,6 +139,19 @@ var CVR_master = func {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#setlistener("/it-autoflight/input/spd-kts", func {
|
||||||
|
# if (getprop("/it-autoflight/input/spd-kts") < getprop("/FMGC/internal/alpha-prot-speed")) {
|
||||||
|
# setprop("/it-autoflight/input/spd-kts", getprop("/FMGC/internal/alpha-prot-speed"));
|
||||||
|
# }
|
||||||
|
#});
|
||||||
|
|
||||||
|
#setlistener("/it-autoflight/input/spd-mach", func {
|
||||||
|
# var alphaProtMach = (getprop("/instrumentation/airspeed-indicator/indicated-mach") / getprop("/instrumentation/airspeed-indicator/indicated-speed-kt") * getprop("/FMGC/internal/alpha-prot-speed"));
|
||||||
|
# if (getprop("/it-autoflight/input/spd-mach") < alphaProtMach) {
|
||||||
|
# setprop("/it-autoflight/input/spd-mach", alphaProtMach);
|
||||||
|
# }
|
||||||
|
#});
|
||||||
|
|
||||||
var mcpSPDKnbPull = func {
|
var mcpSPDKnbPull = func {
|
||||||
setprop("/it-autoflight/input/spd-managed", 0);
|
setprop("/it-autoflight/input/spd-managed", 0);
|
||||||
fmgc.ManagedSPD.stop();
|
fmgc.ManagedSPD.stop();
|
||||||
|
@ -235,7 +248,6 @@ var decreaseManVS = func {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var update_CVR = func {
|
var update_CVR = func {
|
||||||
CVR_master();
|
CVR_master();
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,114 +31,141 @@ setprop("/systems/thrust/lim-flex", 0);
|
||||||
setprop("/engines/flex-derate", 0);
|
setprop("/engines/flex-derate", 0);
|
||||||
|
|
||||||
setlistener("/sim/signals/fdm-initialized", func {
|
setlistener("/sim/signals/fdm-initialized", func {
|
||||||
|
var thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
|
||||||
|
var thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
|
||||||
|
var state1 = getprop("/systems/thrust/state1");
|
||||||
|
var state2 = getprop("/systems/thrust/state2");
|
||||||
|
var eprtoga = getprop("/systems/thrust/epr/toga-lim");
|
||||||
|
var eprmct = getprop("/systems/thrust/epr/mct-lim");
|
||||||
|
var eprflx = getprop("/systems/thrust/epr/flx-lim");
|
||||||
|
var eprclb = getprop("/systems/thrust/epr/clb-lim");
|
||||||
|
var n1toga = getprop("/systems/thrust/n1/toga-lim");
|
||||||
|
var n1mct = getprop("/systems/thrust/n1/mct-lim");
|
||||||
|
var n1flx = getprop("/systems/thrust/n1/flx-lim");
|
||||||
|
var n1clb = getprop("/systems/thrust/n1/clb-lim");
|
||||||
|
var ias = getprop("/velocities/airspeed-kt");
|
||||||
|
var flaps = getprop("/controls/flight/flap-pos");
|
||||||
|
var alphaProtSpd = getprop("/FMGC/internal/alpha-prot-speed");
|
||||||
thrustt.start();
|
thrustt.start();
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/controls/engines/engine[0]/throttle-pos", func {
|
setlistener("/controls/engines/engine[0]/throttle-pos", func {
|
||||||
var thrr = 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 (thrr < 0.01) {
|
if (thr1 < 0.01) {
|
||||||
setprop("/systems/thrust/state1", "IDLE");
|
setprop("/systems/thrust/state1", "IDLE");
|
||||||
unflex();
|
unflex();
|
||||||
atoff_request();
|
atoff_request();
|
||||||
} else if (thrr >= 0.01 and thrr < 0.60) {
|
} else if (thr1 >= 0.01 and thr1 < 0.60) {
|
||||||
setprop("/systems/thrust/state1", "MAN");
|
setprop("/systems/thrust/state1", "MAN");
|
||||||
unflex();
|
unflex();
|
||||||
} else if (thrr >= 0.60 and thrr < 0.65) {
|
} else if (thr1 >= 0.60 and thr1 < 0.65) {
|
||||||
setprop("/systems/thrust/state1", "CL");
|
setprop("/systems/thrust/state1", "CL");
|
||||||
unflex();
|
unflex();
|
||||||
} else if (thrr >= 0.65 and thrr < 0.78) {
|
} else if (thr1 >= 0.65 and thr1 < 0.78) {
|
||||||
setprop("/systems/thrust/state1", "MAN THR");
|
setprop("/systems/thrust/state1", "MAN THR");
|
||||||
unflex();
|
unflex();
|
||||||
} else if (thrr >= 0.78 and thrr < 0.83) {
|
} else if (thr1 >= 0.78 and thr1 < 0.83) {
|
||||||
setprop("/it-autoflight/input/athr", 1);
|
if (getprop("/gear/gear[1]/wow") == 1 or getprop("/gear/gear[2]/wow") == 1) {
|
||||||
|
setprop("/it-autoflight/input/athr", 1);
|
||||||
|
}
|
||||||
if (getprop("/controls/engines/thrust-limit") == "FLX") {
|
if (getprop("/controls/engines/thrust-limit") == "FLX") {
|
||||||
setprop("/controls/engines/engine[0]/throttle-fdm", 0.97);
|
setprop("/controls/engines/engine[0]/throttle-fdm", 0.97);
|
||||||
} else {
|
} else {
|
||||||
setprop("/controls/engines/engine[0]/throttle-fdm", 0.94);
|
setprop("/controls/engines/engine[0]/throttle-fdm", 0.94);
|
||||||
}
|
}
|
||||||
setprop("/systems/thrust/state1", "MCT");
|
setprop("/systems/thrust/state1", "MCT");
|
||||||
} else if (thrr >= 0.83 and thrr < 0.95) {
|
} else if (thr1 >= 0.83 and thr1 < 0.95) {
|
||||||
setprop("/it-autoflight/input/athr", 1);
|
if (getprop("/gear/gear[1]/wow") == 1 or getprop("/gear/gear[2]/wow") == 1) {
|
||||||
|
setprop("/it-autoflight/input/athr", 1);
|
||||||
|
}
|
||||||
setprop("/systems/thrust/state1", "MAN THR");
|
setprop("/systems/thrust/state1", "MAN THR");
|
||||||
unflex();
|
unflex();
|
||||||
} else if (thrr >= 0.95) {
|
} else if (thr1 >= 0.95) {
|
||||||
setprop("/it-autoflight/input/athr", 1);
|
if (getprop("/gear/gear[1]/wow") == 1 or getprop("/gear/gear[2]/wow") == 1) {
|
||||||
|
setprop("/it-autoflight/input/athr", 1);
|
||||||
|
}
|
||||||
setprop("/controls/engines/engine[0]/throttle-fdm", 0.97);
|
setprop("/controls/engines/engine[0]/throttle-fdm", 0.97);
|
||||||
setprop("/systems/thrust/state1", "TOGA");
|
setprop("/systems/thrust/state1", "TOGA");
|
||||||
unflex();
|
unflex();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (thrr < 0.01) {
|
if (thr1 < 0.01) {
|
||||||
setprop("/systems/thrust/state1", "IDLE");
|
setprop("/systems/thrust/state1", "IDLE");
|
||||||
} else if (thrr >= 0.01 and thrr < 0.60) {
|
} else if (thr1 >= 0.01 and thr1 < 0.60) {
|
||||||
setprop("/systems/thrust/state1", "MAN");
|
setprop("/systems/thrust/state1", "MAN");
|
||||||
} else if (thrr >= 0.60 and thrr < 0.65) {
|
} else if (thr1 >= 0.60 and thr1 < 0.65) {
|
||||||
setprop("/systems/thrust/state1", "CL");
|
setprop("/systems/thrust/state1", "CL");
|
||||||
} else if (thrr >= 0.65 and thrr < 0.78) {
|
} else if (thr1 >= 0.65 and thr1 < 0.78) {
|
||||||
setprop("/systems/thrust/state1", "MAN THR");
|
setprop("/systems/thrust/state1", "MAN THR");
|
||||||
} else if (thrr >= 0.78 and thrr < 0.83) {
|
} else if (thr1 >= 0.78 and thr1 < 0.83) {
|
||||||
setprop("/systems/thrust/state1", "MCT");
|
setprop("/systems/thrust/state1", "MCT");
|
||||||
} else if (thrr >= 0.83 and thrr < 0.95) {
|
} else if (thr1 >= 0.83 and thr1 < 0.95) {
|
||||||
setprop("/systems/thrust/state1", "MAN THR");
|
setprop("/systems/thrust/state1", "MAN THR");
|
||||||
} else if (thrr >= 0.95) {
|
} else if (thr1 >= 0.95) {
|
||||||
setprop("/systems/thrust/state1", "TOGA");
|
setprop("/systems/thrust/state1", "TOGA");
|
||||||
}
|
}
|
||||||
setprop("/controls/engines/engine[0]/throttle-fdm", 1.00);
|
setprop("/controls/engines/engine[0]/throttle-fdm", 0.97);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/controls/engines/engine[1]/throttle-pos", func {
|
setlistener("/controls/engines/engine[1]/throttle-pos", func {
|
||||||
var thrr = 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 (thrr < 0.01) {
|
if (thr2 < 0.01) {
|
||||||
setprop("/systems/thrust/state2", "IDLE");
|
setprop("/systems/thrust/state2", "IDLE");
|
||||||
unflex();
|
unflex();
|
||||||
atoff_request();
|
atoff_request();
|
||||||
} else if (thrr >= 0.01 and thrr < 0.60) {
|
} else if (thr2 >= 0.01 and thr2 < 0.60) {
|
||||||
setprop("/systems/thrust/state2", "MAN");
|
setprop("/systems/thrust/state2", "MAN");
|
||||||
unflex();
|
unflex();
|
||||||
} else if (thrr >= 0.60 and thrr < 0.65) {
|
} else if (thr2 >= 0.60 and thr2 < 0.65) {
|
||||||
setprop("/systems/thrust/state2", "CL");
|
setprop("/systems/thrust/state2", "CL");
|
||||||
unflex();
|
unflex();
|
||||||
} else if (thrr >= 0.65 and thrr < 0.78) {
|
} else if (thr2 >= 0.65 and thr2 < 0.78) {
|
||||||
setprop("/systems/thrust/state2", "MAN THR");
|
setprop("/systems/thrust/state2", "MAN THR");
|
||||||
unflex();
|
unflex();
|
||||||
} else if (thrr >= 0.78 and thrr < 0.83) {
|
} else if (thr2 >= 0.78 and thr2 < 0.83) {
|
||||||
setprop("/it-autoflight/input/athr", 1);
|
if (getprop("/gear/gear[1]/wow") == 1 or getprop("/gear/gear[2]/wow") == 1) {
|
||||||
|
setprop("/it-autoflight/input/athr", 1);
|
||||||
|
}
|
||||||
if (getprop("/controls/engines/thrust-limit") == "FLX") {
|
if (getprop("/controls/engines/thrust-limit") == "FLX") {
|
||||||
setprop("/controls/engines/engine[1]/throttle-fdm", 0.97);
|
setprop("/controls/engines/engine[1]/throttle-fdm", 0.97);
|
||||||
} else {
|
} else {
|
||||||
setprop("/controls/engines/engine[1]/throttle-fdm", 0.94);
|
setprop("/controls/engines/engine[1]/throttle-fdm", 0.94);
|
||||||
}
|
}
|
||||||
setprop("/systems/thrust/state2", "MCT");
|
setprop("/systems/thrust/state2", "MCT");
|
||||||
} else if (thrr >= 0.83 and thrr < 0.95) {
|
} else if (thr2 >= 0.83 and thr2 < 0.95) {
|
||||||
setprop("/it-autoflight/input/athr", 1);
|
if (getprop("/gear/gear[1]/wow") == 1 or getprop("/gear/gear[2]/wow") == 1) {
|
||||||
|
setprop("/it-autoflight/input/athr", 1);
|
||||||
|
}
|
||||||
setprop("/systems/thrust/state2", "MAN THR");
|
setprop("/systems/thrust/state2", "MAN THR");
|
||||||
unflex();
|
unflex();
|
||||||
} else if (thrr >= 0.95) {
|
} else if (thr2 >= 0.95) {
|
||||||
setprop("/it-autoflight/input/athr", 1);
|
if (getprop("/gear/gear[1]/wow") == 1 or getprop("/gear/gear[2]/wow") == 1) {
|
||||||
|
setprop("/it-autoflight/input/athr", 1);
|
||||||
|
}
|
||||||
setprop("/controls/engines/engine[1]/throttle-fdm", 0.97);
|
setprop("/controls/engines/engine[1]/throttle-fdm", 0.97);
|
||||||
setprop("/systems/thrust/state2", "TOGA");
|
setprop("/systems/thrust/state2", "TOGA");
|
||||||
unflex();
|
unflex();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (thrr < 0.01) {
|
if (thr2 < 0.01) {
|
||||||
setprop("/systems/thrust/state2", "IDLE");
|
setprop("/systems/thrust/state2", "IDLE");
|
||||||
} else if (thrr >= 0.01 and thrr < 0.60) {
|
} else if (thr2 >= 0.01 and thr2 < 0.60) {
|
||||||
setprop("/systems/thrust/state2", "MAN");
|
setprop("/systems/thrust/state2", "MAN");
|
||||||
} else if (thrr >= 0.60 and thrr < 0.65) {
|
} else if (thr2 >= 0.60 and thr2 < 0.65) {
|
||||||
setprop("/systems/thrust/state2", "CL");
|
setprop("/systems/thrust/state2", "CL");
|
||||||
} else if (thrr >= 0.65 and thrr < 0.78) {
|
} else if (thr2 >= 0.65 and thr2 < 0.78) {
|
||||||
setprop("/systems/thrust/state2", "MAN THR");
|
setprop("/systems/thrust/state2", "MAN THR");
|
||||||
} else if (thrr >= 0.78 and thrr < 0.83) {
|
} else if (thr2 >= 0.78 and thr2 < 0.83) {
|
||||||
setprop("/systems/thrust/state2", "MCT");
|
setprop("/systems/thrust/state2", "MCT");
|
||||||
} else if (thrr >= 0.83 and thrr < 0.95) {
|
} else if (thr2 >= 0.83 and thr2 < 0.95) {
|
||||||
setprop("/systems/thrust/state2", "MAN THR");
|
setprop("/systems/thrust/state2", "MAN THR");
|
||||||
} else if (thrr >= 0.95) {
|
} else if (thr2 >= 0.95) {
|
||||||
setprop("/systems/thrust/state2", "TOGA");
|
setprop("/systems/thrust/state2", "TOGA");
|
||||||
}
|
}
|
||||||
setprop("/controls/engines/engine[1]/throttle-fdm", 1.00);
|
setprop("/controls/engines/engine[1]/throttle-fdm", 0.97);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -153,8 +180,8 @@ setlistener("/it-autoflight/input/athr", func {
|
||||||
|
|
||||||
# Checks if all throttles are in the IDLE position, before tuning off the A/THR.
|
# Checks if all throttles are in the IDLE position, before tuning off the A/THR.
|
||||||
var atoff_request = func {
|
var atoff_request = func {
|
||||||
var state1 = getprop("/systems/thrust/state1");
|
state1 = getprop("/systems/thrust/state1");
|
||||||
var state2 = getprop("/systems/thrust/state2");
|
state2 = getprop("/systems/thrust/state2");
|
||||||
if ((state1 == "IDLE") and (state2 == "IDLE") and (getprop("/systems/thrust/alpha-floor") == 0) and (getprop("/systems/thrust/toga-lk") == 0)) {
|
if ((state1 == "IDLE") and (state2 == "IDLE") and (getprop("/systems/thrust/alpha-floor") == 0) and (getprop("/systems/thrust/toga-lk") == 0)) {
|
||||||
setprop("/it-autoflight/input/athr", 0);
|
setprop("/it-autoflight/input/athr", 0);
|
||||||
}
|
}
|
||||||
|
@ -169,19 +196,19 @@ setlistener("/systems/thrust/state2", func {
|
||||||
});
|
});
|
||||||
|
|
||||||
var thrust_lim = func {
|
var thrust_lim = func {
|
||||||
var state1 = getprop("/systems/thrust/state1");
|
state1 = getprop("/systems/thrust/state1");
|
||||||
var state2 = getprop("/systems/thrust/state2");
|
state2 = getprop("/systems/thrust/state2");
|
||||||
var thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
|
thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
|
||||||
var thr2 = getprop("/controls/engines/engine[0]/throttle-pos");
|
thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
|
||||||
var eprtoga = getprop("/systems/thrust/epr/toga-lim");
|
eprtoga = getprop("/systems/thrust/epr/toga-lim");
|
||||||
var eprmct = getprop("/systems/thrust/epr/mct-lim");
|
eprmct = getprop("/systems/thrust/epr/mct-lim");
|
||||||
var eprflx = getprop("/systems/thrust/epr/flx-lim");
|
eprflx = getprop("/systems/thrust/epr/flx-lim");
|
||||||
var eprclb = getprop("/systems/thrust/epr/clb-lim");
|
eprclb = getprop("/systems/thrust/epr/clb-lim");
|
||||||
var n1toga = getprop("/systems/thrust/n1/toga-lim");
|
n1toga = getprop("/systems/thrust/n1/toga-lim");
|
||||||
var n1mct = getprop("/systems/thrust/n1/mct-lim");
|
n1mct = getprop("/systems/thrust/n1/mct-lim");
|
||||||
var n1flx = getprop("/systems/thrust/n1/flx-lim");
|
n1flx = getprop("/systems/thrust/n1/flx-lim");
|
||||||
var n1clb = getprop("/systems/thrust/n1/clb-lim");
|
n1clb = getprop("/systems/thrust/n1/clb-lim");
|
||||||
if (getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0) {
|
if (getprop("/gear/gear[1]/wow") == 0 or getprop("/gear/gear[2]/wow") == 0) {
|
||||||
if ((state1 == "TOGA" or state2 == "TOGA" or (state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)) or getprop("/systems/thrust/alpha-floor") == 1 or getprop("/systems/thrust/toga-lk") == 1) {
|
if ((state1 == "TOGA" or state2 == "TOGA" or (state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)) or getprop("/systems/thrust/alpha-floor") == 1 or getprop("/systems/thrust/toga-lk") == 1) {
|
||||||
setprop("/controls/engines/thrust-limit", "TOGA");
|
setprop("/controls/engines/thrust-limit", "TOGA");
|
||||||
setprop("/controls/engines/epr-limit", eprtoga);
|
setprop("/controls/engines/epr-limit", eprtoga);
|
||||||
|
@ -212,16 +239,16 @@ var thrust_lim = func {
|
||||||
}
|
}
|
||||||
|
|
||||||
var unflex = func {
|
var unflex = func {
|
||||||
var state1 = getprop("/systems/thrust/state1");
|
state1 = getprop("/systems/thrust/state1");
|
||||||
var state2 = getprop("/systems/thrust/state2");
|
state2 = getprop("/systems/thrust/state2");
|
||||||
if (state1 != "MCT" and state2 != "MCT" and getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0) {
|
if (state1 != "MCT" and state2 != "MCT" and getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0) {
|
||||||
setprop("/systems/thrust/lim-flex", 0);
|
setprop("/systems/thrust/lim-flex", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var thrust_loop = func {
|
var thrust_loop = func {
|
||||||
var state1 = getprop("/systems/thrust/state1");
|
state1 = getprop("/systems/thrust/state1");
|
||||||
var state2 = getprop("/systems/thrust/state2");
|
state2 = getprop("/systems/thrust/state2");
|
||||||
if ((state1 == "CL") and (state2 == "CL")) {
|
if ((state1 == "CL") and (state2 == "CL")) {
|
||||||
setprop("/systems/thrust/lvrclb", "0");
|
setprop("/systems/thrust/lvrclb", "0");
|
||||||
} else {
|
} else {
|
||||||
|
@ -241,27 +268,16 @@ var thrust_loop = func {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Disabled until FDE AoA and stall characteristics are correct.
|
# ias = getprop("/instrumentation/airspeed-indicator/indicated-speed-kt");
|
||||||
# var AoA = getprop("/fdm/jsbsim/aero/alpha-deg");
|
# flaps = getprop("/controls/flight/flap-pos");
|
||||||
# var flaps = getprop("/controls/flight/flap-lever");
|
# alphaProtSpd = getprop("/FMGC/internal/alpha-prot-speed");
|
||||||
|
# togaLockSpd = alphaProtSpd + 3;
|
||||||
# if (getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0 and getprop("/it-fbw/law") == 0) {
|
# if (getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0 and getprop("/it-fbw/law") == 0) {
|
||||||
# if (AoA >= 6.0 and flaps == 0) {
|
# if (ias < alphaProtSpd) {
|
||||||
# setprop("/systems/thrust/alpha-floor", 1);
|
# setprop("/systems/thrust/alpha-floor", 1);
|
||||||
# setprop("/systems/thrust/toga-lk", 0);
|
# setprop("/systems/thrust/toga-lk", 0);
|
||||||
# setprop("/it-autoflight/input/athr", 1);
|
# setprop("/it-autoflight/input/athr", 1);
|
||||||
# } else if (AoA >= 8.0 and (flaps == 1 or flaps == 2)) {
|
# } else if (getprop("/systems/thrust/alpha-floor") == 1 and ias > togaLockSpd) {
|
||||||
# setprop("/systems/thrust/alpha-floor", 1);
|
|
||||||
# setprop("/systems/thrust/toga-lk", 0);
|
|
||||||
# setprop("/it-autoflight/input/athr", 1);
|
|
||||||
# } else if (AoA >= 8.0 and flaps == 3) {
|
|
||||||
# setprop("/systems/thrust/alpha-floor", 1);
|
|
||||||
# setprop("/systems/thrust/toga-lk", 0);
|
|
||||||
# setprop("/it-autoflight/input/athr", 1);
|
|
||||||
# } else if (AoA >= 7.5 and flaps == 4) {
|
|
||||||
# setprop("/systems/thrust/alpha-floor", 1);
|
|
||||||
# setprop("/systems/thrust/toga-lk", 0);
|
|
||||||
# setprop("/it-autoflight/input/athr", 1);
|
|
||||||
# } else if (getprop("/systems/thrust/alpha-floor") == 1) {
|
|
||||||
# setprop("/systems/thrust/alpha-floor", 0);
|
# setprop("/systems/thrust/alpha-floor", 0);
|
||||||
# setprop("/it-autoflight/input/athr", 1);
|
# setprop("/it-autoflight/input/athr", 1);
|
||||||
# setprop("/systems/thrust/toga-lk", 1);
|
# setprop("/systems/thrust/toga-lk", 1);
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1507
|
1508
|
Reference in a new issue