A3XX: Improve APU
This commit is contained in:
parent
745c6f9e81
commit
1c60b820b1
3 changed files with 120 additions and 22 deletions
|
@ -11,6 +11,7 @@ var lowerECAM_eng = nil;
|
||||||
var lowerECAM_fctl = nil;
|
var lowerECAM_fctl = nil;
|
||||||
var lowerECAM_display = nil;
|
var lowerECAM_display = nil;
|
||||||
var page = "eng";
|
var page = "eng";
|
||||||
|
var oat = getprop("/environment/temperature-degc");
|
||||||
setprop("/systems/electrical/extra/apu-load", 0);
|
setprop("/systems/electrical/extra/apu-load", 0);
|
||||||
setprop("/systems/electrical/extra/apu-volts", 0);
|
setprop("/systems/electrical/extra/apu-volts", 0);
|
||||||
setprop("/systems/electrical/extra/apu-hz", 0);
|
setprop("/systems/electrical/extra/apu-hz", 0);
|
||||||
|
@ -115,11 +116,13 @@ var canvas_lowerECAM_apu = {
|
||||||
return m;
|
return m;
|
||||||
},
|
},
|
||||||
getKeys: func() {
|
getKeys: func() {
|
||||||
return ["APUN-needle","APUEGT-needle","APUN","APUEGT","APUAvail","APUFlapOpen","APUBleedValve","APUBleedOnline","APUGenLoad","APUGenVolt","APUGenHz","APUBleedPSI","GW","TAT","SAT"];
|
return ["APUN-needle","APUEGT-needle","APUN","APUEGT","APUAvail","APUFlapOpen","APUBleedValve","APUBleedOnline","APUGenOnline","APUGentext","APUGenLoad","APUGenbox","APUGenVolt","APUGenHz","APUBleedPSI","APUfuelLO","GW","TAT","SAT","text3724","text3728","text3732"];
|
||||||
},
|
},
|
||||||
update: func() {
|
update: func() {
|
||||||
|
oat = getprop("/environment/temperature-degc");
|
||||||
|
|
||||||
# Avail and Flap Open
|
# Avail and Flap Open
|
||||||
if (getprop("/systems/apu/rpm") > 3.5 and getprop("/controls/APU/master") == 1) {
|
if (getprop("/systems/apu/flap") == 1) {
|
||||||
me["APUFlapOpen"].show();
|
me["APUFlapOpen"].show();
|
||||||
} else {
|
} else {
|
||||||
me["APUFlapOpen"].hide();
|
me["APUFlapOpen"].hide();
|
||||||
|
@ -131,6 +134,12 @@ var canvas_lowerECAM_apu = {
|
||||||
me["APUAvail"].hide();
|
me["APUAvail"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getprop("/fdm/jsbsim/propulsion/tank[2]/contents-lbs") < 100) {
|
||||||
|
me["APUfuelLO"].show();
|
||||||
|
} else {
|
||||||
|
me["APUfuelLO"].hide();
|
||||||
|
}
|
||||||
|
|
||||||
# APU Gen
|
# APU Gen
|
||||||
if (getprop("/systems/electrical/extra/apu-volts") > 110) {
|
if (getprop("/systems/electrical/extra/apu-volts") > 110) {
|
||||||
me["APUGenVolt"].setColor(0,1,0);
|
me["APUGenVolt"].setColor(0,1,0);
|
||||||
|
@ -144,12 +153,42 @@ var canvas_lowerECAM_apu = {
|
||||||
me["APUGenHz"].setColor(1,0.6,0);
|
me["APUGenHz"].setColor(1,0.6,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getprop("/controls/APU/master") == 1 or getprop("/systems/apu/rpm") >= 94.9) {
|
||||||
|
me["APUGenbox"].show();
|
||||||
|
me["APUGenHz"].show();
|
||||||
|
me["APUGenVolt"].show();
|
||||||
|
me["APUGenLoad"].show();
|
||||||
|
me["text3724"].show();
|
||||||
|
me["text3728"].show();
|
||||||
|
me["text3732"].show();
|
||||||
|
} else {
|
||||||
|
me["APUGenbox"].hide();
|
||||||
|
me["APUGenHz"].hide();
|
||||||
|
me["APUGenVolt"].hide();
|
||||||
|
me["APUGenLoad"].hide();
|
||||||
|
me["text3724"].hide();
|
||||||
|
me["text3728"].hide();
|
||||||
|
me["text3732"].hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((getprop("/systems/apu/rpm") > 94.9) and (getprop("/controls/electrical/switches/gen-apu") == 1)) {
|
||||||
|
me["APUGenOnline"].show();
|
||||||
|
} else {
|
||||||
|
me["APUGenOnline"].hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((getprop("/controls/APU/master") == 0) or ((getprop("/controls/APU/master") == 1) and (getprop("/controls/electrical/switches/gen-apu") == 1) and (getprop("/systems/apu/rpm") > 94.9))) {
|
||||||
|
me["APUGentext"].setColor(1,1,1);
|
||||||
|
} else if ((getprop("/controls/APU/master") == 1) and (getprop("/controls/electrical/switches/gen-apu") == 0) and (getprop("/systems/apu/rpm") < 94.9)) {
|
||||||
|
me["APUGentext"].setColor(1,0.6,0);
|
||||||
|
}
|
||||||
|
|
||||||
me["APUGenLoad"].setText(sprintf("%s", math.round(getprop("/systems/electrical/extra/apu-load"))));
|
me["APUGenLoad"].setText(sprintf("%s", math.round(getprop("/systems/electrical/extra/apu-load"))));
|
||||||
me["APUGenVolt"].setText(sprintf("%s", math.round(getprop("/systems/electrical/extra/apu-volts"))));
|
me["APUGenVolt"].setText(sprintf("%s", math.round(getprop("/systems/electrical/extra/apu-volts"))));
|
||||||
me["APUGenHz"].setText(sprintf("%s", math.round(getprop("/systems/electrical/extra/apu-hz"))));
|
me["APUGenHz"].setText(sprintf("%s", math.round(getprop("/systems/electrical/extra/apu-hz"))));
|
||||||
|
|
||||||
# APU Bleed
|
# APU Bleed
|
||||||
if (getprop("/systems/apu/rpm") >= 94.9) {
|
if (getprop("/controls/adirs/ir[1]/knob") != 1 and (getprop("/controls/APU/master") == 1 or getprop("/systems/pneumatic/bleedapu") > 0)) {
|
||||||
me["APUBleedPSI"].setColor(0,1,0);
|
me["APUBleedPSI"].setColor(0,1,0);
|
||||||
me["APUBleedPSI"].setText(sprintf("%s", math.round(getprop("/systems/pneumatic/bleedapu"))));
|
me["APUBleedPSI"].setText(sprintf("%s", math.round(getprop("/systems/pneumatic/bleedapu"))));
|
||||||
} else {
|
} else {
|
||||||
|
@ -157,7 +196,7 @@ var canvas_lowerECAM_apu = {
|
||||||
me["APUBleedPSI"].setText(sprintf("%s", "XX"));
|
me["APUBleedPSI"].setText(sprintf("%s", "XX"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/pneumatic/bleedapu") > 0 and getprop("/controls/pneumatic/switches/bleedapu") == 1) {
|
if (getprop("/controls/pneumatic/switches/bleedapu") == 1) {
|
||||||
me["APUBleedValve"].setRotation(90*D2R);
|
me["APUBleedValve"].setRotation(90*D2R);
|
||||||
me["APUBleedOnline"].show();
|
me["APUBleedOnline"].show();
|
||||||
} else {
|
} else {
|
||||||
|
@ -166,8 +205,22 @@ var canvas_lowerECAM_apu = {
|
||||||
}
|
}
|
||||||
|
|
||||||
# APU N and EGT
|
# APU N and EGT
|
||||||
|
if (getprop("/controls/APU/master") == 1) {
|
||||||
|
me["APUN"].setColor(0,1,0);
|
||||||
me["APUN"].setText(sprintf("%s", math.round(getprop("/systems/apu/rpm"))));
|
me["APUN"].setText(sprintf("%s", math.round(getprop("/systems/apu/rpm"))));
|
||||||
|
me["APUEGT"].setColor(0,1,0);
|
||||||
me["APUEGT"].setText(sprintf("%s", math.round(getprop("/systems/apu/egt"))));
|
me["APUEGT"].setText(sprintf("%s", math.round(getprop("/systems/apu/egt"))));
|
||||||
|
} else if (getprop("/systems/apu/rpm") >= 1) {
|
||||||
|
me["APUN"].setColor(0,1,0);
|
||||||
|
me["APUN"].setText(sprintf("%s", math.round(getprop("/systems/apu/rpm"))));
|
||||||
|
me["APUEGT"].setColor(0,1,0);
|
||||||
|
me["APUEGT"].setText(sprintf("%s", math.round(getprop("/systems/apu/egt"))));
|
||||||
|
} else {
|
||||||
|
me["APUN"].setColor(1,0.6,0);
|
||||||
|
me["APUN"].setText(sprintf("%s", "XX"));
|
||||||
|
me["APUEGT"].setColor(1,0.6,0);
|
||||||
|
me["APUEGT"].setText(sprintf("%s", "XX"));
|
||||||
|
}
|
||||||
me["APUN-needle"].setRotation((getprop("/ECAM/Lower/APU-N") + 90)*D2R);
|
me["APUN-needle"].setRotation((getprop("/ECAM/Lower/APU-N") + 90)*D2R);
|
||||||
me["APUEGT-needle"].setRotation((getprop("/ECAM/Lower/APU-EGT") + 90)*D2R);
|
me["APUEGT-needle"].setRotation((getprop("/ECAM/Lower/APU-EGT") + 90)*D2R);
|
||||||
|
|
||||||
|
|
|
@ -37,14 +37,14 @@
|
||||||
guidetolerance="10"
|
guidetolerance="10"
|
||||||
inkscape:pageopacity="1"
|
inkscape:pageopacity="1"
|
||||||
inkscape:pageshadow="2"
|
inkscape:pageshadow="2"
|
||||||
inkscape:window-width="1920"
|
inkscape:window-width="1366"
|
||||||
inkscape:window-height="1030"
|
inkscape:window-height="706"
|
||||||
id="namedview371"
|
id="namedview371"
|
||||||
showgrid="true"
|
showgrid="true"
|
||||||
inkscape:zoom="0.5"
|
inkscape:zoom="0.94"
|
||||||
inkscape:cx="840.634"
|
inkscape:cx="-75.451106"
|
||||||
inkscape:cy="837.30899"
|
inkscape:cy="1080.5167"
|
||||||
inkscape:window-x="1592"
|
inkscape:window-x="-8"
|
||||||
inkscape:window-y="-8"
|
inkscape:window-y="-8"
|
||||||
inkscape:window-maximized="1"
|
inkscape:window-maximized="1"
|
||||||
inkscape:current-layer="svg2">
|
inkscape:current-layer="svg2">
|
||||||
|
@ -78,8 +78,9 @@
|
||||||
style="font-style:normal;font-weight:normal;font-size:34px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
style="font-style:normal;font-weight:normal;font-size:34px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
x="196.37218"
|
x="196.37218"
|
||||||
y="164.61017"
|
y="164.61017"
|
||||||
id="text3720"
|
id="APUGentext"
|
||||||
sodipodi:linespacing="125%"><tspan
|
sodipodi:linespacing="125%"
|
||||||
|
inkscape:label="#text3720"><tspan
|
||||||
sodipodi:role="line"
|
sodipodi:role="line"
|
||||||
id="tspan3722"
|
id="tspan3722"
|
||||||
x="196.37218"
|
x="196.37218"
|
||||||
|
@ -414,7 +415,8 @@
|
||||||
style="fill:#515256;fill-opacity:1" />
|
style="fill:#515256;fill-opacity:1" />
|
||||||
</g>
|
</g>
|
||||||
<g
|
<g
|
||||||
id="g3460">
|
id="APUGenbox"
|
||||||
|
inkscape:label="#g3460">
|
||||||
<rect
|
<rect
|
||||||
y="123.87109"
|
y="123.87109"
|
||||||
x="99.823715"
|
x="99.823715"
|
||||||
|
@ -713,4 +715,47 @@
|
||||||
x="830.58368"
|
x="830.58368"
|
||||||
y="312.50412"
|
y="312.50412"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;font-family:Arial;-inkscape-font-specification:Arial;text-align:end;text-anchor:end;fill:#00ff00">34</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;font-family:Arial;-inkscape-font-specification:Arial;text-align:end;text-anchor:end;fill:#00ff00">34</tspan></text>
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-weight:normal;font-size:32px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
x="579.20001"
|
||||||
|
y="537.60004"
|
||||||
|
id="APUfuelLO"
|
||||||
|
sodipodi:linespacing="125%"
|
||||||
|
inkscape:label="#text4237"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan4239"
|
||||||
|
x="579.20001"
|
||||||
|
y="537.60004"
|
||||||
|
style="font-size:48px;fill:#ff9900;fill-opacity:1">FUEL LO PR</tspan></text>
|
||||||
|
<g
|
||||||
|
inkscape:label="#g3441"
|
||||||
|
id="APUGenOnline"
|
||||||
|
transform="translate(-651.2,-22.4)">
|
||||||
|
<rect
|
||||||
|
y="123.27498"
|
||||||
|
x="841.24066"
|
||||||
|
height="21.920309"
|
||||||
|
width="5.3955846"
|
||||||
|
id="rect4241"
|
||||||
|
style="fill:#00ff00;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
sodipodi:type="star"
|
||||||
|
style="fill:none;fill-opacity:1;stroke:#00ff00;stroke-width:4.69756889;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="path4243"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
sodipodi:cx="788.80811"
|
||||||
|
sodipodi:cy="109.92132"
|
||||||
|
sodipodi:r1="14.398978"
|
||||||
|
sodipodi:r2="7.1544757"
|
||||||
|
sodipodi:arg1="2.6191108"
|
||||||
|
sodipodi:arg2="3.6663083"
|
||||||
|
inkscape:flatsided="true"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
d="m 776.33019,117.10687 12.494,-21.584521 12.44575,21.612381 z"
|
||||||
|
inkscape:transform-center-x="-0.045894102"
|
||||||
|
inkscape:transform-center-y="-3.4535777"
|
||||||
|
transform="matrix(1.0702291,0,0,0.97557219,-0.2069507,6.7326558)" />
|
||||||
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 36 KiB |
|
@ -23,9 +23,9 @@ var n2_max = 102.1;
|
||||||
var egt_max = 712;
|
var egt_max = 712;
|
||||||
var n1_wm = 0;
|
var n1_wm = 0;
|
||||||
var n2_wm = 0;
|
var n2_wm = 0;
|
||||||
var apu_max = 99.2;
|
var apu_max = 100;
|
||||||
var apu_egt_min = 496;
|
var apu_egt_min = 352;
|
||||||
var apu_egt_max = 643;
|
var apu_egt_max = 704;
|
||||||
var spinup_time = 49;
|
var spinup_time = 49;
|
||||||
var start_time = 10;
|
var start_time = 10;
|
||||||
var egt_lightup_time = 2;
|
var egt_lightup_time = 2;
|
||||||
|
@ -311,9 +311,9 @@ var apu_egt_check = func {
|
||||||
}
|
}
|
||||||
|
|
||||||
var apu_egt2_check = func {
|
var apu_egt2_check = func {
|
||||||
if (getprop("/systems/apu/egt") >= 643) {
|
if (getprop("/systems/apu/egt") >= 701) {
|
||||||
apu_egt2_checkt.stop();
|
apu_egt2_checkt.stop();
|
||||||
interpolate("/systems/apu/egt", apu_egt_min, 20);
|
interpolate("/systems/apu/egt", apu_egt_min, 30);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -332,7 +332,7 @@ setlistener("/controls/APU/master", func {
|
||||||
|
|
||||||
var apu_stop = func {
|
var apu_stop = func {
|
||||||
interpolate("/systems/apu/rpm", 0, 30);
|
interpolate("/systems/apu/rpm", 0, 30);
|
||||||
interpolate("/systems/apu/egt", 42, 30);
|
interpolate("/systems/apu/egt", 42, 40);
|
||||||
}
|
}
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
|
|
Reference in a new issue