FMGC: READ ONLY MCDU F-PLN, supports TMPY F-PLN too
This commit is contained in:
parent
4169b7261c
commit
ab7375a53a
5 changed files with 390 additions and 116 deletions
|
@ -11,8 +11,6 @@ var symbol = "helvetica_medium.txf";
|
|||
var normal = 70;
|
||||
var small = 56;
|
||||
var page = "";
|
||||
var flightNum = props.globals.initNode("/MCDUC/flight-num", "", "STRING");
|
||||
var flightNumSet = props.globals.initNode("/MCDUC/flight-num-set", 0, "BOOL");
|
||||
var fplnl1 = "";
|
||||
var fplnl1s = "";
|
||||
var fplnl2 = "";
|
||||
|
@ -106,6 +104,7 @@ var engOutAcc = props.globals.getNode("/FMGC/internal/eng-out-reduc", 1);
|
|||
var engOutAccSet = props.globals.getNode("/MCDUC/reducacc-set", 1);
|
||||
var transAlt = props.globals.getNode("/FMGC/internal/trans-alt", 1);
|
||||
var managedSpeed = props.globals.getNode("/it-autoflight/input/spd-managed", 1);
|
||||
var TMPYActive = props.globals.getNode("/MCDUC/tmpy-active", 1);
|
||||
|
||||
# Fetch nodes into vectors
|
||||
var pageProp = [props.globals.getNode("/MCDU[0]/page", 1), props.globals.getNode("/MCDU[1]/page", 1)];
|
||||
|
@ -129,6 +128,7 @@ var fpln3c = [props.globals.getNode("/MCDU[0]/F-PLN/line-3c", 1), props.globals.
|
|||
var fpln4c = [props.globals.getNode("/MCDU[0]/F-PLN/line-4c", 1), props.globals.getNode("/MCDU[1]/F-PLN/line-4c", 1)];
|
||||
var fpln5c = [props.globals.getNode("/MCDU[0]/F-PLN/line-5c", 1), props.globals.getNode("/MCDU[1]/F-PLN/line-5c", 1)];
|
||||
var fpln6c = [props.globals.getNode("/MCDU[0]/F-PLN/line-6c", 1), props.globals.getNode("/MCDU[1]/F-PLN/line-6c", 1)];
|
||||
var showFromInd = [props.globals.getNode("MCDU[0]/F-PLN/show-from", 1), props.globals.getNode("MCDU[1]/F-PLN/show-from", 1)];
|
||||
|
||||
# Create Nodes:
|
||||
var pageSwitch = [props.globals.initNode("/MCDU[0]/internal/switch", 0, "BOOL"), props.globals.initNode("/MCDU[1]/internal/switch", 0, "BOOL")];
|
||||
|
@ -183,7 +183,7 @@ var canvas_MCDU_base = {
|
|||
"Simple_L1_Arrow","Simple_L2_Arrow","Simple_L3_Arrow","Simple_L4_Arrow","Simple_L5_Arrow","Simple_L6_Arrow","Simple_R1","Simple_R2","Simple_R3","Simple_R4","Simple_R5","Simple_R6","Simple_R1S","Simple_R2S","Simple_R3S","Simple_R4S","Simple_R5S",
|
||||
"Simple_R6S","Simple_R1_Arrow","Simple_R2_Arrow","Simple_R3_Arrow","Simple_R4_Arrow","Simple_R5_Arrow","Simple_R6_Arrow","Simple_C1","Simple_C2","Simple_C3","Simple_C4","Simple_C5","Simple_C6","Simple_C1S","Simple_C2S","Simple_C3S","Simple_C4S",
|
||||
"Simple_C5S","Simple_C6S","INITA","INITA_CoRoute","INITA_FltNbr","INITA_CostIndex","INITA_CruiseFLTemp","INITA_FromTo","INITA_InitRequest","INITA_AlignIRS","INITB","INITB_ZFWCG","INITB_ZFW","INITB_ZFW_S","INITB_Block","PERFTO","PERFTO_V1","PERFTO_VR",
|
||||
"PERFTO_V2","PERFTO_FE","PERFTO_SE","PERFTO_OE","FPLN","FPLN_From","FPLN_Callsign","FPLN_L1","FPLN_L2","FPLN_L3","FPLN_L4","FPLN_L5","FPLN_L6","FPLN_L1S","FPLN_L2S","FPLN_L3S","FPLN_L4S","FPLN_L5S","FPLN_L6S"];
|
||||
"PERFTO_V2","PERFTO_FE","PERFTO_SE","PERFTO_OE","FPLN","FPLN_From","FPLN_TMPY_group","FPLN_Callsign","FPLN_L1","FPLN_L2","FPLN_L3","FPLN_L4","FPLN_L5","FPLN_L6","FPLN_L1S","FPLN_L2S","FPLN_L3S","FPLN_L4S","FPLN_L5S","FPLN_L6S"];
|
||||
},
|
||||
update: func() {
|
||||
if (ac1.getValue() >= 110 and mcdu1_lgt.getValue() > 0.01) {
|
||||
|
@ -212,17 +212,17 @@ var canvas_MCDU_base = {
|
|||
me["Simple_PageNum"].hide();
|
||||
me["ArrowLeft"].show();
|
||||
me["ArrowRight"].show();
|
||||
|
||||
|
||||
pageSwitch[i].setBoolValue(1);
|
||||
}
|
||||
|
||||
|
||||
if (flightNumSet.getValue()) {
|
||||
me["FPLN_Callsign"].setText(flightNum.getValue());
|
||||
me["FPLN_Callsign"].show();
|
||||
} else {
|
||||
me["FPLN_Callsign"].hide();
|
||||
}
|
||||
|
||||
|
||||
fplnl1 = fplnL1[i].getValue();
|
||||
if (fplnl1 != "") {
|
||||
me["FPLN_L1"].setText(fplnl1);
|
||||
|
@ -230,7 +230,7 @@ var canvas_MCDU_base = {
|
|||
} else {
|
||||
me["FPLN_L1"].hide();
|
||||
}
|
||||
|
||||
|
||||
fplnl2 = fplnL2[i].getValue();
|
||||
if (fplnl2 != "") {
|
||||
me["FPLN_L2"].setText(fplnl2);
|
||||
|
@ -238,7 +238,7 @@ var canvas_MCDU_base = {
|
|||
} else {
|
||||
me["FPLN_L2"].hide();
|
||||
}
|
||||
|
||||
|
||||
fplnl3 = fplnL3[i].getValue();
|
||||
if (fplnl3 != "") {
|
||||
me["FPLN_L3"].setText(fplnl3);
|
||||
|
@ -246,7 +246,7 @@ var canvas_MCDU_base = {
|
|||
} else {
|
||||
me["FPLN_L3"].hide();
|
||||
}
|
||||
|
||||
|
||||
fplnl4 = fplnL4[i].getValue();
|
||||
if (fplnl4 != "") {
|
||||
me["FPLN_L4"].setText(fplnl4);
|
||||
|
@ -254,7 +254,7 @@ var canvas_MCDU_base = {
|
|||
} else {
|
||||
me["FPLN_L4"].hide();
|
||||
}
|
||||
|
||||
|
||||
fplnl5 = fplnL5[i].getValue();
|
||||
if (fplnl5 != "") {
|
||||
me["FPLN_L5"].setText(fplnl5);
|
||||
|
@ -262,7 +262,7 @@ var canvas_MCDU_base = {
|
|||
} else {
|
||||
me["FPLN_L5"].hide();
|
||||
}
|
||||
|
||||
|
||||
fplnl6 = fplnL6[i].getValue();
|
||||
if (fplnl6 != "") {
|
||||
me["FPLN_L6"].setText(fplnl6);
|
||||
|
@ -270,7 +270,7 @@ var canvas_MCDU_base = {
|
|||
} else {
|
||||
me["FPLN_L6"].hide();
|
||||
}
|
||||
|
||||
|
||||
fplnl1s = fplnL1s[i].getValue();
|
||||
if (fplnl1s != "") {
|
||||
me["FPLN_L1S"].setText(fplnl1s);
|
||||
|
@ -278,7 +278,7 @@ var canvas_MCDU_base = {
|
|||
} else {
|
||||
me["FPLN_L1S"].hide();
|
||||
}
|
||||
|
||||
|
||||
fplnl2s = fplnL2s[i].getValue();
|
||||
if (fplnl2s != "") {
|
||||
me["FPLN_L2S"].setText(fplnl2s);
|
||||
|
@ -286,7 +286,7 @@ var canvas_MCDU_base = {
|
|||
} else {
|
||||
me["FPLN_L2S"].hide();
|
||||
}
|
||||
|
||||
|
||||
fplnl3s = fplnL3s[i].getValue();
|
||||
if (fplnl3s != "") {
|
||||
me["FPLN_L3S"].setText(fplnl3s);
|
||||
|
@ -294,7 +294,7 @@ var canvas_MCDU_base = {
|
|||
} else {
|
||||
me["FPLN_L3S"].hide();
|
||||
}
|
||||
|
||||
|
||||
fplnl4s = fplnL4s[i].getValue();
|
||||
if (fplnl4s != "") {
|
||||
me["FPLN_L4S"].setText(fplnl4s);
|
||||
|
@ -302,7 +302,7 @@ var canvas_MCDU_base = {
|
|||
} else {
|
||||
me["FPLN_L4S"].hide();
|
||||
}
|
||||
|
||||
|
||||
fplnl5s = fplnL5s[i].getValue();
|
||||
if (fplnl5s != "") {
|
||||
me["FPLN_L5S"].setText(fplnl5s);
|
||||
|
@ -310,7 +310,7 @@ var canvas_MCDU_base = {
|
|||
} else {
|
||||
me["FPLN_L5S"].hide();
|
||||
}
|
||||
|
||||
|
||||
fplnl6s = fplnL6s[i].getValue();
|
||||
if (fplnl6s != "") {
|
||||
me["FPLN_L6S"].setText(fplnl6s);
|
||||
|
@ -318,7 +318,19 @@ var canvas_MCDU_base = {
|
|||
} else {
|
||||
me["FPLN_L6S"].hide();
|
||||
}
|
||||
|
||||
|
||||
if (showFromInd[i].getBoolValue()) {
|
||||
me["FPLN_From"].show();
|
||||
} else {
|
||||
me["FPLN_From"].hide();
|
||||
}
|
||||
|
||||
if (TMPYActive.getBoolValue()) {
|
||||
me["FPLN_TMPY_group"].show();
|
||||
} else {
|
||||
me["FPLN_TMPY_group"].hide();
|
||||
}
|
||||
|
||||
if (fplnCSwitch[i].getBoolValue() != 1) {
|
||||
me.FPLNcolor(fpln1c[i].getValue(), fpln2c[i].getValue(), fpln3c[i].getValue(), fpln4c[i].getValue(), fpln5c[i].getValue(), fpln6c[i].getValue());
|
||||
fplnCSwitch[i].setBoolValue(1);
|
||||
|
@ -1743,17 +1755,11 @@ var canvas_MCDU_base = {
|
|||
},
|
||||
FPLNcolor: func(a, b, c, d, e, f) {
|
||||
me["FPLN_L1"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b"));
|
||||
me["FPLN_L1S"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b"));
|
||||
me["FPLN_L2"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b"));
|
||||
me["FPLN_L2S"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b"));
|
||||
me["FPLN_L3"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b"));
|
||||
me["FPLN_L3S"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b"));
|
||||
me["FPLN_L4"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b"));
|
||||
me["FPLN_L4S"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b"));
|
||||
me["FPLN_L5"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b"));
|
||||
me["FPLN_L5S"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b"));
|
||||
me["FPLN_L6"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b"));
|
||||
me["FPLN_L6S"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b"));
|
||||
},
|
||||
# 0 = ignore
|
||||
fontLeft: func (a, b, c, d, e, f) {
|
||||
|
|
|
@ -23,17 +23,17 @@
|
|||
guidetolerance="20"
|
||||
inkscape:pageopacity="1"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1027"
|
||||
inkscape:window-width="1600"
|
||||
inkscape:window-height="847"
|
||||
id="namedview371"
|
||||
showgrid="true"
|
||||
inkscape:zoom="0.70710678"
|
||||
inkscape:cx="649.67612"
|
||||
inkscape:cy="554.49798"
|
||||
inkscape:window-x="1592"
|
||||
inkscape:zoom="1"
|
||||
inkscape:cx="1222.1866"
|
||||
inkscape:cy="221.42045"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2"
|
||||
inkscape:current-layer="FPLN"
|
||||
showguides="false"
|
||||
inkscape:snap-global="false"
|
||||
units="px">
|
||||
|
@ -49,7 +49,7 @@
|
|||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
|
@ -750,16 +750,16 @@
|
|||
</g>
|
||||
<text
|
||||
inkscape:label="#text4244"
|
||||
transform="scale(0.991516,1.0085566)"
|
||||
transform="scale(0.99151709,1.0085555)"
|
||||
sodipodi:linespacing="125%"
|
||||
id="Simple_R5"
|
||||
y="656.51971"
|
||||
x="1022.194"
|
||||
y="656.52045"
|
||||
x="1022.1934"
|
||||
style="font-style:normal;font-weight:normal;font-size:71.89044189px;line-height:125%;font-family:sans-serif;text-align:start;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:70px;font-family:BoeingCDULarge;-inkscape-font-specification:BoeingCDULarge;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1"
|
||||
y="656.51971"
|
||||
x="1022.194"
|
||||
y="656.52045"
|
||||
x="1022.1934"
|
||||
id="tspan4313"
|
||||
sodipodi:role="line">TEXT</tspan></text>
|
||||
<g
|
||||
|
@ -783,16 +783,16 @@
|
|||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:71.89044189px;line-height:125%;font-family:sans-serif;text-align:start;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="1022.194"
|
||||
y="773.87396"
|
||||
x="1022.1934"
|
||||
y="773.87482"
|
||||
id="Simple_R6"
|
||||
sodipodi:linespacing="125%"
|
||||
transform="scale(0.991516,1.0085566)"
|
||||
transform="scale(0.99151709,1.0085555)"
|
||||
inkscape:label="#text4244"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan4323"
|
||||
x="1022.194"
|
||||
y="773.87396"
|
||||
x="1022.1934"
|
||||
y="773.87482"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:70px;font-family:BoeingCDULarge;-inkscape-font-specification:BoeingCDULarge;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1">TEXT</tspan></text>
|
||||
<g
|
||||
style="fill:#ffffff;fill-opacity:1"
|
||||
|
@ -1833,5 +1833,140 @@
|
|||
x="63.546234"
|
||||
id="tspan5000"
|
||||
sodipodi:role="line">TEXT</tspan></text>
|
||||
<g
|
||||
id="FPLN_TMPY_group"
|
||||
inkscape:label="#g3767">
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:71.89044189px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#ffff00;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
|
||||
x="350.9628"
|
||||
y="69.238258"
|
||||
id="FPLN_TMPY"
|
||||
sodipodi:linespacing="125%"
|
||||
transform="scale(0.991516,1.0085566)"
|
||||
inkscape:label="#text4244"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3617"
|
||||
x="350.9628"
|
||||
y="69.238258"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56px;font-family:BoeingCDULarge;-inkscape-font-specification:BoeingCDULarge;text-align:center;text-anchor:middle;fill:#ffff00;fill-opacity:1;">TMPY</tspan></text>
|
||||
<g
|
||||
inkscape:label="#g3715"
|
||||
id="FPLN_TMPY_ERASE">
|
||||
<text
|
||||
inkscape:label="#text4244"
|
||||
transform="scale(0.991516,1.0085566)"
|
||||
sodipodi:linespacing="125%"
|
||||
id="text3623"
|
||||
y="773.87396"
|
||||
x="63.16515"
|
||||
style="font-style:normal;font-weight:normal;font-size:71.89044189px;line-height:125%;font-family:sans-serif;text-align:start;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:70px;font-family:BoeingCDULarge;-inkscape-font-specification:BoeingCDULarge;text-align:start;text-anchor:start;fill:#bb6100;fill-opacity:1"
|
||||
y="773.87396"
|
||||
x="63.16515"
|
||||
id="tspan3625"
|
||||
sodipodi:role="line">ERASE</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:71.89044189px;line-height:125%;font-family:sans-serif;text-align:start;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="70.001091"
|
||||
y="717.159"
|
||||
id="text3627"
|
||||
sodipodi:linespacing="125%"
|
||||
transform="scale(0.991516,1.0085566)"
|
||||
inkscape:label="#text4244"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3629"
|
||||
x="70.001091"
|
||||
y="717.159"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56px;font-family:BoeingCDULarge;-inkscape-font-specification:BoeingCDULarge;text-align:start;text-anchor:start;fill:#bb6100;fill-opacity:1">TMPY</tspan></text>
|
||||
<g
|
||||
style="stroke:#bb6100;stroke-opacity:1"
|
||||
transform="matrix(1.0000008,0,0,0.99998914,-895.98809,710.38932)"
|
||||
inkscape:label="#g4241"
|
||||
id="g4241">
|
||||
<path
|
||||
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 952.4036,47.432743 -28.52965,0"
|
||||
id="path4480-4"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4482-0"
|
||||
d="M 936.70791,32.6968 921.8587,47.4328"
|
||||
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 936.70791,62.1688 921.8587,47.4328"
|
||||
id="path4484-0"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:label="#g3746"
|
||||
id="FPLN_TMPY_INSERT">
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:71.89044189px;line-height:125%;font-family:sans-serif;text-align:start;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="970.52771"
|
||||
y="717.15857"
|
||||
id="text3729"
|
||||
sodipodi:linespacing="125%"
|
||||
transform="scale(0.9915153,1.0085573)"
|
||||
inkscape:label="#text4244"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3731"
|
||||
x="970.52771"
|
||||
y="717.15857"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56px;font-family:BoeingCDULarge;-inkscape-font-specification:BoeingCDULarge;text-align:end;text-anchor:end;fill:#bb6100;fill-opacity:1">TMPY</tspan></text>
|
||||
<text
|
||||
inkscape:label="#text4244"
|
||||
transform="scale(0.99151523,1.0085574)"
|
||||
sodipodi:linespacing="125%"
|
||||
id="text3725"
|
||||
y="773.87335"
|
||||
x="972.33221"
|
||||
style="font-style:normal;font-weight:normal;font-size:71.89044189px;line-height:125%;font-family:sans-serif;text-align:start;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:70px;font-family:BoeingCDULarge;-inkscape-font-specification:BoeingCDULarge;text-align:end;text-anchor:end;fill:#bb6100;fill-opacity:1"
|
||||
y="773.87335"
|
||||
x="972.33221"
|
||||
id="tspan3727"
|
||||
sodipodi:role="line">INSERT</tspan></text>
|
||||
<g
|
||||
transform="matrix(1.0807108,0,0,1.0807111,-76.371959,450.13459)"
|
||||
inkscape:label="#g4324"
|
||||
id="g4324">
|
||||
<path
|
||||
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 998.71909,284.70793 -28.52965,0"
|
||||
id="path4490-7"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4318-2"
|
||||
d="m 994.54102,294.79468 -20.17351,-20.1735"
|
||||
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 984.45427,298.97275 -10e-6,-28.52964"
|
||||
id="path4320-1"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4322-2"
|
||||
d="m 974.36752,294.79468 20.17349,-20.1735"
|
||||
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before (image error) Size: 99 KiB After (image error) Size: 106 KiB |
|
@ -697,7 +697,7 @@ var ap_various = func {
|
|||
setprop("/it-autoflight/internal/lnav-advance-nm", turn_dist);
|
||||
|
||||
if (getprop("/FMGC/flightplan[1]/current-leg-dist") <= turn_dist) {
|
||||
r1_currentWP = r1_currentWP + 1;
|
||||
currentWP[1] = currentWP[1] + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,74 +1,211 @@
|
|||
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
|
||||
# A3XX mCDU by Joshua Davidson (it0uchpods)
|
||||
|
||||
# Copyright (c) 2019 Joshua Davidson (it0uchpods)
|
||||
|
||||
# Lowercase "g" is a degree symbol in the MCDU font.
|
||||
# wht = white, grn = green, blu = blue, amb = amber, yel = yellow
|
||||
setprop("/MCDU[0]/F-PLN/left-1", "");
|
||||
setprop("/MCDU[0]/F-PLN/left-1s", "");
|
||||
setprop("/MCDU[0]/F-PLN/left-2", "");
|
||||
setprop("/MCDU[0]/F-PLN/left-2s", "");
|
||||
setprop("/MCDU[0]/F-PLN/left-3", "");
|
||||
setprop("/MCDU[0]/F-PLN/left-3s", "");
|
||||
setprop("/MCDU[0]/F-PLN/left-4", "");
|
||||
setprop("/MCDU[0]/F-PLN/left-4s", "");
|
||||
setprop("/MCDU[0]/F-PLN/left-5", "");
|
||||
setprop("/MCDU[0]/F-PLN/left-5s", "");
|
||||
setprop("/MCDU[0]/F-PLN/left-6", "");
|
||||
setprop("/MCDU[0]/F-PLN/left-6s", "");
|
||||
setprop("/MCDU[0]/F-PLN/line-1c", "wht");
|
||||
setprop("/MCDU[0]/F-PLN/line-2c", "wht");
|
||||
setprop("/MCDU[0]/F-PLN/line-3c", "wht");
|
||||
setprop("/MCDU[0]/F-PLN/line-4c", "wht");
|
||||
setprop("/MCDU[0]/F-PLN/line-5c", "wht");
|
||||
setprop("/MCDU[0]/F-PLN/line-6c", "wht");
|
||||
|
||||
setprop("/MCDU[1]/F-PLN/left-1", "");
|
||||
setprop("/MCDU[1]/F-PLN/left-1s", "");
|
||||
setprop("/MCDU[1]/F-PLN/left-2", "");
|
||||
setprop("/MCDU[1]/F-PLN/left-2s", "");
|
||||
setprop("/MCDU[1]/F-PLN/left-3", "");
|
||||
setprop("/MCDU[1]/F-PLN/left-3s", "");
|
||||
setprop("/MCDU[1]/F-PLN/left-4", "");
|
||||
setprop("/MCDU[1]/F-PLN/left-4s", "");
|
||||
setprop("/MCDU[1]/F-PLN/left-5", "");
|
||||
setprop("/MCDU[1]/F-PLN/left-5s", "");
|
||||
setprop("/MCDU[1]/F-PLN/left-6", "");
|
||||
setprop("/MCDU[1]/F-PLN/left-6s", "");
|
||||
setprop("/MCDU[1]/F-PLN/line-1c", "wht");
|
||||
setprop("/MCDU[1]/F-PLN/line-2c", "wht");
|
||||
setprop("/MCDU[1]/F-PLN/line-3c", "wht");
|
||||
setprop("/MCDU[1]/F-PLN/line-4c", "wht");
|
||||
setprop("/MCDU[1]/F-PLN/line-5c", "wht");
|
||||
setprop("/MCDU[1]/F-PLN/line-6c", "wht");
|
||||
var left1 = [props.globals.initNode("MCDU[0]/F-PLN/left-1", "", "STRING"), props.globals.initNode("MCDU[1]/F-PLN/left-1", "", "STRING")];
|
||||
var left2 = [props.globals.initNode("MCDU[0]/F-PLN/left-2", "", "STRING"), props.globals.initNode("MCDU[1]/F-PLN/left-2", "", "STRING")];
|
||||
var left3 = [props.globals.initNode("MCDU[0]/F-PLN/left-3", "", "STRING"), props.globals.initNode("MCDU[1]/F-PLN/left-3", "", "STRING")];
|
||||
var left4 = [props.globals.initNode("MCDU[0]/F-PLN/left-4", "", "STRING"), props.globals.initNode("MCDU[1]/F-PLN/left-4", "", "STRING")];
|
||||
var left5 = [props.globals.initNode("MCDU[0]/F-PLN/left-5", "", "STRING"), props.globals.initNode("MCDU[1]/F-PLN/left-5", "", "STRING")];
|
||||
var left6 = [props.globals.initNode("MCDU[0]/F-PLN/left-6", "", "STRING"), props.globals.initNode("MCDU[1]/F-PLN/left-6", "", "STRING")];
|
||||
var left1s = [props.globals.initNode("MCDU[0]/F-PLN/left-1s", "", "STRING"), props.globals.initNode("MCDU[1]/F-PLN/left-1s", "", "STRING")];
|
||||
var left2s = [props.globals.initNode("MCDU[0]/F-PLN/left-2s", "", "STRING"), props.globals.initNode("MCDU[1]/F-PLN/left-2s", "", "STRING")];
|
||||
var left3s = [props.globals.initNode("MCDU[0]/F-PLN/left-3s", "", "STRING"), props.globals.initNode("MCDU[1]/F-PLN/left-3s", "", "STRING")];
|
||||
var left4s = [props.globals.initNode("MCDU[0]/F-PLN/left-4s", "", "STRING"), props.globals.initNode("MCDU[1]/F-PLN/left-4s", "", "STRING")];
|
||||
var left5s = [props.globals.initNode("MCDU[0]/F-PLN/left-5s", "", "STRING"), props.globals.initNode("MCDU[1]/F-PLN/left-5s", "", "STRING")];
|
||||
var left6s = [props.globals.initNode("MCDU[0]/F-PLN/left-6s", "", "STRING"), props.globals.initNode("MCDU[1]/F-PLN/left-6s", "", "STRING")];
|
||||
var line1c = [props.globals.initNode("MCDU[0]/F-PLN/line-1c", "wht", "STRING"), props.globals.initNode("MCDU[1]/F-PLN/line-1c", "wht", "STRING")];
|
||||
var line2c = [props.globals.initNode("MCDU[0]/F-PLN/line-2c", "wht", "STRING"), props.globals.initNode("MCDU[1]/F-PLN/line-2c", "wht", "STRING")];
|
||||
var line3c = [props.globals.initNode("MCDU[0]/F-PLN/line-3c", "wht", "STRING"), props.globals.initNode("MCDU[1]/F-PLN/line-3c", "wht", "STRING")];
|
||||
var line4c = [props.globals.initNode("MCDU[0]/F-PLN/line-4c", "wht", "STRING"), props.globals.initNode("MCDU[1]/F-PLN/line-4c", "wht", "STRING")];
|
||||
var line5c = [props.globals.initNode("MCDU[0]/F-PLN/line-5c", "wht", "STRING"), props.globals.initNode("MCDU[1]/F-PLN/line-5c", "wht", "STRING")];
|
||||
var line6c = [props.globals.initNode("MCDU[0]/F-PLN/line-6c", "wht", "STRING"), props.globals.initNode("MCDU[1]/F-PLN/line-6c", "wht", "STRING")];
|
||||
var showFromInd = [props.globals.initNode("MCDU[0]/F-PLN/show-from", 0, "BOOL"), props.globals.initNode("MCDU[1]/F-PLN/show-from", 0, "BOOL")];
|
||||
|
||||
var discontinuity = "---F-PLN DISCONTINUITY--";
|
||||
var fpln_end = "------END OF F-PLN------";
|
||||
var altn_fpln_end = "----END OF ALTN F-PLN---";
|
||||
var no_altn_fpln_end = "------NO ALTN F-PLN-----";
|
||||
|
||||
var r1_active_out = props.globals.getNode("/FMGC/flightplan[1]/active");
|
||||
var offset = [0, 0];
|
||||
var fp = 0;
|
||||
var num = 0;
|
||||
var wpColor = "grn";
|
||||
var active_out = [nil, props.globals.getNode("/FMGC/flightplan[1]/active")];
|
||||
var num_out = [props.globals.getNode("/FMGC/flightplan[0]/num"), props.globals.getNode("/FMGC/flightplan[1]/num")];
|
||||
var TMPYActive = props.globals.getNode("/FMGC/internal/tmpy-active");
|
||||
var TMPYActive_out = props.globals.initNode("/MCDUC/tmpy-active", 0, "BOOL");
|
||||
|
||||
var updateFPLN = func(i) {
|
||||
if (r1_active_out.getBoolValue()) {
|
||||
|
||||
if (TMPYActive.getBoolValue()) {
|
||||
fp = 0;
|
||||
wpColor = "yel";
|
||||
} else {
|
||||
setprop("/MCDU[" ~ i ~ "]/F-PLN/left-1", discontinuity);
|
||||
setprop("/MCDU[" ~ i ~ "]/F-PLN/left-1s", "");
|
||||
setprop("/MCDU[" ~ i ~ "]/F-PLN/left-2", fpln_end);
|
||||
setprop("/MCDU[" ~ i ~ "]/F-PLN/left-2s", "");
|
||||
setprop("/MCDU[" ~ i ~ "]/F-PLN/left-3", no_altn_fpln_end);
|
||||
setprop("/MCDU[" ~ i ~ "]/F-PLN/left-3s", "");
|
||||
setprop("/MCDU[" ~ i ~ "]/F-PLN/left-4", "");
|
||||
setprop("/MCDU[" ~ i ~ "]/F-PLN/left-4s", "");
|
||||
setprop("/MCDU[" ~ i ~ "]/F-PLN/left-5", "");
|
||||
setprop("/MCDU[" ~ i ~ "]/F-PLN/left-5s", "");
|
||||
setprop("/MCDU[" ~ i ~ "]/F-PLN/left-6", "");
|
||||
setprop("/MCDU[" ~ i ~ "]/F-PLN/left-6s", "");
|
||||
setprop("/MCDU[" ~ i ~ "]/F-PLN/line-1c", "wht");
|
||||
setprop("/MCDU[" ~ i ~ "]/F-PLN/line-2c", "wht");
|
||||
setprop("/MCDU[" ~ i ~ "]/F-PLN/line-3c", "wht");
|
||||
setprop("/MCDU[" ~ i ~ "]/F-PLN/line-4c", "wht");
|
||||
setprop("/MCDU[" ~ i ~ "]/F-PLN/line-5c", "wht");
|
||||
setprop("/MCDU[" ~ i ~ "]/F-PLN/line-6c", "wht");
|
||||
fp = 1;
|
||||
wpColor = "grn";
|
||||
}
|
||||
|
||||
num = num_out[fp].getValue();
|
||||
|
||||
if (active_out[1].getBoolValue()) {
|
||||
# Line 1:
|
||||
if (offset[i] < num) {
|
||||
left1[i].setValue(fmgc.wpID[fp][offset[i]].getValue());
|
||||
if (offset[i] == fmgc.arrivalAirportI[fp]) {
|
||||
left1s[i].setValue("DEST");
|
||||
line1c[i].setValue("wht");
|
||||
} else {
|
||||
left1s[i].setValue("C" ~ math.round(fmgc.wpCoursePrev[fp][offset[i]].getValue()) ~ "g");
|
||||
line1c[i].setValue(wpColor);
|
||||
}
|
||||
} else if (offset[i] == num) {
|
||||
left1[i].setValue(fpln_end);
|
||||
left1s[i].setValue("");
|
||||
line1c[i].setValue("wht");
|
||||
} else if (offset[i] == num + 1) {
|
||||
left1[i].setValue(no_altn_fpln_end);
|
||||
left1s[i].setValue("");
|
||||
line1c[i].setValue("wht");
|
||||
} else {
|
||||
left1[i].setValue("");
|
||||
}
|
||||
|
||||
# Line 2:
|
||||
if (offset[i] + 1 < num) {
|
||||
left2[i].setValue(fmgc.wpID[fp][offset[i] + 1].getValue());
|
||||
if (offset[i] + 1 == fmgc.arrivalAirportI[fp]) {
|
||||
left2s[i].setValue("DEST");
|
||||
line2c[i].setValue("wht");
|
||||
} else {
|
||||
left2s[i].setValue("C" ~ math.round(fmgc.wpCoursePrev[fp][offset[i] + 1].getValue()) ~ "g");
|
||||
line2c[i].setValue(wpColor);
|
||||
}
|
||||
} else if (offset[i] + 1 == num) {
|
||||
left2[i].setValue(fpln_end);
|
||||
left2s[i].setValue("");
|
||||
line2c[i].setValue("wht");
|
||||
} else if (offset[i] + 1 == num + 1) {
|
||||
left2[i].setValue(no_altn_fpln_end);
|
||||
left2s[i].setValue("");
|
||||
line2c[i].setValue("wht");
|
||||
} else {
|
||||
left2[i].setValue("");
|
||||
}
|
||||
|
||||
# Line 3:
|
||||
if (offset[i] + 2 < num) {
|
||||
left3[i].setValue(fmgc.wpID[fp][offset[i] + 2].getValue());
|
||||
if (offset[i] + 2 == fmgc.arrivalAirportI[fp]) {
|
||||
left3s[i].setValue("DEST");
|
||||
line3c[i].setValue("wht");
|
||||
} else {
|
||||
left3s[i].setValue("C" ~ math.round(fmgc.wpCoursePrev[fp][offset[i] + 2].getValue()) ~ "g");
|
||||
line3c[i].setValue(wpColor);
|
||||
}
|
||||
} else if (offset[i] + 2 == num) {
|
||||
left3[i].setValue(fpln_end);
|
||||
left3s[i].setValue("");
|
||||
line3c[i].setValue("wht");
|
||||
} else if (offset[i] + 2 == num + 1) {
|
||||
left3[i].setValue(no_altn_fpln_end);
|
||||
left3s[i].setValue("");
|
||||
line3c[i].setValue("wht");
|
||||
} else {
|
||||
left3[i].setValue("");
|
||||
}
|
||||
|
||||
# Line 4:
|
||||
if (offset[i] + 3 < num) {
|
||||
left4[i].setValue(fmgc.wpID[fp][offset[i] + 3].getValue());
|
||||
if (offset[i] + 3 == fmgc.arrivalAirportI[fp]) {
|
||||
left4s[i].setValue("DEST");
|
||||
line4c[i].setValue("wht");
|
||||
} else {
|
||||
left4s[i].setValue("C" ~ math.round(fmgc.wpCoursePrev[fp][offset[i] + 3].getValue()) ~ "g");
|
||||
line4c[i].setValue(wpColor);
|
||||
}
|
||||
} else if (offset[i] + 3 == num) {
|
||||
left4[i].setValue(fpln_end);
|
||||
left4s[i].setValue("");
|
||||
line4c[i].setValue("wht");
|
||||
} else if (offset[i] + 3 == num + 1) {
|
||||
left4[i].setValue(no_altn_fpln_end);
|
||||
left4s[i].setValue("");
|
||||
line4c[i].setValue("wht");
|
||||
} else {
|
||||
left4[i].setValue("");
|
||||
}
|
||||
|
||||
# Line 5:
|
||||
if (offset[i] + 4 < num) {
|
||||
left5[i].setValue(fmgc.wpID[fp][offset[i] + 4].getValue());
|
||||
if (offset[i] + 4 == fmgc.arrivalAirportI[fp]) {
|
||||
left5s[i].setValue("DEST");
|
||||
line5c[i].setValue("wht");
|
||||
} else {
|
||||
left5s[i].setValue("C" ~ math.round(fmgc.wpCoursePrev[fp][offset[i] + 4].getValue()) ~ "g");
|
||||
line5c[i].setValue(wpColor);
|
||||
}
|
||||
} else if (offset[i] + 4 == num) {
|
||||
left5[i].setValue(fpln_end);
|
||||
left5s[i].setValue("");
|
||||
line5c[i].setValue("wht");
|
||||
} else if (offset[i] + 4 == num + 1) {
|
||||
left5[i].setValue(no_altn_fpln_end);
|
||||
left5s[i].setValue("");
|
||||
line5c[i].setValue("wht");
|
||||
} else {
|
||||
left5[i].setValue("");
|
||||
}
|
||||
|
||||
# Line 6:
|
||||
if (fp != 0) {
|
||||
if (offset[i] + 5 < num) {
|
||||
left6[i].setValue(fmgc.wpID[fp][offset[i] + 5].getValue());
|
||||
if (offset[i] + 5 == fmgc.arrivalAirportI[fp]) {
|
||||
left6s[i].setValue("DEST");
|
||||
line6c[i].setValue("wht");
|
||||
} else {
|
||||
left6s[i].setValue("C" ~ math.round(fmgc.wpCoursePrev[fp][offset[i] + 5].getValue()) ~ "g");
|
||||
line6c[i].setValue(wpColor);
|
||||
}
|
||||
} else if (offset[i] + 5 == num) {
|
||||
left6[i].setValue(fpln_end);
|
||||
left6s[i].setValue("");
|
||||
line6c[i].setValue("wht");
|
||||
} else if (offset[i] + 5 == num + 1) {
|
||||
left6[i].setValue(no_altn_fpln_end);
|
||||
left6s[i].setValue("");
|
||||
line6c[i].setValue("wht");
|
||||
} else {
|
||||
left6[i].setValue("");
|
||||
}
|
||||
} else {
|
||||
left6[i].setValue("");
|
||||
left6s[i].setValue("");
|
||||
}
|
||||
|
||||
if (offset[i] > 0) {
|
||||
showFromInd[i].setBoolValue(0);
|
||||
} else {
|
||||
showFromInd[i].setBoolValue(1);
|
||||
}
|
||||
|
||||
TMPYActive_out.setBoolValue(TMPYActive.getBoolValue()); # Only engage MCDU TMPY mode once the nessesary flightplan changes have been made.
|
||||
} else {
|
||||
left1[i].setValue(fpln_end);
|
||||
left1s[i].setValue("");
|
||||
left2[i].setValue(no_altn_fpln_end);
|
||||
left2s[i].setValue("");
|
||||
left3[i].setValue("");
|
||||
left3s[i].setValue("");
|
||||
left4[i].setValue("");
|
||||
left4s[i].setValue("");
|
||||
left5[i].setValue("");
|
||||
left5s[i].setValue("");
|
||||
left6[i].setValue("");
|
||||
left6s[i].setValue("");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ var courseDistanceFrom = nil;
|
|||
var courseDistanceFromPrev = nil;
|
||||
var sizeWP = nil;
|
||||
var magTrueError = 0;
|
||||
var arrivalAirportI = 0;
|
||||
var arrivalAirportI = [0, 0];
|
||||
|
||||
# Vars for MultiFlightplan
|
||||
var currentWP = [nil, 0];
|
||||
|
@ -32,14 +32,14 @@ var currentLeg_out = [nil, props.globals.initNode("/FMGC/flightplan[1]/current-l
|
|||
var currentLegCourse_out = [nil, props.globals.initNode("/FMGC/flightplan[1]/current-leg-course", 0, "DOUBLE")];
|
||||
var currentLegDist_out = [nil, props.globals.initNode("/FMGC/flightplan[1]/current-leg-dist", 0, "DOUBLE")];
|
||||
var currentLegCourseMag_out = [nil, props.globals.initNode("/FMGC/flightplan[1]/current-leg-course-mag", 0, "DOUBLE")];
|
||||
var arrivalLegDist_out = [nil, props.globals.initNode("/FMGC/flightplan[1]/arrival-leg-dist", 0, "DOUBLE")];
|
||||
var arrivalLegDist_out = [props.globals.initNode("/FMGC/flightplan[0]/arrival-leg-dist", 0, "DOUBLE"), props.globals.initNode("/FMGC/flightplan[1]/arrival-leg-dist", 0, "DOUBLE")];
|
||||
var num_out = [props.globals.initNode("/FMGC/flightplan[0]/num", 0, "INT"), props.globals.initNode("/FMGC/flightplan[1]/num", 0, "INT")];
|
||||
var toFromSet = props.globals.initNode("/FMGC/internal/tofrom-set", 0, "BOOL");
|
||||
var magHDG = props.globals.getNode("/orientation/heading-magnetic-deg", 1);
|
||||
var trueHDG = props.globals.getNode("/orientation/heading-deg", 1);
|
||||
var FMGCdep = props.globals.getNode("/FMGC/internal/dep-arpt", 1);
|
||||
var FMGCarr = props.globals.getNode("/FMGC/internal/arr-arpt", 1);
|
||||
var TMPYactive = props.globals.initNode("/FMGC/internal/tmpy-active", 0, "BOOL");
|
||||
var TMPYActive = props.globals.initNode("/FMGC/internal/tmpy-active", 0, "BOOL");
|
||||
|
||||
# Create props.nas for flightplan
|
||||
# Vectors inside vectors, so we can use as many flightplans or waypoints as we want
|
||||
|
@ -53,7 +53,7 @@ var wpDistancePrev = [[props.globals.initNode("/FMGC/flightplan[0]/wp[0]/distanc
|
|||
|
||||
var flightplan = {
|
||||
reset: func() {
|
||||
TMPYactive.setBoolValue(0);
|
||||
TMPYActive.setBoolValue(0);
|
||||
me.reset0();
|
||||
me.reset1();
|
||||
},
|
||||
|
@ -72,12 +72,12 @@ var flightplan = {
|
|||
initTempFP: func(n) {
|
||||
fp[0] = fp[n].clone();
|
||||
me.checkWPOutputs(0);
|
||||
TMPYactive.setBoolValue(1);
|
||||
TMPYActive.setBoolValue(1);
|
||||
},
|
||||
executeTempFP: func(n) {
|
||||
fp[n] = fp[0].clone();
|
||||
me.checkWPOutputs(n);
|
||||
TMPYactive.setBoolValue(0);
|
||||
TMPYActive.setBoolValue(0);
|
||||
me.reset0();
|
||||
},
|
||||
updateARPT: func(dep, arr, n) {
|
||||
|
@ -140,7 +140,7 @@ var flightplan = {
|
|||
geoPos = geo.aircraft_position();
|
||||
|
||||
for (var n = 0; n < 2; n += 1) { # Note: Some things don't get done for TMPY (0) hence all the if (n != 0) {}
|
||||
if (((n == 0 and TMPYactive.getBoolValue()) or n > 0) and toFromSet.getBoolValue() and fp[n].departure != nil and fp[n].destination != nil) {
|
||||
if (((n == 0 and TMPYActive.getBoolValue()) or n > 0) and toFromSet.getBoolValue() and fp[n].departure != nil and fp[n].destination != nil) {
|
||||
if (n != 0) {
|
||||
if (currentWP[n] > fp[n].getPlanSize()) {
|
||||
currentWP[n] = fp[n].getPlanSize();
|
||||
|
@ -186,16 +186,12 @@ var flightplan = {
|
|||
wpDistancePrev[n][i].setValue(courseDistanceFrom[1]);
|
||||
}
|
||||
|
||||
if (n != 0) {
|
||||
if (wpID[n][i].getValue() == FMGCarr.getValue()) {
|
||||
arrivalAirportI = i;
|
||||
}
|
||||
if (wpID[n][i].getValue() == FMGCarr.getValue()) {
|
||||
arrivalAirportI[n] = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (n != 0) {
|
||||
arrivalLegDist_out[n].setValue(wpDistance[n][arrivalAirportI].getValue());
|
||||
}
|
||||
arrivalLegDist_out[n].setValue(wpDistance[n][arrivalAirportI[n]].getValue());
|
||||
} else {
|
||||
if (n != 0) {
|
||||
if (active_out[n].getBoolValue() != 0) {
|
||||
|
|
Reference in a new issue