Merge branch 'dev' into 3D
This commit is contained in:
commit
9db3a42e18
15 changed files with 671 additions and 296 deletions
|
@ -513,7 +513,7 @@ var takeoff = func {
|
|||
# The same as taxi, except we set some things afterwards.
|
||||
taxi();
|
||||
var eng_one_chk_c = setlistener("/engines/engine[0]/state", func {
|
||||
if (getprop("/engines/engine[0]/state") == 3) {
|
||||
if (pts.Engines.Engine.state[0].getValue() == 3) {
|
||||
removelistener(eng_one_chk_c);
|
||||
setprop("/controls/switches/strobe", 1.0);
|
||||
setprop("/controls/lighting/taxi-light-switch", 1);
|
||||
|
|
|
@ -74,6 +74,10 @@
|
|||
<halign>left</halign>
|
||||
<label>If you have a NAVIGRAPH subcription, we reccomend to load them in the MCDU instead of here.</label>
|
||||
</text>
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>Minimum FGFS version for use of this feature (due to bugs in prior versions) is 2020.1.3.</label>
|
||||
</text>
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<text>
|
||||
|
@ -85,7 +89,29 @@
|
|||
<legend>Load flightplan</legend>
|
||||
<equal>true</equal>
|
||||
<enable>
|
||||
<property>FMGC/internal/tofrom-set</property>
|
||||
<and>
|
||||
<property>FMGC/internal/tofrom-set</property>
|
||||
<not>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/sim/version/flightgear</property>
|
||||
<value>2019.2.0</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/sim/version/flightgear</property>
|
||||
<value>2020.1.0</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/sim/version/flightgear</property>
|
||||
<value>2020.1.1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/sim/version/flightgear</property>
|
||||
<value>2020.1.2</value>
|
||||
</equals>
|
||||
</or>
|
||||
</not>
|
||||
</and>
|
||||
</enable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
|
|
|
@ -3371,7 +3371,7 @@ var canvas_MCDU_base = {
|
|||
me.fontLeft(0, 0, 0, symbol, 0, 0);
|
||||
} else {
|
||||
me["Simple_L1"].setText("SELECTED");
|
||||
if (getprop("/it-autoflight/input/kts-mach")) {
|
||||
if (fmgc.Input.ktsMach.getValue()) {
|
||||
me["Simple_L4"].setText(sprintf(" %3.3f", getprop("/it-autoflight/input/mach")));
|
||||
} else {
|
||||
me["Simple_L4"].setText(sprintf(" %s", int(getprop("/it-autoflight/input/kts"))));
|
||||
|
@ -3389,10 +3389,10 @@ var canvas_MCDU_base = {
|
|||
}
|
||||
|
||||
me["Simple_L3S"].setText(" MANAGED");
|
||||
if (getprop("/it-autoflight/input/kts-mach")) {
|
||||
me["Simple_L3"].setText(sprintf(" %3.3f", getprop("/FMGC/internal/mng-spd")));
|
||||
if (fmgc.Input.ktsMach.getValue()) {
|
||||
me["Simple_L3"].setText(sprintf(" %3.3f", fmgc.FMGCInternal.mngSpd));
|
||||
} else {
|
||||
me["Simple_L3"].setText(sprintf(" %s", int(getprop("/FMGC/internal/mng-spd"))));
|
||||
me["Simple_L3"].setText(sprintf(" %s", int(fmgc.FMGCInternal.mngSpd)));
|
||||
}
|
||||
|
||||
me["Simple_L5S"].setText(" EXPEDITE");
|
||||
|
@ -3512,7 +3512,7 @@ var canvas_MCDU_base = {
|
|||
me.fontLeft(0, 0, 0, symbol, 0, 0);
|
||||
} else {
|
||||
me["Simple_L1"].setText("SELECTED");
|
||||
if (getprop("/it-autoflight/input/kts-mach")) {
|
||||
if (fmgc.Input.ktsMach.getValue()) {
|
||||
me["Simple_L4"].setText(sprintf(" %3.3f", getprop("/it-autoflight/input/mach")));
|
||||
} else {
|
||||
me["Simple_L4"].setText(sprintf(" %s", int(getprop("/it-autoflight/input/kts"))));
|
||||
|
@ -3532,10 +3532,10 @@ var canvas_MCDU_base = {
|
|||
me["Simple_L2S"].setText(" CI");
|
||||
|
||||
me["Simple_L3S"].setText(" MANAGED");
|
||||
if (getprop("/it-autoflight/input/kts-mach")) {
|
||||
me["Simple_L3"].setText(sprintf(" %3.3f", getprop("/FMGC/internal/mng-spd")));
|
||||
if (fmgc.Input.ktsMach.getValue()) {
|
||||
me["Simple_L3"].setText(sprintf(" %3.3f", fmgc.FMGCInternal.mngSpd));
|
||||
} else {
|
||||
me["Simple_L3"].setText(sprintf(" %s", int(getprop("/FMGC/internal/mng-spd"))));
|
||||
me["Simple_L3"].setText(sprintf(" %s", int(fmgc.FMGCInternal.mngSpd)));
|
||||
}
|
||||
|
||||
me["Simple_R1S"].setText("DEST EFOB");
|
||||
|
@ -3660,7 +3660,7 @@ var canvas_MCDU_base = {
|
|||
me.fontLeft(0, 0, 0, symbol, 0, 0);
|
||||
} else {
|
||||
me["Simple_L1"].setText("SELECTED");
|
||||
if (getprop("/it-autoflight/input/kts-mach")) {
|
||||
if (fmgc.Input.ktsMach.getValue()) {
|
||||
me["Simple_L4"].setText(sprintf(" %3.3f", getprop("/it-autoflight/input/mach")));
|
||||
} else {
|
||||
me["Simple_L4"].setText(sprintf(" %3.0f", getprop("/it-autoflight/input/kts")));
|
||||
|
@ -3680,10 +3680,10 @@ var canvas_MCDU_base = {
|
|||
me["Simple_L2S"].setText(" CI");
|
||||
|
||||
me["Simple_L3S"].setText(" MANAGED");
|
||||
if (getprop("/it-autoflight/input/kts-mach")) {
|
||||
me["Simple_L3"].setText(sprintf(" %3.3f", getprop("/FMGC/internal/mng-spd")));
|
||||
if (fmgc.Input.ktsMach.getValue()) {
|
||||
me["Simple_L3"].setText(sprintf(" %3.3f", fmgc.FMGCInternal.mngSpd));
|
||||
} else {
|
||||
me["Simple_L3"].setText(sprintf(" %3.0f", getprop("/FMGC/internal/mng-spd")));
|
||||
me["Simple_L3"].setText(sprintf(" %3.0f", fmgc.FMGCInternal.mngSpd));
|
||||
}
|
||||
|
||||
me["Simple_L5"].setText(" EXPEDITE");
|
||||
|
|
|
@ -2023,7 +2023,6 @@ var canvas_PFD_2 = {
|
|||
me["ASI_decimal_DN"].setColor(0.0901,0.6039,0.7176);
|
||||
}
|
||||
|
||||
tgt_ias = at_tgt_ias.getValue();
|
||||
if (tgt_ias <= 30) {
|
||||
me.ASItrgt = 0 - me.ASI;
|
||||
} else if (tgt_ias >= 420) {
|
||||
|
@ -2146,7 +2145,7 @@ var canvas_PFD_2 = {
|
|||
me["F_target"].hide();
|
||||
me["clean_speed"].hide();
|
||||
|
||||
tgt_S = tgt_S = fmgc.FMGCInternal.slat;
|
||||
tgt_S = fmgc.FMGCInternal.slat;
|
||||
|
||||
if (tgt_S <= 30) {
|
||||
me.Strgt = 0 - me.ASI;
|
||||
|
@ -2180,7 +2179,7 @@ var canvas_PFD_2 = {
|
|||
me["S_target"].hide();
|
||||
me["clean_speed"].hide();
|
||||
|
||||
tgt_F = tgt_S = fmgc.FMGCInternal.flap2;
|
||||
tgt_F = fmgc.FMGCInternal.flap2;
|
||||
|
||||
if (tgt_F <= 30) {
|
||||
me.Ftrgt = 0 - me.ASI;
|
||||
|
@ -2214,7 +2213,7 @@ var canvas_PFD_2 = {
|
|||
me["S_target"].hide();
|
||||
me["clean_speed"].hide();
|
||||
|
||||
tgt_F = tgt_S = fmgc.FMGCInternal.flap3;
|
||||
tgt_F = fmgc.FMGCInternal.flap3;
|
||||
|
||||
if (tgt_F <= 30) {
|
||||
me.Ftrgt = 0 - me.ASI;
|
||||
|
@ -2253,7 +2252,7 @@ var canvas_PFD_2 = {
|
|||
me["S_target"].hide();
|
||||
me["F_target"].hide();
|
||||
|
||||
tgt_clean = tgt_S = fmgc.FMGCInternal.clean;
|
||||
tgt_clean = fmgc.FMGCInternal.clean;
|
||||
|
||||
me.cleantrgt = tgt_clean - 30 - me.ASI;
|
||||
me.SPDcleantrgtdiff = tgt_clean - ind_spd;
|
||||
|
|
13
Models/Instruments/PFD/res/info.txt
Normal file
13
Models/Instruments/PFD/res/info.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
Heading Tape:
|
||||
123.177
|
||||
61.5885
|
||||
|
||||
98.5416 is 123.177 in 1024
|
||||
49.2708 is 61.5885 in 1024
|
||||
|
||||
Altitude Tape:
|
||||
304.178
|
||||
60.8357
|
||||
|
||||
243.3424 is 304.178 in 1024
|
||||
48.66856 is 60.8357 in 1024
|
|
@ -41,6 +41,14 @@ var fadecpowerup = props.globals.getNode("/systems/fadec/powerup", 1);
|
|||
var thr_limit = props.globals.getNode("/controls/engines/thrust-limit", 1);
|
||||
var n1_limit = props.globals.getNode("/controls/engines/n1-limit", 1);
|
||||
var epr_limit = props.globals.getNode("/controls/engines/epr-limit", 1);
|
||||
var flapXOffset = props.globals.getNode("/ECAM/Upper/FlapX", 1);
|
||||
var flapYOffset = props.globals.getNode("/ECAM/Upper/FlapY", 1);
|
||||
var slatXOffset = props.globals.getNode("/ECAM/Upper/SlatX", 1);
|
||||
var slatYOffset = props.globals.getNode("/ECAM/Upper/SlatY", 1);
|
||||
var flapXTranslate = props.globals.getNode("/ECAM/Upper/FlapXtrans", 1);
|
||||
var flapYTranslate = props.globals.getNode("/ECAM/Upper/FlapYtrans", 1);
|
||||
var slatXTranslate = props.globals.getNode("/ECAM/Upper/SlatXtrans", 1);
|
||||
var slatYTranslate = props.globals.getNode("/ECAM/Upper/SlatYtrans", 1);
|
||||
var ECAM_line1 = props.globals.getNode("/ECAM/msg/line1", 1);
|
||||
var ECAM_line2 = props.globals.getNode("/ECAM/msg/line2", 1);
|
||||
var ECAM_line3 = props.globals.getNode("/ECAM/msg/line3", 1);
|
||||
|
@ -119,6 +127,21 @@ var canvas_upperECAM_base = {
|
|||
var svg_keys = me.getKeys();
|
||||
foreach(var key; svg_keys) {
|
||||
me[key] = canvas_group.getElementById(key);
|
||||
|
||||
var clip_el = canvas_group.getElementById(key ~ "_clip");
|
||||
if (clip_el != nil) {
|
||||
clip_el.setVisible(0);
|
||||
var tran_rect = clip_el.getTransformedBounds();
|
||||
|
||||
var clip_rect = sprintf("rect(%d,%d, %d,%d)",
|
||||
tran_rect[1], # 0 ys
|
||||
tran_rect[2], # 1 xe
|
||||
tran_rect[3], # 2 ye
|
||||
tran_rect[0]); #3 xs
|
||||
# coordinates are top,right,bottom,left (ys, xe, ye, xs) ref: l621 of simgear/canvas/CanvasElement.cxx
|
||||
me[key].set("clip", clip_rect);
|
||||
me[key].set("clip-frame", canvas.Element.PARENT);
|
||||
}
|
||||
}
|
||||
|
||||
# set font
|
||||
|
@ -297,6 +320,11 @@ var canvas_upperECAM_base = {
|
|||
me["SlatAlphaLock"].hide();
|
||||
}
|
||||
|
||||
me["FlapIndicator"].setTranslation(flapXOffset.getValue(),flapYOffset.getValue());
|
||||
me["SlatIndicator"].setTranslation(slatXOffset.getValue(),slatYOffset.getValue());
|
||||
me["FlapLine"].setTranslation(flapXTranslate.getValue(),flapYTranslate.getValue());
|
||||
me["SlatLine"].setTranslation(slatXTranslate.getValue(),slatYTranslate.getValue());
|
||||
|
||||
# FOB
|
||||
if (acconfig_weight_kgs.getValue())
|
||||
{
|
||||
|
@ -345,7 +373,7 @@ var canvas_upperECAM_cfm_eis2 = {
|
|||
"EGT1-XX","N21","N21-decpnt","N21-decimal","N21-XX","FF1","FF1-XX","N12-needle","N12-thr","N12-ylim","N12","N12-decpnt","N12-decimal","N12-box","N12-scale","N12-scale2","N12-scaletick","N12-scalenum","N12-XX","N12-XX2","N12-XX-box","EGT2-needle","EGT2",
|
||||
"EGT2-scale","EGT2-box","EGT2-scale2","EGT2-scaletick","EGT2-XX","N22","N22-decpnt","N22-decimal","N22-XX","FF2","FF2-XX","FOB-LBS","FlapTxt","FlapDots","N1Lim-mode","N1Lim","N1Lim-decpnt","N1Lim-decimal","N1Lim-percent","N1Lim-XX","N1Lim-XX2","REV1",
|
||||
"REV1-box","REV2","REV2-box","ECAM_Left","ECAML1","ECAML2","ECAML3","ECAML4","ECAML5","ECAML6","ECAML7","ECAML8","ECAMR1", "ECAMR2", "ECAMR3", "ECAMR4", "ECAMR5", "ECAMR6", "ECAMR7", "ECAMR8", "ECAM_Right",
|
||||
"FOB-weight-unit","FFlow-weight-unit","SlatAlphaLock"];
|
||||
"FOB-weight-unit","FFlow-weight-unit","SlatAlphaLock","SlatIndicator","FlapIndicator","SlatLine","FlapLine"];
|
||||
},
|
||||
update: func() {
|
||||
# N1
|
||||
|
@ -604,7 +632,7 @@ var canvas_upperECAM_iae_eis2 = {
|
|||
"EPR2-decimal","EPR2-box","EPR2-scale","EPR2-scaletick","EPR2-scalenum","EPR2-XX","EPR2-XX2","EGT2-needle","EGT2","EGT2-scale","EGT2-scale2","EGT2-box","EGT2-scaletick","EGT2-XX","N12-needle","N12-thr","N12-ylim","N12","N12-decpnt","N12-decimal",
|
||||
"N12-scale","N12-scale2","N12-scaletick","N12-scalenum","N12-XX","N22","N22-decpnt","N22-decimal","N22-XX","FF2","FF2-XX","FOB-LBS","FlapTxt","FlapDots","EPRLim-mode","EPRLim","EPRLim-decpnt","EPRLim-decimal","EPRLim-XX","EPRLim-XX2","REV1","REV1-box",
|
||||
"REV2","REV2-box","ECAM_Left","ECAML1","ECAML2","ECAML3","ECAML4","ECAML5","ECAML6","ECAML7","ECAML8", "ECAMR1", "ECAMR2", "ECAMR3", "ECAMR4", "ECAMR5", "ECAMR6", "ECAMR7", "ECAMR8", "ECAM_Right",
|
||||
"FFlow1-weight-unit", "FFlow2-weight-unit", "FOB-weight-unit","SlatAlphaLock"];
|
||||
"FFlow1-weight-unit", "FFlow2-weight-unit", "FOB-weight-unit","SlatAlphaLock","SlatIndicator","FlapIndicator","SlatLine","FlapLine"];
|
||||
},
|
||||
update: func() {
|
||||
N1_1_cur = N1_1.getValue();
|
||||
|
@ -927,6 +955,21 @@ var canvas_upperECAM_test = {
|
|||
var svg_keys = me.getKeys();
|
||||
foreach(var key; svg_keys) {
|
||||
me[key] = canvas_group.getElementById(key);
|
||||
|
||||
var clip_el = canvas_group.getElementById(key ~ "_clip");
|
||||
if (clip_el != nil) {
|
||||
clip_el.setVisible(0);
|
||||
var tran_rect = clip_el.getTransformedBounds();
|
||||
|
||||
var clip_rect = sprintf("rect(%d,%d, %d,%d)",
|
||||
tran_rect[1], # 0 ys
|
||||
tran_rect[2], # 1 xe
|
||||
tran_rect[3], # 2 ye
|
||||
tran_rect[0]); #3 xs
|
||||
# coordinates are top,right,bottom,left (ys, xe, ye, xs) ref: l621 of simgear/canvas/CanvasElement.cxx
|
||||
me[key].set("clip", clip_rect);
|
||||
me[key].set("clip-frame", canvas.Element.PARENT);
|
||||
}
|
||||
}
|
||||
|
||||
me.page = canvas_group;
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
inkscape:window-height="705"
|
||||
id="namedview371"
|
||||
showgrid="true"
|
||||
inkscape:zoom="0.50000001"
|
||||
inkscape:cx="419.64115"
|
||||
inkscape:cy="1000.4352"
|
||||
inkscape:zoom="1"
|
||||
inkscape:cx="718.57047"
|
||||
inkscape:cy="505.8628"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
|
@ -76,11 +76,6 @@
|
|||
height="8.496521"
|
||||
x="691.55396"
|
||||
y="692.57446" />
|
||||
<path
|
||||
id="path4447"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#575757;stroke-width:5.19999981;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 718.11442,596.89138 11.4047,16.81213 m -36.4425,-17.34853 -10.5797,15.51213 m 11.1047,-15.46213 24.4703,0.46213 m -35.5703,14.98787 47.0582,1.94289"
|
||||
inkscape:connector-curvature="0" />
|
||||
<text
|
||||
inkscape:label="#text4219"
|
||||
id="FlapTxt"
|
||||
|
@ -94,6 +89,13 @@
|
|||
x="729.04968"
|
||||
id="tspan4331"
|
||||
sodipodi:role="line">1+F</tspan></text>
|
||||
<path
|
||||
style="opacity:1;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#0dc04b;stroke-width:5.23279285;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
d="M 917.38445,644.30596 720.66027,597.47244"
|
||||
id="FlapLine"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:label="#path1103"
|
||||
inkscape:connector-curvature="0" />
|
||||
<g
|
||||
id="FlapDots"
|
||||
inkscape:label="#g4344"
|
||||
|
@ -102,11 +104,11 @@
|
|||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="rect4346"
|
||||
d="m 636.15001,595.05001 9.50347,-2.225 -1.075,3.72508 -9.90347,2.525 z"
|
||||
d="m 636.16173,590.75725 9.50347,-2.225 -1.075,3.72508 -9.90347,2.525 z"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 590.60001,606.45001 9.50347,-2.225 -1.075,3.72508 -9.90347,2.525 z"
|
||||
d="m 590.60001,605.24377 9.50347,-2.225 -1.075,3.72508 -9.90347,2.525 z"
|
||||
id="path4349"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
|
@ -118,7 +120,7 @@
|
|||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 821.6363,589.13181 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
|
||||
d="m 821.6363,592.59471 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
|
||||
id="path4353"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
|
@ -126,11 +128,11 @@
|
|||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4355"
|
||||
d="m 867.18574,600.69907 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
|
||||
d="m 867.18574,603.7664 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 913.00626,612.50775 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
|
||||
d="m 913.00626,615.19254 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
|
||||
id="path4357"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
|
@ -1385,4 +1387,45 @@
|
|||
x="650.08069"
|
||||
y="575.68427"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.25px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">A-LOCK</tspan></text>
|
||||
<path
|
||||
style="opacity:1;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#0dc04b;stroke-width:5.44862556;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
|
||||
d="M 555.26245,639.8335 691.24239,597.33411"
|
||||
id="SlatLine"
|
||||
inkscape:original-d="m 555.22993,639.86602 135.34892,-43.9598"
|
||||
inkscape:label="#path1119"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
id="path4447"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#575757;stroke-width:5.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
|
||||
d="m 718.11442,596.89138 11.4047,16.81213 m -35.92874,-17.24909 -11.09346,15.41269 m 11.13785,-15.41241 24.43715,0.41241 m -35.5703,14.98787 47.0582,1.94289"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccc" />
|
||||
<path
|
||||
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#0dc04b;stroke-width:5.2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
|
||||
d="m 928.84849,661.23101 -11.44541,-16.90649 38.53701,7.25587 v 15.15993 l -27.0916,-5.50931"
|
||||
id="FlapIndicator"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:label="#path1093" />
|
||||
<path
|
||||
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#0dc04b;stroke-width:5.2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
|
||||
d="m 530.43575,645.52404 24.69434,-5.55908 -11.10498,15.46142 -24.69434,5.56055 z"
|
||||
id="SlatIndicator"
|
||||
inkscape:label="#path1114" />
|
||||
<rect
|
||||
style="opacity:0.5;fill:none;fill-opacity:1;stroke:none;stroke-width:4.08072662;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
|
||||
id="FlapLine_clip"
|
||||
width="195.52469"
|
||||
height="50.843338"
|
||||
x="718.86694"
|
||||
y="594.42938"
|
||||
inkscape:label="#rect1023" />
|
||||
<rect
|
||||
inkscape:label="#rect1023"
|
||||
y="594.05438"
|
||||
x="554.93781"
|
||||
height="48.089657"
|
||||
width="137.63597"
|
||||
id="SlatLine_clip"
|
||||
style="opacity:0.5;fill:none;fill-opacity:1;stroke:none;stroke-width:3.34691048;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill" />
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 86 KiB |
|
@ -97,11 +97,6 @@
|
|||
height="8.496521"
|
||||
x="691.55396"
|
||||
y="692.57446" />
|
||||
<path
|
||||
id="path4447"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#575757;stroke-width:5.19999981;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 718.11442,596.89138 11.4047,16.81213 m -36.4425,-17.34853 -10.5797,15.51213 m 11.1047,-15.46213 24.4703,0.46213 m -35.5703,14.98787 47.0582,1.94289"
|
||||
inkscape:connector-curvature="0" />
|
||||
<text
|
||||
inkscape:label="#text4219"
|
||||
id="FlapTxt"
|
||||
|
@ -115,6 +110,13 @@
|
|||
x="729.04968"
|
||||
id="tspan4331"
|
||||
sodipodi:role="line">1+F</tspan></text>
|
||||
<path
|
||||
style="opacity:1;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#0dc04b;stroke-width:5.23279285;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
d="M 917.38445,644.30596 720.66027,597.47244"
|
||||
id="FlapLine"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:label="#path1103"
|
||||
inkscape:connector-curvature="0" />
|
||||
<g
|
||||
id="FlapDots"
|
||||
inkscape:label="#g4344"
|
||||
|
@ -123,11 +125,11 @@
|
|||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="rect4346"
|
||||
d="m 636.15001,595.05001 9.50347,-2.225 -1.075,3.72508 -9.90347,2.525 z"
|
||||
d="m 636.16173,590.75725 9.50347,-2.225 -1.075,3.72508 -9.90347,2.525 z"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 590.60001,606.45001 9.50347,-2.225 -1.075,3.72508 -9.90347,2.525 z"
|
||||
d="m 590.60001,605.24377 9.50347,-2.225 -1.075,3.72508 -9.90347,2.525 z"
|
||||
id="path4349"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
|
@ -139,7 +141,7 @@
|
|||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 821.6363,589.13181 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
|
||||
d="m 821.6363,592.59471 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
|
||||
id="path4353"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
|
@ -147,11 +149,11 @@
|
|||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4355"
|
||||
d="m 867.18574,600.69907 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
|
||||
d="m 867.18574,603.7664 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 913.00626,612.50775 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
|
||||
d="m 913.00626,615.19254 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
|
||||
id="path4357"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
|
@ -1753,4 +1755,45 @@
|
|||
x="650.08069"
|
||||
y="575.68427"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.25px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">A-LOCK</tspan></text>
|
||||
<path
|
||||
style="opacity:1;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#0dc04b;stroke-width:5.44862556;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
|
||||
d="M 555.26245,639.8335 691.24239,597.33411"
|
||||
id="SlatLine"
|
||||
inkscape:original-d="m 555.22993,639.86602 135.34892,-43.9598"
|
||||
inkscape:label="#path1119"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
id="path4447"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#575757;stroke-width:5.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
|
||||
d="m 718.11442,596.89138 11.4047,16.81213 m -35.92874,-17.24909 -11.09346,15.41269 m 11.13785,-15.41241 24.43715,0.41241 m -35.5703,14.98787 47.0582,1.94289"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccc" />
|
||||
<path
|
||||
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#0dc04b;stroke-width:5.2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
|
||||
d="m 928.84849,661.23101 -11.44541,-16.90649 38.53701,7.25587 v 15.15993 l -27.0916,-5.50931"
|
||||
id="FlapIndicator"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:label="#path1093" />
|
||||
<path
|
||||
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#0dc04b;stroke-width:5.2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
|
||||
d="m 530.43575,645.52404 24.69434,-5.55908 -11.10498,15.46142 -24.69434,5.56055 z"
|
||||
id="SlatIndicator"
|
||||
inkscape:label="#path1114" />
|
||||
<rect
|
||||
style="opacity:0.5;fill:none;fill-opacity:1;stroke:none;stroke-width:4.08072662;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
|
||||
id="FlapLine_clip"
|
||||
width="195.52469"
|
||||
height="50.843338"
|
||||
x="718.86694"
|
||||
y="594.42938"
|
||||
inkscape:label="#rect1023" />
|
||||
<rect
|
||||
inkscape:label="#rect1023"
|
||||
y="594.05438"
|
||||
x="554.93781"
|
||||
height="48.089657"
|
||||
width="137.63597"
|
||||
id="SlatLine_clip"
|
||||
style="opacity:0.5;fill:none;fill-opacity:1;stroke:none;stroke-width:3.34691048;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill" />
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 109 KiB |
|
@ -12,7 +12,6 @@ var emerGen = props.globals.getNode("/controls/electrical/switches/emer-gen
|
|||
|
||||
var state1Node = props.globals.getNode("/engines/engine[0]/state", 1);
|
||||
var state2Node = props.globals.getNode("/engines/engine[1]/state", 1);
|
||||
var apu_rpm = props.globals.getNode("/engines/engine[2]/n1", 1);
|
||||
var wing_pb = props.globals.getNode("/controls/ice-protection/wing", 1);
|
||||
var apu_bleedSw = props.globals.getNode("/controls/pneumatics/switches/apu", 1);
|
||||
var gear = props.globals.getNode("/gear/gear-pos-norm", 1);
|
||||
|
@ -21,6 +20,8 @@ var cutoff2 = props.globals.getNode("/controls/engines/engine[1]/cutoff-switc
|
|||
var stallVoice = props.globals.initNode("/sim/sound/warnings/stall-voice", 0, "BOOL");
|
||||
var engOpt = props.globals.getNode("/options/eng", 1);
|
||||
|
||||
var thrustState = [nil, nil];
|
||||
|
||||
# local variables
|
||||
var transmitFlag1 = 0;
|
||||
var transmitFlag2 = 0;
|
||||
|
@ -169,13 +170,13 @@ var messages_priority_3 = func {
|
|||
ECAM_controller.warningReset(dualFailAPU);
|
||||
}
|
||||
|
||||
if (dualFailAPUwing.clearFlag == 0 and apu_rpm.getValue() > 94.9 and wing_pb.getBoolValue()) {
|
||||
if (dualFailAPUwing.clearFlag == 0 and pts.APU.rpm.getValue() > 94.9 and wing_pb.getBoolValue()) {
|
||||
dualFailAPUwing.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(dualFailAPUwing);
|
||||
}
|
||||
|
||||
if (dualFailAPUbleed.clearFlag == 0 and apu_rpm.getValue() > 94.9 and !apu_bleedSw.getBoolValue()) {
|
||||
if (dualFailAPUbleed.clearFlag == 0 and pts.APU.rpm.getValue() > 94.9 and !apu_bleedSw.getBoolValue()) {
|
||||
dualFailAPUbleed.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(dualFailAPUbleed);
|
||||
|
@ -369,7 +370,7 @@ var messages_priority_3 = func {
|
|||
ECAM_controller.warningReset(eng1FireGnlever);
|
||||
}
|
||||
|
||||
if (eng1FireGnparkbrk.clearFlag == 0 and getprop("/controls/gear/brake-parking") == 0) {
|
||||
if (eng1FireGnparkbrk.clearFlag == 0 and pts.Controls.Gear.parkingBrake.getValue() == 0) {
|
||||
eng1FireGnstopped.active = 1;
|
||||
eng1FireGnparkbrk.active = 1;
|
||||
} else {
|
||||
|
@ -427,7 +428,7 @@ var messages_priority_3 = func {
|
|||
ECAM_controller.warningReset(eng1FireGnevacSw);
|
||||
}
|
||||
|
||||
if (eng1FireGnevacApu.clearFlag == 0 and getprop("/controls/apu/master") and getprop("/engines/engine[2]/n1") > 99) {
|
||||
if (eng1FireGnevacApu.clearFlag == 0 and systems.APUNodes.Controls.master.getBoolValue() and pts.APU.rpm.getValue() > 99) {
|
||||
eng1FireGnevacApu.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(eng1FireGnevacApu);
|
||||
|
@ -552,7 +553,7 @@ var messages_priority_3 = func {
|
|||
ECAM_controller.warningReset(eng2FireGnlever);
|
||||
}
|
||||
|
||||
if (eng2FireGnparkbrk.clearFlag == 0 and getprop("/controls/gear/brake-parking") == 0) {
|
||||
if (eng2FireGnparkbrk.clearFlag == 0 and pts.Controls.Gear.parkingBrake.getValue() == 0) {
|
||||
eng2FireGnstopped.active = 1;
|
||||
eng2FireGnparkbrk.active = 1;
|
||||
} else {
|
||||
|
@ -610,7 +611,7 @@ var messages_priority_3 = func {
|
|||
ECAM_controller.warningReset(eng2FireGnevacSw);
|
||||
}
|
||||
|
||||
if (eng2FireGnevacApu.clearFlag == 0 and getprop("/controls/apu/master") and getprop("/engines/engine[2]/n1") > 99) {
|
||||
if (eng2FireGnevacApu.clearFlag == 0 and systems.APUNodes.Controls.master.getBoolValue() and pts.APU.rpm.getValue() > 99) {
|
||||
eng2FireGnevacApu.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(eng2FireGnevacApu);
|
||||
|
@ -685,7 +686,7 @@ var messages_priority_3 = func {
|
|||
ECAM_controller.warningReset(apuFireAgent);
|
||||
}
|
||||
|
||||
if (apuFireMaster.clearFlag == 0 and getprop("/controls/apu/master")) {
|
||||
if (apuFireMaster.clearFlag == 0 and systems.APUNodes.Controls.master.getBoolValue()) {
|
||||
apuFireMaster.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(apuFireMaster);
|
||||
|
@ -714,7 +715,7 @@ var messages_priority_3 = func {
|
|||
ECAM_controller.warningReset(flaps_config_1);
|
||||
}
|
||||
|
||||
if ((spd_brk_config.clearFlag == 0) and getprop("/controls/flight/speedbrake") != 0 and phaseVar3 >= 3 and phaseVar3 <= 4) {
|
||||
if ((spd_brk_config.clearFlag == 0) and pts.Controls.Flight.speedbrake.getValue() != 0 and phaseVar3 >= 3 and phaseVar3 <= 4) {
|
||||
spd_brk_config.active = 1;
|
||||
spd_brk_config_1.active = 1;
|
||||
} else {
|
||||
|
@ -738,7 +739,7 @@ var messages_priority_3 = func {
|
|||
ECAM_controller.warningReset(rud_trim_config_1);
|
||||
}
|
||||
|
||||
if ((park_brk_config.clearFlag == 0) and getprop("/controls/gear/brake-parking") == 1 and phaseVar3 >= 3 and phaseVar3 <= 4) {
|
||||
if ((park_brk_config.clearFlag == 0) and pts.Controls.Gear.parkingBrake.getValue() == 1 and phaseVar3 >= 3 and phaseVar3 <= 4) {
|
||||
park_brk_config.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(park_brk_config);
|
||||
|
@ -764,7 +765,7 @@ var messages_priority_3 = func {
|
|||
alt750 = 0;
|
||||
}
|
||||
|
||||
if (FWC.altChg.getValue() or pts.Gear.position[0].getValue() == 1 or (getprop("/controls/gear/gear-down") and pts.Fdm.JSBsim.Fcs.slatDeg.getValue() > 4) or fmgc.Output.vert.getValue() == 2) {
|
||||
if (FWC.altChg.getValue() or pts.Gear.position[0].getValue() == 1 or (pts.Controls.Gear.gearDown.getValue() and pts.Fdm.JSBsim.Fcs.slatDeg.getValue() > 4) or fmgc.Output.vert.getValue() == 2) {
|
||||
altAlertInhibit = 1;
|
||||
} else {
|
||||
altAlertInhibit = 0;
|
||||
|
@ -873,7 +874,7 @@ var messages_priority_3 = func {
|
|||
}
|
||||
|
||||
# ESS on BAT
|
||||
if ((!gear.getValue() or !getprop("/controls/gear/gear-down")) and getprop("/systems/electrical/some-electric-thingie/static-inverter-timer") == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) {
|
||||
if ((!gear.getValue() or !pts.Controls.Gear.gearDown.getValue()) and getprop("/systems/electrical/some-electric-thingie/static-inverter-timer") == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) {
|
||||
essBusOnBat.active = 1;
|
||||
essBusOnBatLGUplock.active = 1;
|
||||
essBusOnBatManOn.active = 1;
|
||||
|
@ -890,7 +891,7 @@ var messages_priority_3 = func {
|
|||
}
|
||||
|
||||
# EMER CONFIG
|
||||
if (getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dualFailNode.getBoolValue() and phaseVar3 != 4 and phaseVar3 != 8 and emerconfig.clearFlag == 0 and !getprop("/systems/acconfig/autoconfig-running")) {
|
||||
if (systems.ELEC.EmerElec.getValue() and !dualFailNode.getBoolValue() and phaseVar3 != 4 and phaseVar3 != 8 and emerconfig.clearFlag == 0 and !getprop("/systems/acconfig/autoconfig-running")) {
|
||||
emerconfig.active = 1;
|
||||
|
||||
if (getprop("/systems/hydraulic/sources/rat/position") != 0 and emerconfigMinRat.clearFlag == 0) {
|
||||
|
@ -1022,7 +1023,7 @@ var messages_priority_3 = func {
|
|||
var messages_priority_2 = func {
|
||||
phaseVar2 = phaseNode.getValue();
|
||||
# DC EMER CONFIG
|
||||
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dcEss.getValue() < 25 and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcEmerconfig.clearFlag == 0) {
|
||||
if (!systems.ELEC.EmerElec.getValue() and systems.ELEC.Bus.dcEss.getValue() < 25 and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcEmerconfig.clearFlag == 0) {
|
||||
dcEmerconfig.active = 1;
|
||||
dcEmerconfigManOn.active = 1;
|
||||
} else {
|
||||
|
@ -1030,7 +1031,7 @@ var messages_priority_2 = func {
|
|||
ECAM_controller.warningReset(dcEmerconfigManOn);
|
||||
}
|
||||
|
||||
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBus12Fault.clearFlag == 0) {
|
||||
if (!systems.ELEC.EmerElec.getValue() and !dcEmerconfig.active and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBus12Fault.clearFlag == 0) {
|
||||
dcBus12Fault.active = 1;
|
||||
dcBus12FaultBlower.active = 1;
|
||||
dcBus12FaultExtract.active = 1;
|
||||
|
@ -1046,7 +1047,7 @@ var messages_priority_2 = func {
|
|||
ECAM_controller.warningReset(dcBus12FaultBrking);
|
||||
}
|
||||
|
||||
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.acEss.getValue() < 110 and phaseVar2 != 4 and phaseVar2 != 8 and AcBusEssFault.clearFlag == 0) {
|
||||
if (!systems.ELEC.EmerElec.getValue() and systems.ELEC.Bus.acEss.getValue() < 110 and phaseVar2 != 4 and phaseVar2 != 8 and AcBusEssFault.clearFlag == 0) {
|
||||
AcBusEssFault.active = 1;
|
||||
if (!systems.ELEC.Switch.acEssFeed.getBoolValue()) {
|
||||
AcBusEssFaultFeed.active = 1;
|
||||
|
@ -1060,7 +1061,7 @@ var messages_priority_2 = func {
|
|||
ECAM_controller.warningReset(AcBusEssFaultAtc);
|
||||
}
|
||||
|
||||
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac1.getValue() < 110 and phaseVar2 != 4 and phaseVar2 != 8 and AcBus1Fault.clearFlag == 0) {
|
||||
if (!systems.ELEC.EmerElec.getValue() and systems.ELEC.Bus.ac1.getValue() < 110 and phaseVar2 != 4 and phaseVar2 != 8 and AcBus1Fault.clearFlag == 0) {
|
||||
AcBus1Fault.active = 1;
|
||||
AcBus1FaultBlower.active = 1;
|
||||
} else {
|
||||
|
@ -1082,7 +1083,7 @@ var messages_priority_2 = func {
|
|||
ECAM_controller.warningReset(DcEssBusFaultGPWS);
|
||||
}
|
||||
|
||||
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac2.getValue() < 110 and phaseVar2 != 4 and phaseVar2 != 8 and AcBus2Fault.clearFlag == 0) {
|
||||
if (!systems.ELEC.EmerElec.getValue() and systems.ELEC.Bus.ac2.getValue() < 110 and phaseVar2 != 4 and phaseVar2 != 8 and AcBus2Fault.clearFlag == 0) {
|
||||
AcBus2Fault.active = 1;
|
||||
AcBus2FaultExtract.active = 1;
|
||||
} else {
|
||||
|
@ -1090,7 +1091,7 @@ var messages_priority_2 = func {
|
|||
ECAM_controller.warningReset(AcBus2FaultExtract);
|
||||
}
|
||||
|
||||
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() >= 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBus1Fault.clearFlag == 0) {
|
||||
if (!systems.ELEC.EmerElec.getValue() and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() >= 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBus1Fault.clearFlag == 0) {
|
||||
dcBus1Fault.active = 1;
|
||||
dcBus1FaultBlower.active = 1;
|
||||
dcBus1FaultExtract.active = 1;
|
||||
|
@ -1100,7 +1101,7 @@ var messages_priority_2 = func {
|
|||
ECAM_controller.warningReset(dcBus1FaultExtract);
|
||||
}
|
||||
|
||||
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() >= 25 and systems.ELEC.Bus.dc2.getValue() <= 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBus2Fault.clearFlag == 0) {
|
||||
if (!systems.ELEC.EmerElec.getValue() and systems.ELEC.Bus.dc1.getValue() >= 25 and systems.ELEC.Bus.dc2.getValue() <= 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBus2Fault.clearFlag == 0) {
|
||||
dcBus2Fault.active = 1;
|
||||
dcBus2FaultAirData.active = 1;
|
||||
dcBus2FaultBaro.active = 1;
|
||||
|
@ -1110,13 +1111,13 @@ var messages_priority_2 = func {
|
|||
ECAM_controller.warningReset(dcBus2FaultBaro);
|
||||
}
|
||||
|
||||
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dcBat.getValue() < 25 and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8 and dcBusBatFault.clearFlag == 0) {
|
||||
if (!systems.ELEC.EmerElec.getValue() and !dcEmerconfig.active and systems.ELEC.Bus.dcBat.getValue() < 25 and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8 and dcBusBatFault.clearFlag == 0) {
|
||||
dcBusBatFault.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(dcBusBatFault);
|
||||
}
|
||||
|
||||
if (!(getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.dcEssShed.getValue() < 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBusEssShed.clearFlag == 0) {
|
||||
if (!(systems.ELEC.EmerElec.getValue() and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.dcEssShed.getValue() < 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBusEssShed.clearFlag == 0) {
|
||||
dcBusEssShed.active = 1;
|
||||
dcBusEssShedExtract.active = 1;
|
||||
dcBusEssShedIcing.active = 1;
|
||||
|
@ -1126,9 +1127,9 @@ var messages_priority_2 = func {
|
|||
ECAM_controller.warningReset(dcBusEssShedIcing);
|
||||
}
|
||||
|
||||
if (!(getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.acEssShed.getValue() < 110 and systems.ELEC.Bus.acEss.getValue() >= 110 and phaseVar2 != 4 and phaseVar2 != 8 and acBusEssShed.clearFlag == 0) {
|
||||
if (!(systems.ELEC.EmerElec.getValue() and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.acEssShed.getValue() < 110 and systems.ELEC.Bus.acEss.getValue() >= 110 and phaseVar2 != 4 and phaseVar2 != 8 and acBusEssShed.clearFlag == 0) {
|
||||
acBusEssShed.active = 1;
|
||||
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config")) {
|
||||
if (!systems.ELEC.EmerElec.getValue()) {
|
||||
acBusEssShedAtc.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(acBusEssShed);
|
||||
|
@ -1160,7 +1161,7 @@ var messages_priority_2 = func {
|
|||
}
|
||||
|
||||
|
||||
if ((athr_lim.clearFlag == 0) and getprop("it-autoflight/output/athr") == 1 and ((getprop("/systems/thrust/eng-out") != 1 and (getprop("/systems/thrust/state1") == "MAN" or getprop("/systems/thrust/state2") == "MAN")) or (getprop("/systems/thrust/eng-out") == 1 and (getprop("/systems/thrust/state1") == "MAN" or getprop("/systems/thrust/state2") == "MAN" or (getprop("/systems/thrust/state1") == "MAN THR" and getprop("/controls/engines/engine[0]/throttle-pos") <= 0.83) or (getprop("/systems/thrust/state2") == "MAN THR" and getprop("/controls/engines/engine[0]/throttle-pos") <= 0.83)))) and (phaseVar2 >= 5 and phaseVar2 <= 7)) {
|
||||
if ((athr_lim.clearFlag == 0) and getprop("it-autoflight/output/athr") == 1 and ((getprop("/systems/thrust/eng-out") != 1 and (pts.Systems.Thrust.state[0].getValue() == "MAN" or pts.Systems.Thrust.state[1].getValue() == "MAN")) or (getprop("/systems/thrust/eng-out") == 1 and (pts.Systems.Thrust.state[0].getValue() == "MAN" or pts.Systems.Thrust.state[1].getValue() == "MAN" or (pts.Systems.Thrust.state[0].getValue() == "MAN THR" and getprop("/controls/engines/engine[0]/throttle-pos") <= 0.83) or (pts.Systems.Thrust.state[1].getValue() == "MAN THR" and getprop("/controls/engines/engine[0]/throttle-pos") <= 0.83)))) and (phaseVar2 >= 5 and phaseVar2 <= 7)) {
|
||||
athr_lim.active = 1;
|
||||
athr_lim_1.active = 1;
|
||||
} else {
|
||||
|
@ -1298,7 +1299,7 @@ var messages_priority_2 = func {
|
|||
ECAM_controller.warningReset(apuEmerShutdown);
|
||||
}
|
||||
|
||||
if (apuEmerShutdownMast.clearFlag == 0 and getprop("/controls/apu/master") and apuEmerShutdown.active == 1) {
|
||||
if (apuEmerShutdownMast.clearFlag == 0 and systems.APUNodes.Controls.master.getBoolValue() and apuEmerShutdown.active == 1) {
|
||||
apuEmerShutdownMast.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(apuEmerShutdownMast);
|
||||
|
@ -2027,7 +2028,7 @@ var messages_priority_0 = func {
|
|||
|
||||
var messages_config_memo = func {
|
||||
phaseVarMemo = phaseNode.getValue();
|
||||
if (getprop("/controls/flight/flaps-input") == 0 or getprop("/controls/flight/flaps-input") == 4 or getprop("/controls/flight/speedbrake") != 0 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") > 1.75 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") < -3.65 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") < -3.55 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.55) {
|
||||
if (getprop("/controls/flight/flaps-input") == 0 or getprop("/controls/flight/flaps-input") == 4 or pts.Controls.Flight.speedbrake.getValue() != 0 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") > 1.75 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") < -3.65 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") < -3.55 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.55) {
|
||||
setprop("/ECAM/to-config-normal", 0);
|
||||
} else {
|
||||
setprop("/ECAM/to-config-normal", 1);
|
||||
|
@ -2069,7 +2070,7 @@ var messages_config_memo = func {
|
|||
toMemoLine3.colour = "c";
|
||||
}
|
||||
|
||||
if (getprop("/controls/flight/flaps-pos") > 0 and getprop("/controls/flight/flaps-pos") < 5) {
|
||||
if (pts.Controls.Flight.flapsPos.getValue() > 0 and pts.Controls.Flight.flapsPos.getValue() < 5) {
|
||||
toMemoLine4.msg = " FLAPS T.O";
|
||||
toMemoLine4.colour = "g";
|
||||
} else {
|
||||
|
@ -2136,7 +2137,7 @@ var messages_config_memo = func {
|
|||
}
|
||||
|
||||
if (getprop("it-fbw/law") == 1 or getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override")) {
|
||||
if (getprop("/controls/flight/flaps-pos") == 4) {
|
||||
if (pts.Controls.Flight.flapsPos.getValue() == 4) {
|
||||
ldgMemoLine4.msg = " FLAPS CONF 3";
|
||||
ldgMemoLine4.colour = "g";
|
||||
} else {
|
||||
|
@ -2144,7 +2145,7 @@ var messages_config_memo = func {
|
|||
ldgMemoLine4.colour = "c";
|
||||
}
|
||||
} else {
|
||||
if (getprop("/controls/flight/flaps-pos") == 5) {
|
||||
if (pts.Controls.Flight.flapsPos.getValue() == 5) {
|
||||
ldgMemoLine4.msg = " FLAPS FULL";
|
||||
ldgMemoLine4.colour = "g";
|
||||
} else {
|
||||
|
@ -2296,14 +2297,14 @@ var messages_right_memo = func {
|
|||
ldg_inhibit.active = 0;
|
||||
}
|
||||
|
||||
if ((!pts.Gear.wow[1].getValue()) and (getprop("/systems/electrical/some-electric-thingie/emer-elec-config") or getprop("/systems/fire/engine1/warning-active") == 1 or getprop("/systems/fire/engine2/warning-active") == 1 or getprop("/systems/fire/apu/warning-active") == 1 or getprop("/systems/failures/cargo-aft-fire") == 1 or getprop("/systems/failures/cargo-fwd-fire") == 1) or (((getprop("/systems/hydraulic/green-psi") < 1500 and getprop("/engines/engine[0]/state") == 3) and (getprop("/systems/hydraulic/yellow-psi") < 1500 and getprop("/engines/engine[1]/state") == 3)) or ((getprop("/systems/hydraulic/green-psi") < 1500 or getprop("/systems/hydraulic/yellow-psi") < 1500) and getprop("/engines/engine[0]/state") == 3 and getprop("/engines/engine[1]/state") == 3) and phaseVarMemo3 >= 3 and phaseVarMemo3 <= 8)) {
|
||||
if ((!pts.Gear.wow[1].getValue()) and (systems.ELEC.EmerElec.getValue() or getprop("/systems/fire/engine1/warning-active") == 1 or getprop("/systems/fire/engine2/warning-active") == 1 or getprop("/systems/fire/apu/warning-active") == 1 or getprop("/systems/failures/cargo-aft-fire") == 1 or getprop("/systems/failures/cargo-fwd-fire") == 1) or (((systems.HYD.Psi.green.getValue() < 1500 and pts.Engines.Engine.state[0].getValue() == 3) and (systems.HYD.Psi.yellow.getValue() < 1500 and pts.Engines.Engine.state[1].getValue() == 3)) or ((systems.HYD.Psi.green.getValue() < 1500 or systems.HYD.Psi.yellow.getValue() < 1500) and pts.Engines.Engine.state[0].getValue() == 3 and pts.Engines.Engine.state[1].getValue() == 3) and phaseVarMemo3 >= 3 and phaseVarMemo3 <= 8)) {
|
||||
# todo: emer elec
|
||||
land_asap_r.active = 1;
|
||||
} else {
|
||||
land_asap_r.active = 0;
|
||||
}
|
||||
|
||||
if (land_asap_r.active == 0 and !pts.Gear.wow[1].getValue() and ((getprop("/fdm/jsbsim/propulsion/tank[0]/contents-lbs") < 1650 and getprop("/fdm/jsbsim/propulsion/tank[1]/contents-lbs") < 1650) or ((getprop("/systems/electrical/bus/dc-2") < 25 and (getprop("/systems/failures/fctl/elac1") == 1 or getprop("/systems/failures/fctl/sec1") == 1)) or (getprop("/systems/hydraulic/green-psi") < 1500 and (getprop("/systems/failures/fctl/elac1") == 1 and getprop("/systems/failures/fctl/sec1") == 1)) or (getprop("/systems/hydraulic/yellow-psi") < 1500 and (getprop("/systems/failures/fctl/elac1") == 1 and getprop("/systems/failures/fctl/sec1") == 1)) or (getprop("/systems/hydraulic/blue-psi") < 1500 and (getprop("/systems/failures/fctl/elac2") == 1 and getprop("/systems/failures/fctl/sec2") == 1))) or (phaseVarMemo3 >= 3 and phaseVarMemo3 <= 8 and (getprop("/engines/engine[0]/state") != 3 or getprop("/engines/engine[1]/state") != 3)))) {
|
||||
if (land_asap_r.active == 0 and !pts.Gear.wow[1].getValue() and ((getprop("/fdm/jsbsim/propulsion/tank[0]/contents-lbs") < 1650 and getprop("/fdm/jsbsim/propulsion/tank[1]/contents-lbs") < 1650) or ((getprop("/systems/electrical/bus/dc-2") < 25 and (getprop("/systems/failures/fctl/elac1") == 1 or getprop("/systems/failures/fctl/sec1") == 1)) or (systems.HYD.Psi.green.getValue() < 1500 and (getprop("/systems/failures/fctl/elac1") == 1 and getprop("/systems/failures/fctl/sec1") == 1)) or (systems.HYD.Psi.yellow.getValue() < 1500 and (getprop("/systems/failures/fctl/elac1") == 1 and getprop("/systems/failures/fctl/sec1") == 1)) or (systems.HYD.Psi.blue.getValue() < 1500 and (getprop("/systems/failures/fctl/elac2") == 1 and getprop("/systems/failures/fctl/sec2") == 1))) or (phaseVarMemo3 >= 3 and phaseVarMemo3 <= 8 and (pts.Engines.Engine.state[0].getValue() != 3 or pts.Engines.Engine.state[1].getValue() != 3)))) {
|
||||
land_asap_a.active = 1;
|
||||
} else {
|
||||
land_asap_a.active = 0;
|
||||
|
@ -2321,19 +2322,20 @@ var messages_right_memo = func {
|
|||
athr_off.active = 0;
|
||||
}
|
||||
|
||||
if ((phaseVarMemo3 >= 2 and phaseVarMemo3 <= 7) and getprop("/controls/flight/speedbrake") != 0) {
|
||||
if ((phaseVarMemo3 >= 2 and phaseVarMemo3 <= 7) and pts.Controls.Flight.speedbrake.getValue() != 0) {
|
||||
spd_brk.active = 1;
|
||||
} else {
|
||||
spd_brk.active = 0;
|
||||
}
|
||||
|
||||
if (getprop("/systems/thrust/state1") == "IDLE" and getprop("/systems/thrust/state2") == "IDLE" and phaseVarMemo3 >= 6 and phaseVarMemo3 <= 7) {
|
||||
thrustState = [pts.Systems.Thrust.state[0].getValue(), pts.Systems.Thrust.state[1].getValue()];
|
||||
if (thrustState[0] == "IDLE" and thrustState[1] == "IDLE" and phaseVarMemo3 >= 6 and phaseVarMemo3 <= 7) {
|
||||
spd_brk.colour = "g";
|
||||
} else if ((phaseVarMemo3 >= 2 and phaseVarMemo3 <= 5) or ((getprop("/systems/thrust/state1") != "IDLE" or getprop("/systems/thrust/state2") != "IDLE") and (phaseVarMemo3 >= 6 and phaseVarMemo3 <= 7))) {
|
||||
} else if ((phaseVarMemo3 >= 2 and phaseVarMemo3 <= 5) or ((thrustState[0] != "IDLE" or thrustState[1]) != "IDLE") and (phaseVarMemo3 >= 6 and phaseVarMemo3 <= 7)) {
|
||||
spd_brk.colour = "a";
|
||||
}
|
||||
|
||||
if (getprop("/controls/gear/brake-parking") == 1 and phaseVarMemo3 != 3) {
|
||||
if (pts.Controls.Gear.parkingBrake.getValue() == 1 and phaseVarMemo3 != 3) {
|
||||
park_brk.active = 1;
|
||||
} else {
|
||||
park_brk.active = 0;
|
||||
|
@ -2350,7 +2352,7 @@ var messages_right_memo = func {
|
|||
brk_fan.active = 0;
|
||||
}
|
||||
|
||||
if (getprop("/controls/hydraulic/ptu") == 1 and ((getprop("/systems/hydraulic/yellow-psi") < 1450 and getprop("/systems/hydraulic/green-psi") > 1450 and getprop("/controls/hydraulic/elec-pump-yellow") == 0) or (getprop("/systems/hydraulic/yellow-psi") > 1450 and getprop("/systems/hydraulic/green-psi") < 1450))) {
|
||||
if (systems.HYD.Switch.ptu.getValue() == 1 and ((systems.HYD.Psi.yellow.getValue() < 1450 and systems.HYD.Psi.green.getValue() > 1450 and getprop("/controls/hydraulic/elec-pump-yellow") == 0) or (systems.HYD.Psi.yellow.getValue() > 1450 and systems.HYD.Psi.green.getValue() < 1450))) {
|
||||
ptu.active = 1;
|
||||
} else {
|
||||
ptu.active = 0;
|
||||
|
@ -2380,7 +2382,7 @@ var messages_right_memo = func {
|
|||
nw_strg_disc.active = 0;
|
||||
}
|
||||
|
||||
if (getprop("/engines/engine[0]/state") == 3 or getprop("/engines/engine[1]/state") == 3) {
|
||||
if (pts.Engines.Engine.state[0].getValue() == 3 or pts.Engines.Engine.state[1].getValue() == 3) {
|
||||
nw_strg_disc.colour = "a";
|
||||
} else {
|
||||
nw_strg_disc.colour = "g";
|
||||
|
@ -2404,13 +2406,13 @@ var messages_right_memo = func {
|
|||
company_call.active = 0;
|
||||
}
|
||||
|
||||
if (getprop("/controls/pneumatics/switches/apu") == 1 and getprop("/engines/engine[2]/n1") >= 95) {
|
||||
if (getprop("/controls/pneumatics/switches/apu") == 1 and pts.APU.rpm.getValue() >= 95) {
|
||||
apu_bleed.active = 1;
|
||||
} else {
|
||||
apu_bleed.active = 0;
|
||||
}
|
||||
|
||||
if (apu_bleed.active == 0 and getprop("/engines/engine[2]/n1") >= 95) {
|
||||
if (apu_bleed.active == 0 and pts.APU.rpm.getValue() >= 95) {
|
||||
apu_avail.active = 1;
|
||||
} else {
|
||||
apu_avail.active = 0;
|
||||
|
@ -2458,7 +2460,7 @@ var messages_right_memo = func {
|
|||
auto_brk_max.active = 0;
|
||||
}
|
||||
|
||||
if (getprop("/systems/fuel/valves/crossfeed-valve") != 0 and getprop("/controls/fuel/switches/crossfeed") == 1) {
|
||||
if (systems.FUEL.Valves.crossfeed.getValue() != 0 and systems.FUEL.Switches.crossfeed.getValue()) {
|
||||
fuelx.active = 1;
|
||||
} else {
|
||||
fuelx.active = 0;
|
||||
|
|
|
@ -12,31 +12,18 @@ var code2 = 0;
|
|||
var gear0 = 0;
|
||||
var state1 = 0;
|
||||
var state2 = 0;
|
||||
var flaps = 0;
|
||||
var dep = "";
|
||||
var arr = "";
|
||||
var n1_left = 0;
|
||||
var n1_right = 0;
|
||||
var flaps = 0;
|
||||
var modelat = 0;
|
||||
var mode = 0;
|
||||
var modeI = 0;
|
||||
var gs = 0;
|
||||
var aglalt = 0;
|
||||
var cruiseft = 0;
|
||||
var cruiseft_b = 0;
|
||||
var newcruise = 0;
|
||||
var phase = 0;
|
||||
var state1 = 0;
|
||||
var state2 = 0;
|
||||
var wowl = 0;
|
||||
var wowr = 0;
|
||||
var targetalt = 0;
|
||||
var targetvs = 0;
|
||||
var targetfpa = 0;
|
||||
var accel_agl_ft = 0;
|
||||
var locarm = 0;
|
||||
var apprarm = 0;
|
||||
var fd1 = 0;
|
||||
var fd2 = 0;
|
||||
var spd = 0;
|
||||
|
@ -65,37 +52,17 @@ var nameadf1 = "XX";
|
|||
var ias = 0;
|
||||
var mach = 0;
|
||||
var ktsmach = 0;
|
||||
var mngktsmach = 0;
|
||||
var mng_spd = 0;
|
||||
var mng_spd_cmd = 0;
|
||||
var kts_sel = 0;
|
||||
var mach_sel = 0;
|
||||
var srsSPD = 0;
|
||||
var mach_switchover = 0;
|
||||
var decel = 0;
|
||||
var mng_alt_spd_cmd = 0;
|
||||
var mng_alt_spd = 0;
|
||||
var mng_alt_mach_cmd = 0;
|
||||
var mng_alt_mach = 0;
|
||||
var mng_spd_cmd = 0;
|
||||
var mng_spd = 0;
|
||||
var ap1 = 0;
|
||||
var ap2 = 0;
|
||||
var flx = 0;
|
||||
var lat = 0;
|
||||
var newlat = 0;
|
||||
var vert = 0;
|
||||
var newvert = 0;
|
||||
var newvertarm = 0;
|
||||
var thr1 = 0;
|
||||
var thr2 = 0;
|
||||
var altsel = 0;
|
||||
var crzFl = 0;
|
||||
var windHdg = 0;
|
||||
var windSpeed = 0;
|
||||
setprop("position/gear-agl-ft", 0);
|
||||
setprop("/FMGC/internal/mng-spd", 157);
|
||||
setprop("/FMGC/internal/mng-spd-cmd", 157);
|
||||
setprop("/FMGC/internal/mng-kts-mach", 0);
|
||||
setprop("/FMGC/internal/mach-switchover", 0);
|
||||
setprop("/it-autoflight/settings/accel-agl-ft", 1500); #eventually set to 1500 above runway
|
||||
setprop("/it-autoflight/internal/vert-speed-fpm", 0);
|
||||
setprop("/it-autoflight/output/fma-pwr", 0);
|
||||
|
@ -116,10 +83,10 @@ var FMGCinit = func {
|
|||
FMGCInternal.minspeed = 0;
|
||||
FMGCInternal.maxspeed = 338;
|
||||
FMGCInternal.phase = 0; # 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done
|
||||
setprop("/FMGC/internal/mng-spd", 157);
|
||||
setprop("/FMGC/internal/mng-spd-cmd", 157);
|
||||
setprop("/FMGC/internal/mng-kts-mach", 0);
|
||||
setprop("/FMGC/internal/mach-switchover", 0);
|
||||
FMGCInternal.mngSpd = 157;
|
||||
FMGCInternal.mngSpdCmd = 157;
|
||||
FMGCInternal.mngKtsMach = 0;
|
||||
FMGCInternal.machSwitchover = 0;
|
||||
setprop("/FMGC/internal/loc-source", "NAV0");
|
||||
setprop("/FMGC/internal/optalt", 0);
|
||||
setprop("/FMGC/internal/landing-time", -99);
|
||||
|
@ -259,6 +226,13 @@ var FMGCInternal = {
|
|||
fob: 0,
|
||||
fuelPredGw: 0,
|
||||
cg: 0,
|
||||
|
||||
|
||||
# Managed Speed
|
||||
machSwitchover: 0,
|
||||
mngKtsMach: 0,
|
||||
mngSpd: 0,
|
||||
mngSpdCmd: 0,
|
||||
};
|
||||
|
||||
var postInit = func() {
|
||||
|
@ -271,10 +245,12 @@ var postInit = func() {
|
|||
var FMGCNodes = {
|
||||
costIndex: props.globals.initNode("/FMGC/internal/cost-index", 0, "DOUBLE"),
|
||||
flexSet: props.globals.initNode("/FMGC/internal/flex-set", 0, "BOOL"),
|
||||
mngSpdAlt: props.globals.getNode("/FMGC/internal/mng-alt-spd"),
|
||||
mngMachAlt: props.globals.getNode("/FMGC/internal/mng-alt-mach"),
|
||||
toFromSet: props.globals.initNode("/FMGC/internal/tofrom-set", 0, "BOOL"),
|
||||
toState: props.globals.initNode("/FMGC/internal/to-state", 0, "BOOL"),
|
||||
v1: props.globals.initNode("/FMGC/internal/v1", 0, "DOUBLE"),
|
||||
v1set: props.globals.initNode("/FMGC/internal/v1-set", 0, "BOOL"),
|
||||
toState: props.globals.initNode("/FMGC/internal/to-state", 0, "BOOL"),
|
||||
};
|
||||
|
||||
############
|
||||
|
@ -621,69 +597,47 @@ var radios = maketimer(1, func() {
|
|||
var masterFMGC = maketimer(0.2, func {
|
||||
n1_left = pts.Engines.Engine.n1Actual[0].getValue();
|
||||
n1_right = pts.Engines.Engine.n1Actual[1].getValue();
|
||||
flaps = getprop("/controls/flight/flaps-pos");
|
||||
modelat = getprop("/modes/pfd/fma/roll-mode");
|
||||
mode = getprop("/modes/pfd/fma/pitch-mode");
|
||||
modeI = getprop("/it-autoflight/mode/vert");
|
||||
gs = getprop("/velocities/groundspeed-kt");
|
||||
alt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
|
||||
aglalt = pts.Position.gearAglFt.getValue();
|
||||
modelat = Modes.PFD.FMA.rollMode.getValue();
|
||||
mode = Modes.PFD.FMA.pitchMode.getValue();
|
||||
gs = pts.Velocities.groundspeed.getValue();
|
||||
alt = pts.Instrumentation.Altimeter.indicatedFt.getValue();
|
||||
# cruiseft = FMGCInternal.crzFt;
|
||||
# cruiseft_b = FMGCInternal.crzFt - 200;
|
||||
newcruise = getprop("/it-autoflight/internal/alt");
|
||||
phase = FMGCInternal.phase;
|
||||
state1 = getprop("/systems/thrust/state1");
|
||||
state2 = getprop("/systems/thrust/state2");
|
||||
wowl = getprop("/gear/gear[1]/wow");
|
||||
wowr = getprop("/gear/gear[2]/wow");
|
||||
targetalt = getprop("/it-autoflight/internal/alt");
|
||||
targetvs = getprop("/it-autoflight/input/vs");
|
||||
targetfpa = getprop("/it-autoflight/input/fpa");
|
||||
accel_agl_ft = getprop("/it-autoflight/settings/accel-agl-ft");
|
||||
locarm = getprop("/it-autopilot/output/loc-armed");
|
||||
apprarm = getprop("/it-autopilot/output/appr-armed");
|
||||
state1 = pts.Systems.Thrust.state[0].getValue();
|
||||
state2 = pts.Systems.Thrust.state[1].getValue();
|
||||
accel_agl_ft = Setting.reducAglFt.getValue();
|
||||
gear0 = pts.Gear.wow[0].getBoolValue();
|
||||
ap1 = getprop("/it-autoflight/output/ap1");
|
||||
ap2 = getprop("/it-autoflight/output/ap2");
|
||||
flx = getprop("/systems/thrust/lim-flex");
|
||||
lat = getprop("/it-autoflight/mode/lat");
|
||||
newlat = getprop("/modes/pfd/fma/roll-mode");
|
||||
vert = getprop("/it-autoflight/mode/vert");
|
||||
newvert = getprop("/modes/pfd/fma/pitch-mode");
|
||||
newvertarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
|
||||
thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
|
||||
thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
|
||||
altSel = getprop("/it-autoflight/input/alt");
|
||||
altSel = Input.alt.getValue();
|
||||
|
||||
if ((n1_left < 85 or n1_right < 85) and gs < 90 and mode == " " and gear0 and FMGCInternal.phase == 1) { # rejected takeoff
|
||||
FMGCInternal.phase = 0;
|
||||
setprop("/systems/pressurization/mode", "GN");
|
||||
systems.PNEU.pressMode.setValue("GN");
|
||||
}
|
||||
|
||||
if (gear0 and FMGCInternal.phase == 0 and ((n1_left >= 85 and n1_right >= 85 and mode == "SRS") or gs >= 90)) {
|
||||
FMGCInternal.phase = 1;
|
||||
setprop("/systems/pressurization/mode", "TO");
|
||||
systems.PNEU.pressMode.setValue("TO");
|
||||
}
|
||||
|
||||
if (FMGCInternal.phase == 1 and ((mode != "SRS" and mode != " ") or alt >= accel_agl_ft)) {
|
||||
FMGCInternal.phase = 2;
|
||||
setprop("/systems/pressurization/mode", "TO");
|
||||
systems.PNEU.pressMode.setValue("TO");
|
||||
}
|
||||
|
||||
if (FMGCInternal.phase == 2 and (mode == "ALT CRZ" or mode == "ALT CRZ*")) {
|
||||
FMGCInternal.phase = 3;
|
||||
setprop("/systems/pressurization/mode", "CR");
|
||||
systems.PNEU.pressMode.setValue("CR");
|
||||
}
|
||||
|
||||
if (FMGCInternal.crzFl >= 200) {
|
||||
if (FMGCInternal.phase == 3 and (flightPlanController.arrivalDist <= 200 or altSel < 20000)) {
|
||||
FMGCInternal.phase = 4;
|
||||
setprop("/systems/pressurization/mode", "DE");
|
||||
systems.PNEU.pressMode.setValue("DE");
|
||||
}
|
||||
} else {
|
||||
if (FMGCInternal.phase == 3 and (flightPlanController.arrivalDist <= 200 or altSel < (FMGCInternal.crzFl * 100))) { # todo - not sure about crzFl condition, investigate what happens!
|
||||
FMGCInternal.phase = 4;
|
||||
setprop("/systems/pressurization/mode", "DE");
|
||||
systems.PNEU.pressMode.setValue("DE");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -691,7 +645,7 @@ var masterFMGC = maketimer(0.2, func {
|
|||
FMGCInternal.phase = 5;
|
||||
}
|
||||
|
||||
if (flightPlanController.num[2].getValue() > 0 and getprop("/FMGC/flightplan[2]/active") == 1 and flightPlanController.arrivalDist <= 15 and (modelat == "NAV" or modelat == "LOC" or modelat == "LOC*") and aglalt < 9500) { #todo decel pseudo waypoint
|
||||
if (flightPlanController.num[2].getValue() > 0 and getprop("/FMGC/flightplan[2]/active") == 1 and flightPlanController.arrivalDist <= 15 and (modelat == "NAV" or modelat == "LOC" or modelat == "LOC*") and pts.Position.gearAglFt.getValue() < 9500) { #todo decel pseudo waypoint
|
||||
setprop("/FMGC/internal/decel", 1);
|
||||
} else if (getprop("/FMGC/internal/decel") == 1 and (FMGCInternal.phase == 0 or FMGCInternal.phase == 6)) {
|
||||
setprop("/FMGC/internal/decel", 0);
|
||||
|
@ -699,8 +653,8 @@ var masterFMGC = maketimer(0.2, func {
|
|||
|
||||
if ((FMGCInternal.phase == 5) and state1 == "TOGA" and state2 == "TOGA") {
|
||||
FMGCInternal.phase = 6;
|
||||
setprop("/systems/pressurization/mode", "TO");
|
||||
setprop("/it-autoflight/input/toga", 1);
|
||||
systems.PNEU.pressMode.setValue("TO");
|
||||
Input.toga.setValue(1);
|
||||
}
|
||||
|
||||
if (FMGCInternal.phase == 6 and alt >= accel_agl_ft) { # todo when insert altn or new dest
|
||||
|
@ -723,36 +677,38 @@ var masterFMGC = maketimer(0.2, func {
|
|||
############################
|
||||
# wind
|
||||
############################
|
||||
windHdg = pts.Environment.windFromHdg.getValue();
|
||||
windSpeed = pts.Environment.windSpeedKt.getValue();
|
||||
if (FMGCInternal.phase == 3 or FMGCInternal.phase == 4 or FMGCInternal.phase == 6) {
|
||||
var windsDidChange = 0;
|
||||
if (FMGCInternal.crzFt > 5000 and alt > 4980 and alt < 5020) {
|
||||
if (sprintf("%03d", getprop("/environment/wind-from-heading-deg/")) != fmgc.windController.fl50_wind[0] or sprintf("%03d", getprop("/environment/wind-speed-kt/")) != fmgc.windController.fl50_wind[1]) {
|
||||
fmgc.windController.fl50_wind[0] = sprintf("%03d", getprop("/environment/wind-from-heading-deg/"));
|
||||
fmgc.windController.fl50_wind[1] = sprintf("%03d", getprop("/environment/wind-speed-kt/"));
|
||||
if (sprintf("%03d", windHdg) != fmgc.windController.fl50_wind[0] or sprintf("%03d", windSpeed) != fmgc.windController.fl50_wind[1]) {
|
||||
fmgc.windController.fl50_wind[0] = sprintf("%03d", windHdg);
|
||||
fmgc.windController.fl50_wind[1] = sprintf("%03d", windSpeed);
|
||||
fmgc.windController.fl50_wind[2] = "FL50";
|
||||
windsDidChange = 1;
|
||||
}
|
||||
}
|
||||
if (FMGCInternal.crzFt > 15000 and alt > 14980 and alt < 15020) {
|
||||
if (sprintf("%03d", getprop("/environment/wind-from-heading-deg/")) != fmgc.windController.fl150_wind[0] or sprintf("%03d", getprop("/environment/wind-speed-kt/")) != fmgc.windController.fl150_wind[1]) {
|
||||
fmgc.windController.fl150_wind[0] = sprintf("%03d", getprop("/environment/wind-from-heading-deg/"));
|
||||
fmgc.windController.fl150_wind[1] = sprintf("%03d", getprop("/environment/wind-speed-kt/"));
|
||||
if (sprintf("%03d", windHdg) != fmgc.windController.fl150_wind[0] or sprintf("%03d", windSpeed) != fmgc.windController.fl150_wind[1]) {
|
||||
fmgc.windController.fl150_wind[0] = sprintf("%03d", windHdg);
|
||||
fmgc.windController.fl150_wind[1] = sprintf("%03d", windSpeed);
|
||||
fmgc.windController.fl150_wind[2] = "FL150";
|
||||
windsDidChange = 1;
|
||||
}
|
||||
}
|
||||
if (FMGCInternal.crzFt > 25000 and alt > 24980 and alt < 25020) {
|
||||
if (sprintf("%03d", getprop("/environment/wind-from-heading-deg/")) != fmgc.windController.fl250_wind[0] or sprintf("%03d", getprop("/environment/wind-speed-kt/")) != fmgc.windController.fl250_wind[1]) {
|
||||
fmgc.windController.fl250_wind[0] = sprintf("%03d", getprop("/environment/wind-from-heading-deg/"));
|
||||
fmgc.windController.fl250_wind[1] = sprintf("%03d", getprop("/environment/wind-speed-kt/"));
|
||||
if (sprintf("%03d", windHdg) != fmgc.windController.fl250_wind[0] or sprintf("%03d", windSpeed) != fmgc.windController.fl250_wind[1]) {
|
||||
fmgc.windController.fl250_wind[0] = sprintf("%03d", windHdg);
|
||||
fmgc.windController.fl250_wind[1] = sprintf("%03d", windSpeed);
|
||||
fmgc.windController.fl250_wind[2] = "FL250";
|
||||
windsDidChange = 1;
|
||||
}
|
||||
}
|
||||
if (FMGCInternal.crzSet and alt > FMGCInternal.crzFt - 20 and alt < FMGCInternal.crzFt + 20) {
|
||||
if (sprintf("%03d", getprop("/environment/wind-from-heading-deg/")) != fmgc.windController.flcrz_wind[0] or sprintf("%03d", getprop("/environment/wind-speed-kt/")) != fmgc.windController.flcrz_wind[1]) {
|
||||
fmgc.windController.flcrz_wind[0] = sprintf("%03d", getprop("/environment/wind-from-heading-deg/"));
|
||||
fmgc.windController.flcrz_wind[1] = sprintf("%03d", getprop("/environment/wind-speed-kt/"));
|
||||
if (sprintf("%03d", windHdg) != fmgc.windController.flcrz_wind[0] or sprintf("%03d", windSpeed) != fmgc.windController.flcrz_wind[1]) {
|
||||
fmgc.windController.flcrz_wind[0] = sprintf("%03d", windHdg);
|
||||
fmgc.windController.flcrz_wind[1] = sprintf("%03d", windSpeed);
|
||||
fmgc.windController.flcrz_wind[2] = "FL" ~ FMGCInternal.crzFl;
|
||||
windsDidChange = 1;
|
||||
}
|
||||
|
@ -765,9 +721,9 @@ var masterFMGC = maketimer(0.2, func {
|
|||
############################
|
||||
# calculate speeds
|
||||
############################
|
||||
flap = getprop("/controls/flight/flaps-pos");
|
||||
flap = pts.Controls.Flight.flapsPos.getValue();
|
||||
weight_lbs = pts.Fdm.JSBsim.Inertia.weightLbs.getValue() / 1000;
|
||||
altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
|
||||
altitude = pts.Instrumentation.Altimeter.indicatedFt.getValue();
|
||||
|
||||
# current speeds
|
||||
FMGCInternal.clean = 2 * weight_lbs * 0.45359237 + 85;
|
||||
|
@ -932,7 +888,11 @@ var masterFMGC = maketimer(0.2, func {
|
|||
}
|
||||
} else if (flap == 5) { # FULL
|
||||
FMGCInternal.vsw = FMGCInternal.vs1g_conf_full;
|
||||
FMGCInternal.minspeed = FMGCInternal.vapp;
|
||||
if (FMGCInternal.vappSpeedSet) {
|
||||
FMGCInternal.minspeed = FMGCInternal.vapp_appr;
|
||||
} else {
|
||||
FMGCInternal.minspeed = FMGCInternal.vapp;
|
||||
}
|
||||
|
||||
if (FMGCInternal.takeoffState) {
|
||||
FMGCInternal.vls_min = FMGCInternal.vs1g_clean * 1.13;
|
||||
|
@ -941,7 +901,7 @@ var masterFMGC = maketimer(0.2, func {
|
|||
}
|
||||
}
|
||||
|
||||
if (gear0 and flaps < 5 and (state1 == "MCT" or state1 == "MAN THR" or state1 == "TOGA") and (state2 == "MCT" or state2 == "MAN THR" or state2 == "TOGA")) {
|
||||
if (gear0 and pts.Controls.Flight.flapsPos.getValue() < 5 and (state1 == "MCT" or state1 == "MAN THR" or state1 == "TOGA") and (state2 == "MCT" or state2 == "MAN THR" or state2 == "TOGA")) {
|
||||
if (!FMGCInternal.takeoffState) {
|
||||
fmgc.FMGCNodes.toState.setValue(1);
|
||||
}
|
||||
|
@ -959,7 +919,7 @@ var masterFMGC = maketimer(0.2, func {
|
|||
|
||||
departure_rwy = fmgc.flightPlanController.flightplans[2].departure_runway;
|
||||
destination_rwy = fmgc.flightPlanController.flightplans[2].destination_runway;
|
||||
if (destination_rwy != nil and phase >= 2) {
|
||||
if (destination_rwy != nil and FMGCInternal.phase >= 2) {
|
||||
var airport = airportinfo(FMGCInternal.arrApt);
|
||||
setprop("/FMGC/internal/ldg-elev", airport.elevation * M2FT); # eventually should be runway elevation
|
||||
magnetic_hdg = geo.normdeg(destination_rwy.heading - getprop("/environment/magnetic-variation-deg"));
|
||||
|
@ -974,7 +934,7 @@ var masterFMGC = maketimer(0.2, func {
|
|||
} else if (!getprop("/FMGC/internal/ils1crs-set")) {
|
||||
setprop("instrumentation/nav[0]/radials/selected-deg", magnetic_hdg);
|
||||
}
|
||||
} else if (departure_rwy != nil and phase <= 1) {
|
||||
} else if (departure_rwy != nil and FMGCInternal.phase <= 1) {
|
||||
magnetic_hdg = geo.normdeg(departure_rwy.heading - getprop("/environment/magnetic-variation-deg"));
|
||||
runway_ils = departure_rwy.ils_frequency_mhz;
|
||||
if (runway_ils != nil and !getprop("/FMGC/internal/ils1freq-set") and !getprop("/FMGC/internal/ils1crs-set")) {
|
||||
|
@ -992,25 +952,28 @@ var masterFMGC = maketimer(0.2, func {
|
|||
|
||||
var reset_FMGC = func {
|
||||
FMGCInternal.phase = 0;
|
||||
fd1 = getprop("/it-autoflight/input/fd1");
|
||||
fd2 = getprop("/it-autoflight/input/fd2");
|
||||
spd = getprop("/it-autoflight/input/kts");
|
||||
hdg = getprop("/it-autoflight/input/hdg");
|
||||
alt = getprop("/it-autoflight/input/alt");
|
||||
fd1 = Input.fd1.getValue();
|
||||
fd2 = Input.fd2.getValue();
|
||||
spd = Input.kts.getValue();
|
||||
hdg = Input.hdg.getValue();
|
||||
alt = Input.alt.getValue();
|
||||
|
||||
ITAF.init();
|
||||
FMGCinit();
|
||||
flightPlanController.reset();
|
||||
windController.reset();
|
||||
windController.init();
|
||||
|
||||
mcdu.MCDU_reset(0);
|
||||
mcdu.MCDU_reset(1);
|
||||
setprop("it-autoflight/input/fd1", fd1);
|
||||
setprop("it-autoflight/input/fd2", fd2);
|
||||
setprop("it-autoflight/input/kts", spd);
|
||||
setprop("it-autoflight/input/hdg", hdg);
|
||||
setprop("it-autoflight/input/alt", alt);
|
||||
setprop("/systems/pressurization/mode", "GN");
|
||||
mcdu.ReceivedMessagesDatabase.clearDatabase();
|
||||
|
||||
Input.fd1.setValue(fd1);
|
||||
Input.fd2.setValue(fd2);
|
||||
Input.kts.setValue(spd);
|
||||
Input.hdg.setValue(hdg);
|
||||
Input.alt.setValue(alt);
|
||||
|
||||
systems.PNEU.pressMode.setValue("GN");
|
||||
setprop("/systems/pressurization/vs", "0");
|
||||
setprop("/systems/pressurization/targetvs", "0");
|
||||
setprop("/systems/pressurization/vs-norm", "0");
|
||||
|
@ -1019,7 +982,7 @@ var reset_FMGC = func {
|
|||
setprop("/systems/pressurization/outflowpos", "0");
|
||||
setprop("/systems/pressurization/deltap-norm", "0");
|
||||
setprop("/systems/pressurization/outflowpos-norm", "0");
|
||||
altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
|
||||
altitude = pts.Instrumentation.Altimeter.indicatedFt.getValue();
|
||||
setprop("/systems/pressurization/cabinalt", altitude);
|
||||
setprop("/systems/pressurization/targetalt", altitude);
|
||||
setprop("/systems/pressurization/diff-to-target", "0");
|
||||
|
@ -1028,7 +991,6 @@ var reset_FMGC = func {
|
|||
setprop("/systems/pressurization/ambientpsi", "0");
|
||||
setprop("/systems/pressurization/cabinpsi", "0");
|
||||
|
||||
mcdu.ReceivedMessagesDatabase.clearDatabase();
|
||||
}
|
||||
|
||||
#################
|
||||
|
@ -1037,121 +999,110 @@ var reset_FMGC = func {
|
|||
|
||||
var ManagedSPD = maketimer(0.25, func {
|
||||
if (FMGCInternal.crzSet and FMGCInternal.costIndexSet) {
|
||||
if (getprop("/it-autoflight/input/spd-managed") == 1) {
|
||||
altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
|
||||
mode = getprop("/modes/pfd/fma/pitch-mode");
|
||||
ias = getprop("/instrumentation/airspeed-indicator/indicated-speed-kt");
|
||||
mach = getprop("/instrumentation/airspeed-indicator/indicated-mach");
|
||||
ktsmach = getprop("/it-autoflight/input/kts-mach");
|
||||
mngktsmach = getprop("/FMGC/internal/mng-kts-mach");
|
||||
mng_spd = getprop("/FMGC/internal/mng-spd");
|
||||
mng_spd_cmd = getprop("/FMGC/internal/mng-spd-cmd");
|
||||
kts_sel = getprop("/it-autoflight/input/kts");
|
||||
mach_sel = getprop("/it-autoflight/input/mach");
|
||||
if (Custom.Input.spdManaged.getBoolValue()) {
|
||||
altitude = pts.Instrumentation.Altimeter.indicatedFt.getValue();
|
||||
mode = Modes.PFD.FMA.pitchMode.getValue();
|
||||
ias = pts.Instrumentation.AirspeedIndicator.indicatedSpdKt.getValue();
|
||||
mach = pts.Instrumentation.AirspeedIndicator.indicatedMach.getValue();
|
||||
ktsmach = Input.ktsMach.getValue();
|
||||
kts_sel = Input.kts.getValue();
|
||||
mach_sel = Input.mach.getValue();
|
||||
srsSPD = getprop("/it-autoflight/settings/togaspd");
|
||||
phase = FMGCInternal.phase; # 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done
|
||||
flap = getprop("/controls/flight/flaps-pos");
|
||||
mach_switchover = getprop("/FMGC/internal/mach-switchover");
|
||||
flap = pts.Controls.Flight.flapsPos.getValue();
|
||||
decel = getprop("/FMGC/internal/decel");
|
||||
|
||||
mng_alt_spd_cmd = getprop("/FMGC/internal/mng-alt-spd");
|
||||
mng_alt_spd = math.round(mng_alt_spd_cmd, 1);
|
||||
|
||||
mng_alt_mach_cmd = getprop("/FMGC/internal/mng-alt-mach");
|
||||
mng_alt_mach = math.round(mng_alt_mach_cmd, 0.001);
|
||||
mng_alt_spd = math.round(FMGCNodes.mngSpdAlt.getValue(), 1);
|
||||
mng_alt_mach = math.round(FMGCNodes.mngMachAlt.getValue(), 0.001);
|
||||
|
||||
if (mach > mng_alt_mach and (FMGCInternal.phase == 2 or FMGCInternal.phase == 3)) {
|
||||
setprop("/FMGC/internal/mach-switchover", 1);
|
||||
FMGCInternal.machSwitchover = 1;
|
||||
}
|
||||
|
||||
if (ias > mng_alt_spd and (FMGCInternal.phase == 4 or FMGCInternal.phase == 5)) {
|
||||
setprop("/FMGC/internal/mach-switchover", 0);
|
||||
FMGCInternal.machSwitchover = 0;
|
||||
}
|
||||
|
||||
if ((mode == " " or mode == "SRS") and (FMGCInternal.phase == 0 or FMGCInternal.phase == 1)) {
|
||||
if (mngktsmach) {
|
||||
setprop("/FMGC/internal/mng-kts-mach", 0);
|
||||
if (FMGCInternal.mngKtsMach) {
|
||||
FMGCInternal.mngKtsMach = 0;
|
||||
}
|
||||
if (mng_spd_cmd != srsSPD) {
|
||||
setprop("/FMGC/internal/mng-spd-cmd", srsSPD);
|
||||
if (FMGCInternal.mngSpdCmd != srsSPD) {
|
||||
FMGCInternal.mngSpdCmd = srsSPD;
|
||||
}
|
||||
} else if ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude <= 10050) {
|
||||
if (mngktsmach) {
|
||||
setprop("/FMGC/internal/mng-kts-mach", 0);
|
||||
if (FMGCInternal.mngKtsMach) {
|
||||
FMGCInternal.mngKtsMach = 0;
|
||||
}
|
||||
if (mng_spd_cmd != 250 and !decel) {
|
||||
setprop("/FMGC/internal/mng-spd-cmd", 250);
|
||||
} else if (mng_spd_cmd != FMGCInternal.minspeed and decel) {
|
||||
setprop("/FMGC/internal/mng-spd-cmd", FMGCInternal.minspeed);
|
||||
if (FMGCInternal.mngSpdCmd != 250 and !decel) {
|
||||
FMGCInternal.mngSpdCmd = 250;
|
||||
} else if (FMGCInternal.mngSpdCmd != FMGCInternal.minspeed and decel) {
|
||||
FMGCInternal.mngSpdCmd = FMGCInternal.minspeed;
|
||||
}
|
||||
} else if ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > 10070 and !mach_switchover) {
|
||||
if (mngktsmach) {
|
||||
setprop("/FMGC/internal/mng-kts-mach", 0);
|
||||
} else if ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > 10070 and !FMGCInternal.machSwitchover) {
|
||||
if (FMGCInternal.mngKtsMach) {
|
||||
FMGCInternal.mngKtsMach = 0;
|
||||
}
|
||||
if (mng_spd_cmd != mng_alt_spd) {
|
||||
setprop("/FMGC/internal/mng-spd-cmd", mng_alt_spd);
|
||||
if (FMGCInternal.mngSpdCmd != mng_alt_spd) {
|
||||
FMGCInternal.mngSpdCmd = mng_alt_spd;
|
||||
}
|
||||
} else if ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > 10070 and mach_switchover) {
|
||||
if (!mngktsmach) {
|
||||
setprop("/FMGC/internal/mng-kts-mach", 1);
|
||||
} else if ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > 10070 and FMGCInternal.machSwitchover) {
|
||||
if (!FMGCInternal.mngKtsMach) {
|
||||
FMGCInternal.mngKtsMach = 1;
|
||||
}
|
||||
if (mng_spd_cmd != mng_alt_mach) {
|
||||
setprop("/FMGC/internal/mng-spd-cmd", mng_alt_mach);
|
||||
if (FMGCInternal.mngSpdCmd != mng_alt_mach) {
|
||||
FMGCInternal.mngSpdCmd = mng_alt_mach;
|
||||
}
|
||||
} else if (FMGCInternal.phase == 4 and altitude > 11000 and !mach_switchover) {
|
||||
if (mngktsmach) {
|
||||
setprop("/FMGC/internal/mng-kts-mach", 0);
|
||||
} else if (FMGCInternal.phase == 4 and altitude > 11000 and !FMGCInternal.machSwitchover) {
|
||||
if (FMGCInternal.mngKtsMach) {
|
||||
FMGCInternal.mngKtsMach = 0;
|
||||
}
|
||||
if (mng_spd_cmd != mng_alt_spd) {
|
||||
setprop("/FMGC/internal/mng-spd-cmd", mng_alt_spd);
|
||||
if (FMGCInternal.mngSpdCmd != mng_alt_spd) {
|
||||
FMGCInternal.mngSpdCmd = mng_alt_spd;
|
||||
}
|
||||
} else if (FMGCInternal.phase == 4 and altitude > 11000 and mach_switchover) {
|
||||
if (!mngktsmach) {
|
||||
setprop("/FMGC/internal/mng-kts-mach", 1);
|
||||
} else if (FMGCInternal.phase == 4 and altitude > 11000 and FMGCInternal.machSwitchover) {
|
||||
if (!FMGCInternal.mngKtsMach) {
|
||||
FMGCInternal.mngKtsMach = 1;
|
||||
}
|
||||
if (mng_spd_cmd != mng_alt_mach) {
|
||||
setprop("/FMGC/internal/mng-spd-cmd", mng_alt_mach);
|
||||
if (FMGCInternal.mngSpdCmd != mng_alt_mach) {
|
||||
FMGCInternal.mngSpdCmd = mng_alt_mach;
|
||||
}
|
||||
} else if ((FMGCInternal.phase == 4 or FMGCInternal.phase == 5 or FMGCInternal.phase == 6) and altitude > 11000 and !mach_switchover) {
|
||||
if (mngktsmach) {
|
||||
setprop("/FMGC/internal/mng-kts-mach", 0);
|
||||
} else if ((FMGCInternal.phase == 4 or FMGCInternal.phase == 5 or FMGCInternal.phase == 6) and altitude > 11000 and !FMGCInternal.machSwitchover) {
|
||||
if (FMGCInternal.mngKtsMach) {
|
||||
FMGCInternal.mngKtsMach = 0;
|
||||
}
|
||||
if (mng_spd_cmd != mng_alt_spd and !decel) {
|
||||
setprop("/FMGC/internal/mng-spd-cmd", mng_alt_spd);
|
||||
} else if (mng_spd_cmd != FMGCInternal.minspeed and decel) {
|
||||
setprop("/FMGC/internal/mng-spd-cmd", FMGCInternal.minspeed);
|
||||
if (FMGCInternal.mngSpdCmd != mng_alt_spd and !decel) {
|
||||
FMGCInternal.mngSpdCmd = mng_alt_spd;
|
||||
} else if (FMGCInternal.mngSpdCmd != FMGCInternal.minspeed and decel) {
|
||||
FMGCInternal.mngSpdCmd = FMGCInternal.minspeed;
|
||||
}
|
||||
} else if ((FMGCInternal.phase == 4 or FMGCInternal.phase == 5 or FMGCInternal.phase == 6) and altitude <= 10980) {
|
||||
if (mngktsmach) {
|
||||
setprop("/FMGC/internal/mng-kts-mach", 0);
|
||||
if (FMGCInternal.mngKtsMach) {
|
||||
FMGCInternal.mngKtsMach = 0;
|
||||
}
|
||||
if (mng_spd_cmd != 250 and !decel) {
|
||||
setprop("/FMGC/internal/mng-spd-cmd", 250);
|
||||
} else if (mng_spd_cmd != FMGCInternal.minspeed and decel) {
|
||||
setprop("/FMGC/internal/mng-spd-cmd", FMGCInternal.minspeed);
|
||||
if (FMGCInternal.mngSpdCmd != 250 and !decel) {
|
||||
FMGCInternal.mngSpdCmd = 250;
|
||||
} else if (FMGCInternal.mngSpdCmd != FMGCInternal.minspeed and decel) {
|
||||
FMGCInternal.mngSpdCmd = FMGCInternal.minspeed;
|
||||
}
|
||||
}
|
||||
|
||||
mng_spd_cmd = getprop("/FMGC/internal/mng-spd-cmd");
|
||||
|
||||
if (mng_spd_cmd > FMGCInternal.maxspeed - 5) {
|
||||
setprop("/FMGC/internal/mng-spd", FMGCInternal.maxspeed - 5);
|
||||
if (FMGCInternal.mngSpdCmd > FMGCInternal.maxspeed - 5) {
|
||||
FMGCInternal.mngSpd = (FMGCInternal.maxspeed - 5);
|
||||
} else {
|
||||
setprop("/FMGC/internal/mng-spd", mng_spd_cmd);
|
||||
FMGCInternal.mngSpd = FMGCInternal.mngSpdCmd;
|
||||
}
|
||||
|
||||
if (ktsmach and !mngktsmach) {
|
||||
setprop("/it-autoflight/input/kts-mach", 0);
|
||||
} else if (!ktsmach and mngktsmach) {
|
||||
setprop("/it-autoflight/input/kts-mach", 1);
|
||||
if (ktsmach and !FMGCInternal.mngKtsMach) {
|
||||
Input.ktsMach.setValue(0);
|
||||
} else if (!ktsmach and FMGCInternal.mngKtsMach) {
|
||||
Input.ktsMach.setValue(1);
|
||||
}
|
||||
|
||||
mng_spd = getprop("/FMGC/internal/mng-spd");
|
||||
|
||||
if (kts_sel != mng_spd and !ktsmach) {
|
||||
setprop("/it-autoflight/input/kts", mng_spd);
|
||||
} else if (mach_sel != mng_spd and ktsmach) {
|
||||
setprop("/it-autoflight/input/mach", mng_spd);
|
||||
if (kts_sel != FMGCInternal.mngSpd and !ktsmach) {
|
||||
Input.kts.setValue(FMGCInternal.mngSpd);
|
||||
} else if (mach_sel != FMGCInternal.mngSpd and ktsmach) {
|
||||
Input.mach.setValue(FMGCInternal.mngSpd);
|
||||
}
|
||||
} else {
|
||||
ManagedSPD.stop();
|
||||
|
|
|
@ -76,6 +76,8 @@ var Engines = {
|
|||
var Environment = {
|
||||
magVar: props.globals.getNode("/environment/magnetic-variation-deg"),
|
||||
tempDegC: props.globals.getNode("/environment/temperature-degc"),
|
||||
windFromHdg: props.globals.getNode("/environment/wind-from-heading-deg"),
|
||||
windSpeedKt: props.globals.getNode("/environment/wind-speed-kt"),
|
||||
};
|
||||
|
||||
var Fdm = {
|
||||
|
|
|
@ -80,7 +80,7 @@ var start_one_mancheck = func {
|
|||
settimer(start_one_mancheck_b, 0.5);
|
||||
}
|
||||
} else {
|
||||
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
|
||||
if (pts.Engines.Engine.state[0].getValue() == 1 or pts.Engines.Engine.state[0].getValue() == 2) {
|
||||
setprop("/systems/pneumatics/valves/starter-valve-1", 0);
|
||||
setprop("/engines/engine[0]/state", 0);
|
||||
setprop("/controls/engines/engine[0]/starter", 0);
|
||||
|
@ -163,7 +163,7 @@ var start_two_mancheck = func {
|
|||
settimer(start_two_mancheck_b, 0.5);
|
||||
}
|
||||
} else {
|
||||
if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
|
||||
if (pts.Engines.Engine.state[1].getValue() == 1 or pts.Engines.Engine.state[1].getValue() == 2) {
|
||||
setprop("/systems/pneumatics/valves/starter-valve-2", 0);
|
||||
setprop("/engines/engine[1]/state", 0);
|
||||
setprop("/controls/engines/engine[1]/starter", 0);
|
||||
|
@ -319,23 +319,23 @@ var eng_two_n2_check = maketimer(0.5, func {
|
|||
|
||||
# Various Other Stuff
|
||||
setlistener("/controls/engines/engine-start-switch", func {
|
||||
if (getprop("/engines/engine[0]/state") == 0) {
|
||||
if (pts.Engines.Engine.state[0].getValue() == 0) {
|
||||
start_one_check();
|
||||
start_one_mancheck();
|
||||
}
|
||||
if (getprop("/engines/engine[1]/state") == 0) {
|
||||
if (pts.Engines.Engine.state[1].getValue() == 0) {
|
||||
start_two_check();
|
||||
start_two_mancheck();
|
||||
}
|
||||
if ((getprop("/controls/engines/engine-start-switch") == 0) or (getprop("/controls/engines/engine-start-switch") == 1)) {
|
||||
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
|
||||
if (pts.Engines.Engine.state[0].getValue() == 1 or pts.Engines.Engine.state[0].getValue() == 2) {
|
||||
setprop("/controls/engines/engine[0]/starter", 0);
|
||||
setprop("/controls/engines/engine[0]/cutoff", 1);
|
||||
setprop("/systems/pneumatics/valves/starter-valve-1", 0);
|
||||
setprop("/engines/engine[0]/state", 0);
|
||||
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
|
||||
}
|
||||
if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
|
||||
if (pts.Engines.Engine.state[1].getValue() == 1 or pts.Engines.Engine.state[1].getValue() == 2) {
|
||||
setprop("/controls/engines/engine[1]/starter", 0);
|
||||
setprop("/controls/engines/engine[1]/cutoff", 1);
|
||||
setprop("/systems/pneumatics/valves/starter-valve-2", 0);
|
||||
|
@ -347,7 +347,7 @@ setlistener("/controls/engines/engine-start-switch", func {
|
|||
|
||||
setlistener("/systems/pneumatics/psi/engine-1-psi", func {
|
||||
if (systems.PNEU.Psi.engine1.getValue() < 24.5) {
|
||||
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
|
||||
if (pts.Engines.Engine.state[0].getValue() == 1 or pts.Engines.Engine.state[0].getValue() == 2) {
|
||||
setprop("/controls/engines/engine[0]/starter", 0);
|
||||
setprop("/controls/engines/engine[0]/cutoff", 1);
|
||||
setprop("/systems/pneumatics/valves/starter-valve-1", 0);
|
||||
|
@ -359,7 +359,7 @@ setlistener("/systems/pneumatics/psi/engine-1-psi", func {
|
|||
|
||||
setlistener("/systems/pneumatics/psi/engine-2-psi", func {
|
||||
if (systems.PNEU.Psi.engine2.getValue() < 24.5) {
|
||||
if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
|
||||
if (pts.Engines.Engine.state[1].getValue() == 1 or pts.Engines.Engine.state[1].getValue() == 2) {
|
||||
setprop("/controls/engines/engine[1]/starter", 0);
|
||||
setprop("/controls/engines/engine[1]/cutoff", 1);
|
||||
setprop("/systems/pneumatics/valves/starter-valve-2", 0);
|
||||
|
@ -370,10 +370,10 @@ setlistener("/systems/pneumatics/psi/engine-2-psi", func {
|
|||
}, 0, 0);
|
||||
|
||||
setlistener("/engines/engine[0]/state", func() {
|
||||
setprop("/sim/sound/shutdown[0]", getprop("/engines/engine[0]/state"));
|
||||
setprop("/sim/sound/shutdown[0]", pts.Engines.Engine.state[0].getValue());
|
||||
}, 0, 0);
|
||||
|
||||
|
||||
setlistener("/engines/engine[1]/state", func() {
|
||||
setprop("/sim/sound/shutdown[1]", getprop("/engines/engine[1]/state"));
|
||||
setprop("/sim/sound/shutdown[1]", pts.Engines.Engine.state[1].getValue());
|
||||
}, 0, 0);
|
|
@ -80,7 +80,7 @@ var start_one_mancheck = func {
|
|||
settimer(start_one_mancheck_b, 0.5);
|
||||
}
|
||||
} else {
|
||||
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
|
||||
if (pts.Engines.Engine.state[0].getValue() == 1 or pts.Engines.Engine.state[0].getValue() == 2) {
|
||||
setprop("/systems/pneumatics/valves/starter-valve-1", 0);
|
||||
setprop("/engines/engine[0]/state", 0);
|
||||
setprop("/controls/engines/engine[0]/starter", 0);
|
||||
|
@ -163,7 +163,7 @@ var start_two_mancheck = func {
|
|||
settimer(start_two_mancheck_b, 0.5);
|
||||
}
|
||||
} else {
|
||||
if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
|
||||
if (pts.Engines.Engine.state[1].getValue() == 1 or pts.Engines.Engine.state[1].getValue() == 2) {
|
||||
setprop("/systems/pneumatics/valves/starter-valve-2", 0);
|
||||
setprop("/engines/engine[1]/state", 0);
|
||||
setprop("/controls/engines/engine[1]/starter", 0);
|
||||
|
@ -319,23 +319,23 @@ var eng_two_n2_check = maketimer(0.5, func {
|
|||
|
||||
# Various Other Stuff
|
||||
setlistener("/controls/engines/engine-start-switch", func {
|
||||
if (getprop("/engines/engine[0]/state") == 0) {
|
||||
if (pts.Engines.Engine.state[0].getValue() == 0) {
|
||||
start_one_check();
|
||||
start_one_mancheck();
|
||||
}
|
||||
if (getprop("/engines/engine[1]/state") == 0) {
|
||||
if (pts.Engines.Engine.state[1].getValue() == 0) {
|
||||
start_two_check();
|
||||
start_two_mancheck();
|
||||
}
|
||||
if ((getprop("/controls/engines/engine-start-switch") == 0) or (getprop("/controls/engines/engine-start-switch") == 1)) {
|
||||
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
|
||||
if (pts.Engines.Engine.state[0].getValue() == 1 or pts.Engines.Engine.state[0].getValue() == 2) {
|
||||
setprop("/controls/engines/engine[0]/starter", 0);
|
||||
setprop("/controls/engines/engine[0]/cutoff", 1);
|
||||
setprop("/systems/pneumatics/valves/starter-valve-1", 0);
|
||||
setprop("/engines/engine[0]/state", 0);
|
||||
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
|
||||
}
|
||||
if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
|
||||
if (pts.Engines.Engine.state[1].getValue() == 1 or pts.Engines.Engine.state[1].getValue() == 2) {
|
||||
setprop("/controls/engines/engine[1]/starter", 0);
|
||||
setprop("/controls/engines/engine[1]/cutoff", 1);
|
||||
setprop("/systems/pneumatics/valves/starter-valve-2", 0);
|
||||
|
@ -347,7 +347,7 @@ setlistener("/controls/engines/engine-start-switch", func {
|
|||
|
||||
setlistener("/systems/pneumatics/psi/engine-1-psi", func {
|
||||
if (systems.PNEU.Psi.engine1.getValue() < 24.5) {
|
||||
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
|
||||
if (pts.Engines.Engine.state[0].getValue() == 1 or pts.Engines.Engine.state[0].getValue() == 2) {
|
||||
setprop("/controls/engines/engine[0]/starter", 0);
|
||||
setprop("/controls/engines/engine[0]/cutoff", 1);
|
||||
setprop("/systems/pneumatics/valves/starter-valve-1", 0);
|
||||
|
@ -359,7 +359,7 @@ setlistener("/systems/pneumatics/psi/engine-1-psi", func {
|
|||
|
||||
setlistener("/systems/pneumatics/psi/engine-2-psi", func {
|
||||
if (systems.PNEU.Psi.engine2.getValue() < 24.5) {
|
||||
if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
|
||||
if (pts.Engines.Engine.state[1].getValue() == 1 or pts.Engines.Engine.state[1].getValue() == 2) {
|
||||
setprop("/controls/engines/engine[1]/starter", 0);
|
||||
setprop("/controls/engines/engine[1]/cutoff", 1);
|
||||
setprop("/systems/pneumatics/valves/starter-valve-2", 0);
|
||||
|
@ -370,10 +370,10 @@ setlistener("/systems/pneumatics/psi/engine-2-psi", func {
|
|||
}, 0, 0);
|
||||
|
||||
setlistener("/engines/engine[0]/state", func() {
|
||||
setprop("/sim/sound/shutdown[0]", getprop("/engines/engine[0]/state"));
|
||||
setprop("/sim/sound/shutdown[0]", pts.Engines.Engine.state[0].getValue());
|
||||
}, 0, 0);
|
||||
|
||||
|
||||
setlistener("/engines/engine[1]/state", func() {
|
||||
setprop("/sim/sound/shutdown[1]", getprop("/engines/engine[1]/state"));
|
||||
setprop("/sim/sound/shutdown[1]", pts.Engines.Engine.state[1].getValue());
|
||||
}, 0, 0);
|
|
@ -98,6 +98,7 @@ var PNEU = {
|
|||
ramAir: props.globals.getNode("/systems/air-conditioning/valves/ram-air"),
|
||||
hotAir: props.globals.getNode("/systems/air-conditioning/valves/hot-air"),
|
||||
},
|
||||
pressMode: props.globals.getNode("/systems/pressurization/mode", 1),
|
||||
init: func() {
|
||||
me.resetFail();
|
||||
|
||||
|
@ -165,8 +166,8 @@ var PNEU = {
|
|||
targetalt = getprop("/systems/pressurization/targetalt");
|
||||
ambient = getprop("/systems/pressurization/ambientpsi");
|
||||
cabinpsi = getprop("/systems/pressurization/cabinpsi");
|
||||
state1 = getprop("/systems/thrust/state1");
|
||||
state2 = getprop("/systems/thrust/state2");
|
||||
state1 = pts.Systems.Thrust.state[0].getValue();
|
||||
state2 = pts.Systems.Thrust.state[1].getValue();
|
||||
pressmode = getprop("/systems/pressurization/mode");
|
||||
vs = getprop("/systems/pressurization/vs-norm");
|
||||
manvs = getprop("/systems/pressurization/manvs-cmd");
|
||||
|
|
|
@ -400,4 +400,256 @@
|
|||
<output>/ECAM/Upper/N1ylim</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Flap Indicator</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>options/maxflap</property>
|
||||
<value>35</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/fdm/jsbsim/fcs/flap-pos-deg</property>
|
||||
<entry><ind> 0.0</ind><dep>-192</dep></entry>
|
||||
<entry><ind>10.0</ind><dep>-135</dep></entry>
|
||||
<entry><ind>15.0</ind><dep>-89</dep></entry>
|
||||
<entry><ind>20.0</ind><dep>-43</dep></entry>
|
||||
<entry><ind>35.0</ind><dep>0</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>options/maxflap</property>
|
||||
<value>40</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/fdm/jsbsim/fcs/flap-pos-deg</property>
|
||||
<entry><ind> 0.0</ind><dep>-192</dep></entry>
|
||||
<entry><ind>10.0</ind><dep>-135</dep></entry>
|
||||
<entry><ind>15.0</ind><dep>-89</dep></entry>
|
||||
<entry><ind>20.0</ind><dep>-43</dep></entry>
|
||||
<entry><ind>40.0</ind><dep>0</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
<input>0</input>
|
||||
<output>/ECAM/Upper/FlapX</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Flap Indicator</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>options/maxflap</property>
|
||||
<value>35</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/fdm/jsbsim/fcs/flap-pos-deg</property>
|
||||
<entry><ind> 0.0</ind><dep>-47</dep></entry>
|
||||
<entry><ind>10.0</ind><dep>-33</dep></entry>
|
||||
<entry><ind>15.0</ind><dep>-21</dep></entry>
|
||||
<entry><ind>20.0</ind><dep>-10</dep></entry>
|
||||
<entry><ind>35.0</ind><dep>0</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>options/maxflap</property>
|
||||
<value>40</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/fdm/jsbsim/fcs/flap-pos-deg</property>
|
||||
<entry><ind> 0.0</ind><dep>-47</dep></entry>
|
||||
<entry><ind>10.0</ind><dep>-33</dep></entry>
|
||||
<entry><ind>15.0</ind><dep>-21</dep></entry>
|
||||
<entry><ind>20.0</ind><dep>-10</dep></entry>
|
||||
<entry><ind>40.0</ind><dep>0</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
<input>0</input>
|
||||
<output>/ECAM/Upper/FlapY</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Flap Indicator</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>options/maxflap</property>
|
||||
<value>35</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/fdm/jsbsim/fcs/flap-pos-deg</property>
|
||||
<entry><ind> 0.0</ind><dep>-200</dep></entry>
|
||||
<entry><ind>10.0</ind><dep>-135</dep></entry>
|
||||
<entry><ind>15.0</ind><dep>-95</dep></entry>
|
||||
<entry><ind>20.0</ind><dep>-48.5</dep></entry>
|
||||
<entry><ind>35.0</ind><dep>0</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>options/maxflap</property>
|
||||
<value>40</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/fdm/jsbsim/fcs/flap-pos-deg</property>
|
||||
<entry><ind> 0.0</ind><dep>-200</dep></entry>
|
||||
<entry><ind>10.0</ind><dep>-135</dep></entry>
|
||||
<entry><ind>15.0</ind><dep>-95</dep></entry>
|
||||
<entry><ind>20.0</ind><dep>-48.5</dep></entry>
|
||||
<entry><ind>40.0</ind><dep>0</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
<input>0</input>
|
||||
<output>/ECAM/Upper/FlapXtrans</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Flap Indicator</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>options/maxflap</property>
|
||||
<value>35</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/fdm/jsbsim/fcs/flap-pos-deg</property>
|
||||
<entry><ind> 0.0</ind><dep>-49</dep></entry>
|
||||
<entry><ind>10.0</ind><dep>-33</dep></entry>
|
||||
<entry><ind>15.0</ind><dep>-23</dep></entry>
|
||||
<entry><ind>20.0</ind><dep>-11.25</dep></entry>
|
||||
<entry><ind>35.0</ind><dep>0</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>options/maxflap</property>
|
||||
<value>40</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/fdm/jsbsim/fcs/flap-pos-deg</property>
|
||||
<entry><ind> 0.0</ind><dep>-49</dep></entry>
|
||||
<entry><ind>10.0</ind><dep>-33</dep></entry>
|
||||
<entry><ind>15.0</ind><dep>-23</dep></entry>
|
||||
<entry><ind>20.0</ind><dep>-11.25</dep></entry>
|
||||
<entry><ind>40.0</ind><dep>0</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
<input>0</input>
|
||||
<output>/ECAM/Upper/FlapYtrans</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Slat Indicator</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/fdm/jsbsim/fcs/slat-pos-deg</property>
|
||||
<entry><ind> 0.0</ind><dep>131</dep></entry>
|
||||
<entry><ind>18.0</ind><dep>92</dep></entry>
|
||||
<entry><ind>22.0</ind><dep>46</dep></entry>
|
||||
<entry><ind>27.0</ind><dep>0</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
<input>0</input>
|
||||
<output>/ECAM/Upper/SlatX</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Slat Indicator</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/fdm/jsbsim/fcs/slat-pos-deg</property>
|
||||
<entry><ind> 0.0</ind><dep>-42</dep></entry>
|
||||
<entry><ind>18.0</ind><dep>-28</dep></entry>
|
||||
<entry><ind>22.0</ind><dep>-14</dep></entry>
|
||||
<entry><ind>27.0</ind><dep>0</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
<input>0</input>
|
||||
<output>/ECAM/Upper/SlatY</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Slat Indicator</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/fdm/jsbsim/fcs/slat-pos-deg</property>
|
||||
<entry><ind> 0.0</ind><dep>135</dep></entry>
|
||||
<entry><ind>18.0</ind><dep>95</dep></entry>
|
||||
<entry><ind>22.0</ind><dep>50</dep></entry>
|
||||
<entry><ind>27.0</ind><dep>0</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
<input>0</input>
|
||||
<output>/ECAM/Upper/SlatXtrans</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Slat Indicator</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/fdm/jsbsim/fcs/slat-pos-deg</property>
|
||||
<entry><ind> 0.0</ind><dep>-43</dep></entry>
|
||||
<entry><ind>18.0</ind><dep>-29</dep></entry>
|
||||
<entry><ind>22.0</ind><dep>-15</dep></entry>
|
||||
<entry><ind>27.0</ind><dep>0</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
<input>0</input>
|
||||
<output>/ECAM/Upper/SlatYtrans</output>
|
||||
</filter>
|
||||
|
||||
</PropertyList>
|
||||
|
|
Loading…
Add table
Reference in a new issue