1
0
Fork 0

Packs: add output temperature. Correct bleed page errors.

This commit is contained in:
legoboyvdlp R 2020-05-13 20:58:44 +01:00
parent f0f19e0ad0
commit ee81d65ff2
6 changed files with 143 additions and 63 deletions

View file

@ -953,6 +953,14 @@
<autoconfig-running>0</autoconfig-running>
</acconfig>
<air-conditioning>
<packs>
<pack-1-output-temp type="double">0</pack-1-output-temp>
<pack-2-output-temp type="double">0</pack-2-output-temp>
<pack-1-outlet-temp type="double">0</pack-1-outlet-temp>
<pack-2-outlet-temp type="double">0</pack-2-outlet-temp>
<pack-flow-1 type="double">0</pack-flow-1>
<pack-flow-2 type="double">0</pack-flow-2>
</packs>
<temperatures>
<cabin-overall-temp-kelvin type="double">297</cabin-overall-temp-kelvin>
</temperatures>
@ -1173,10 +1181,6 @@
<bmc1-working type="bool">0</bmc1-working>
<bmc2-working type="bool">0</bmc2-working>
</indicating>
<pack-1-out-temp type="double">0</pack-1-out-temp>
<pack-2-out-temp type="double">0</pack-2-out-temp>
<pack-1-comp-out-temp type="double">0</pack-1-comp-out-temp>
<pack-2-comp-out-temp type="double">0</pack-2-comp-out-temp>
<pack-1-bypass type="bool">0</pack-1-bypass>
<pack-2-bypass type="bool">0</pack-2-bypass>
<pack-1-flow type="double">0</pack-1-flow>

View file

@ -106,18 +106,8 @@ var gs_kt = props.globals.getNode("/velocities/groundspeed-kt", 1);
var switch_wing_aice = props.globals.getNode("/controls/ice-protection/wing", 1);
var eng1_n2_actual = props.globals.getNode("/engines/engine[0]/n2-actual", 1);
var eng2_n2_actual = props.globals.getNode("/engines/engine[1]/n2-actual", 1);
var pack1_out_temp = props.globals.getNode("/systems/pneumatics/pack-1-out-temp", 1);
var pack2_out_temp = props.globals.getNode("/systems/pneumatics/pack-2-out-temp", 1);
var pack1_comp_out_temp = props.globals.getNode("/systems/pneumatics/pack-1-comp-out-temp", 1);
var pack2_comp_out_temp = props.globals.getNode("/systems/pneumatics/pack-2-comp-out-temp", 1);
var pack1_bypass = props.globals.getNode("/systems/pneumatics/pack-1-bypass", 1);
var pack2_bypass = props.globals.getNode("/systems/pneumatics/pack-2-bypass", 1);
var pack1_flow = props.globals.getNode("/systems/pneumatics/pack-1-flow", 1);
var pack2_flow = props.globals.getNode("/systems/pneumatics/pack-2-flow", 1);
var pack1_valve = props.globals.getNode("/systems/air-conditioning/valves/flow-control-valve-1", 1);
var pack2_valve = props.globals.getNode("/systems/air-conditioning/valves/flow-control-valve-2", 1);
var switch_pack1 = props.globals.getNode("/controls/pneumatics/switches/pack-1", 1);
var switch_pack2 = props.globals.getNode("/controls/pneumatics/switches/pack-2", 1);
var oil_qt1_actual = props.globals.getNode("/engines/engine[0]/oil-qt-actual", 1);
var oil_qt2_actual = props.globals.getNode("/engines/engine[1]/oil-qt-actual", 1);
var fuel_used_lbs1 = props.globals.getNode("/systems/fuel/fuel-used-1", 1);
@ -742,8 +732,8 @@ var canvas_lowerECAM_bleed = {
"BLEED-APU-LINES","BLEED-ENG-1", "BLEED-HP-Valve-2", "BLEED-ENG-2", "BLEED-Precooler-1-Inlet-Press", "BLEED-Precooler-1-Outlet-Temp",
"BLEED-Precooler-2-Inlet-Press", "BLEED-Precooler-2-Outlet-Temp", "BLEED-ENG-1-label", "BLEED-ENG-2-label",
"BLEED-GND", "BLEED-Pack-1-Flow-Valve", "BLEED-Pack-2-Flow-Valve", "BLEED-Pack-1-Out-Temp","BLEED-APU-connectionTop",
"BLEED-Pack-1-Comp-Out-Temp", "BLEED-Pack-1-Packflow-needel", "BLEED-Pack-1-Bypass-needel", "BLEED-Pack-2-Out-Temp",
"BLEED-Pack-2-Bypass-needel", "BLEED-Pack-2-Comp-Out-Temp", "BLEED-Pack-2-Packflow-needel", "BLEED-Anti-Ice-Left",
"BLEED-Pack-1-Comp-Out-Temp", "BLEED-Pack-1-Packflow-needle", "BLEED-Pack-1-Bypass-needle", "BLEED-Pack-2-Out-Temp",
"BLEED-Pack-2-Bypass-needle", "BLEED-Pack-2-Comp-Out-Temp", "BLEED-Pack-2-Packflow-needle", "BLEED-Anti-Ice-Left",
"BLEED-Anti-Ice-Right", "BLEED-HP-2-connection", "BLEED-HP-1-connection", "BLEED-ANTI-ICE-ARROW-LEFT", "BLEED-ANTI-ICE-ARROW-RIGHT",
"BLEED-xbleedLeft","BLEED-xbleedCenter","BLEED-xbleedRight"];
},
@ -899,7 +889,7 @@ var canvas_lowerECAM_bleed = {
if (bmc1working.getValue()) {
var precooler_temp = precooler1_temp.getValue();
me["BLEED-Precooler-1-Outlet-Temp"].setText(sprintf("%s", math.round(precooler_temp, 5)));
if (eng_valve1_state.getValue() == 1 and (precooler_temp < 150 or precooler1_ovht.getValue())) {
if (eng_valve1_cmd.getValue() == 1 and (precooler_temp < 150 or precooler1_ovht.getValue())) {
me["BLEED-Precooler-1-Outlet-Temp"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-Precooler-1-Outlet-Temp"].setColor(0.0509,0.7529,0.2941);
@ -913,7 +903,7 @@ var canvas_lowerECAM_bleed = {
if (bmc2working.getValue()) {
var precooler_temp = precooler2_temp.getValue();
me["BLEED-Precooler-2-Outlet-Temp"].setText(sprintf("%s", math.round(precooler_temp, 5)));
if (eng_valve2_state.getValue() == 1 and (precooler_temp < 150 or precooler2_ovht.getValue())) {
if (eng_valve2_cmd.getValue() == 1 and (precooler_temp < 150 or precooler2_ovht.getValue())) {
me["BLEED-Precooler-2-Outlet-Temp"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-Precooler-2-Outlet-Temp"].setColor(0.0509,0.7529,0.2941);
@ -954,92 +944,86 @@ var canvas_lowerECAM_bleed = {
}
# PACK 1 -----------------------------------------
me["BLEED-Pack-1-Out-Temp"].setText(sprintf("%s", pack1_out_temp.getValue()));
me["BLEED-Pack-1-Comp-Out-Temp"].setText(sprintf("%s", pack1_comp_out_temp.getValue()));
me["BLEED-Pack-1-Out-Temp"].setText(sprintf("%s", math.round(systems.PNEU.Packs.pack1OutTemp.getValue(), 5)));
me["BLEED-Pack-1-Comp-Out-Temp"].setText(sprintf("%s", math.round(systems.PNEU.Packs.pack1OutletTemp.getValue(), 5)));
if (pack1_out_temp.getValue() > 90) {
if (systems.PNEU.Packs.pack1OutTemp.getValue() > 90) {
me["BLEED-Pack-1-Out-Temp"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-Pack-1-Out-Temp"].setColor(0.0509,0.7529,0.2941);
}
var bypass_pos = pack1_bypass.getValue() - 50; # `-50` cause the middel position from where we move the needel is at 50
var bypass_pos = pack1_bypass.getValue() - 50; # `-50` cause the middel position from where we move the needle is at 50
bypass_pos = bypass_pos * D2R;
me["BLEED-Pack-1-Bypass-needel"].setRotation(bypass_pos);
me["BLEED-Pack-1-Bypass-needle"].setRotation(bypass_pos);
if (pack1_comp_out_temp.getValue() > 230) {
if (systems.PNEU.Packs.pack1OutletTemp.getValue() > 230) {
me["BLEED-Pack-1-Comp-Out-Temp"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-Pack-1-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941);
}
var flow_pos = pack1_flow.getValue() - 50; # `-50` cause the middel position from where we move the needel is at 50
var flow_pos = systems.PNEU.Packs.packFlow1.getValue() - 50; # `-50` cause the middel position from where we move the needle is at 50
flow_pos = flow_pos * D2R;
me["BLEED-Pack-1-Packflow-needel"].setRotation(flow_pos);
me["BLEED-Pack-1-Packflow-needle"].setRotation(flow_pos);
if (pack1_valve.getValue() == 0) {
me["BLEED-Pack-1-Packflow-needel"].setColor(0.7333,0.3803,0);
if (systems.PNEU.Valves.pack1.getValue() == 0) {
me["BLEED-Pack-1-Packflow-needle"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-Pack-1-Packflow-needel"].setColor(0.0509,0.7529,0.2941);
me["BLEED-Pack-1-Packflow-needle"].setColor(0.0509,0.7529,0.2941);
}
if (pack1_valve.getValue() == 1) {
var pack_state = systems.PNEU.Valves.pack1.getValue();
if (pack_state == 1) {
me["BLEED-Pack-1-Flow-Valve"].setRotation(0);
} else {
me["BLEED-Pack-1-Flow-Valve"].setRotation(90 * D2R);
}
var pack_state = pack1_valve.getValue();
if (pack_state == 1) {
me["BLEED-Pack-1-Flow-Valve"].setRotation(0);
} else {
me["BLEED-Pack-2-Flow-Valve"].setRotation(90 * D2R);
}
if (pack_state == switch_pack1.getValue()) {
if (pack_state == systems.PNEU.Switch.pack1.getValue()) {
me["BLEED-Pack-1-Flow-Valve"].setColor(0.0509,0.7529,0.2941);
} else {
me["BLEED-Pack-1-Flow-Valve"].setColor(0.7333,0.3803,0);
}
# PACK 2 -----------------------------------------
me["BLEED-Pack-2-Out-Temp"].setText(sprintf("%s", pack2_out_temp.getValue()));
me["BLEED-Pack-2-Comp-Out-Temp"].setText(sprintf("%s", pack2_comp_out_temp.getValue()));
me["BLEED-Pack-2-Out-Temp"].setText(sprintf("%s", math.round(systems.PNEU.Packs.pack2OutTemp.getValue(), 5)));
me["BLEED-Pack-2-Comp-Out-Temp"].setText(sprintf("%s", math.round(systems.PNEU.Packs.pack2OutletTemp.getValue(), 5)));
if (pack2_out_temp.getValue() > 90) {
if (systems.PNEU.Packs.pack2OutTemp.getValue() > 90) {
me["BLEED-Pack-2-Out-Temp"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-Pack-2-Out-Temp"].setColor(0.0509,0.7529,0.2941);
}
var bypass_pos = pack2_bypass.getValue() - 50; # `-50` cause the middel position from where we move the needel is at 50
var bypass_pos = pack2_bypass.getValue() - 50; # `-50` cause the middel position from where we move the needle is at 50
bypass_pos = bypass_pos * D2R;
me["BLEED-Pack-2-Bypass-needel"].setRotation(bypass_pos);
me["BLEED-Pack-2-Bypass-needle"].setRotation(bypass_pos);
if (pack2_comp_out_temp.getValue() > 230) {
if (systems.PNEU.Packs.pack2OutletTemp.getValue() > 230) {
me["BLEED-Pack-2-Comp-Out-Temp"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-Pack-2-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941);
}
var flow_pos = pack2_flow.getValue() - 50; # `-50` cause the middel position from where we move the needel is at 50
var flow_pos = systems.PNEU.Packs.packFlow2.getValue() - 50; # `-50` cause the middel position from where we move the needle is at 50
flow_pos = flow_pos * D2R;
me["BLEED-Pack-2-Packflow-needel"].setRotation(flow_pos);
me["BLEED-Pack-2-Packflow-needle"].setRotation(flow_pos);
if (pack2_valve.getValue() == 0) {
me["BLEED-Pack-2-Packflow-needel"].setColor(0.7333,0.3803,0);
if (systems.PNEU.Valves.pack2.getValue() == 0) {
me["BLEED-Pack-2-Packflow-needle"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-Pack-2-Packflow-needel"].setColor(0.0509,0.7529,0.2941);
me["BLEED-Pack-2-Packflow-needle"].setColor(0.0509,0.7529,0.2941);
}
var pack_state = pack2_valve.getValue();
var pack_state = systems.PNEU.Valves.pack2.getValue();
if (pack_state == 1) {
me["BLEED-Pack-2-Flow-Valve"].setRotation(0);
} else {
me["BLEED-Pack-2-Flow-Valve"].setRotation(90 * D2R);
}
if (pack_state == switch_pack2.getValue()) {
if (pack_state == systems.PNEU.Switch.pack2.getValue()) {
me["BLEED-Pack-2-Flow-Valve"].setColor(0.0509,0.7529,0.2941);
} else {
me["BLEED-Pack-2-Flow-Valve"].setColor(0.7333,0.3803,0);

View file

@ -602,7 +602,7 @@
x="212.20123"
height="28.975597"
width="4.1129341"
id="BLEED-Pack-1-Packflow-needel"
id="BLEED-Pack-1-Packflow-needle"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.00380528;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:transform-center-x="-0.06117064"
inkscape:transform-center-y="-30.783886" />
@ -613,7 +613,7 @@
x="-218.12874"
height="32.696423"
width="4.1145287"
id="BLEED-Pack-1-Bypass-needel"
id="BLEED-Pack-1-Bypass-needle"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.0665164;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:transform-center-x="-0.13399155"
inkscape:transform-center-y="-28.056774" />
@ -805,7 +805,7 @@
x="209.9595"
height="31.200571"
width="4.1151652"
id="BLEED-Pack-2-Packflow-needel"
id="BLEED-Pack-2-Packflow-needle"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.04191506;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:transform-center-x="1.3492459"
inkscape:transform-center-y="-34.314208" />
@ -816,7 +816,7 @@
x="-213.51646"
height="32.714966"
width="4.1114964"
id="BLEED-Pack-2-Bypass-needel"
id="BLEED-Pack-2-Bypass-needle"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.06642556;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:transform-center-x="0.24542415"
inkscape:transform-center-y="-28.143827" />

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View file

@ -534,7 +534,7 @@
style="font-size:57.48457718px;line-height:1.25;fill:#0dbe4a;fill-opacity:1;stroke-width:1.43711448">-</tspan></text>
<rect
style="fill:#0dbe4a;fill-opacity:1;stroke:none;stroke-width:1.60198247;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="PRESS-Alt-needel"
id="PRESS-Alt-needle"
width="2.9978156"
height="101.25005"
x="353.5022"
@ -543,7 +543,7 @@
inkscape:label="#rect5105-6-0-7-4-5-6-7" />
<rect
style="fill:#0dbe4a;fill-opacity:1;stroke:none;stroke-width:1.60198259;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="PRESS-VS-needel"
id="PRESS-VS-needle"
width="2.9978156"
height="101.25005"
x="331.0022"
@ -559,7 +559,7 @@
inkscape:label="#APUN-scale" />
<rect
style="fill:#0dbe4a;fill-opacity:1;stroke:none;stroke-width:1.60198259;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="PRESS-deltaP-needel"
id="PRESS-deltaP-needle"
width="2.9978156"
height="101.25005"
x="352.75"
@ -849,7 +849,7 @@
y="861.18341"
transform="rotate(-67.5)" />
<g
id="PRESS-Inlet-Needel"
id="PRESS-Inlet-needle"
inkscape:label="#g5744">
<rect
transform="rotate(90)"
@ -868,7 +868,7 @@
</g>
<g
transform="matrix(-1,0,0,1,739.49999,-0.75002256)"
id="PRESS-Outlet-Needel"
id="PRESS-Outlet-needle"
inkscape:label="#g5744">
<rect
transform="rotate(90)"
@ -887,7 +887,7 @@
</g>
<g
transform="translate(455.99998,-24.145591)"
id="PRESS-Man-Needel"
id="PRESS-Man-needle"
inkscape:label="#g5744">
<rect
transform="rotate(90)"
@ -906,7 +906,7 @@
</g>
<g
transform="rotate(-90,502.87498,368.875)"
id="PRESS-Safety-Needel"
id="PRESS-Safety-needle"
inkscape:label="#g5744">
<rect
transform="rotate(90)"

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View file

@ -45,6 +45,14 @@ var PNEU = {
trimValveFwd: props.globals.getNode("/systems/failures/pneumatics/trim-valve-cabin-fwd"),
xbleed: props.globals.getNode("/systems/failures/pneumatics/x-bleed-valve"),
},
Packs: {
packFlow1: props.globals.getNode("/systems/air-conditioning/packs/pack-flow-1"),
packFlow2: props.globals.getNode("/systems/air-conditioning/packs/pack-flow-2"),
pack1OutTemp: props.globals.getNode("/systems/air-conditioning/packs/pack-1-output-temp"),
pack2OutTemp: props.globals.getNode("/systems/air-conditioning/packs/pack-2-output-temp"),
pack1OutletTemp: props.globals.getNode("/systems/air-conditioning/packs/pack-1-outlet-temp"),
pack2OutletTemp: props.globals.getNode("/systems/air-conditioning/packs/pack-2-outlet-temp"),
},
Psi: {
engine1: props.globals.getNode("/systems/pneumatics/psi/engine-1-psi"),
engine2: props.globals.getNode("/systems/pneumatics/psi/engine-2-psi"),
@ -79,6 +87,8 @@ var PNEU = {
crossbleed: props.globals.getNode("/systems/pneumatics/valves/crossbleed-valve"),
prv1: props.globals.getNode("/systems/pneumatics/valves/engine-1-prv-valve"),
prv2: props.globals.getNode("/systems/pneumatics/valves/engine-2-prv-valve"),
pack1: props.globals.getNode("/systems/air-conditioning/valves/flow-control-valve-1"),
pack2: props.globals.getNode("/systems/air-conditioning/valves/flow-control-valve-2"),
},
init: func() {
me.resetFail();

View file

@ -115,6 +115,24 @@
/systems/air-conditioning/packs/single-pack eq 1
</test>
</switch>
<fcs_function name="/systems/air-conditioning/packs/pack-flow-1">
<function>
<product>
<property>/systems/air-conditioning/valves/flow-control-valve-1</property>
<property>/systems/air-conditioning/packs/pack-flow</property>
</product>
</function>
</fcs_function>
<fcs_function name="/systems/air-conditioning/packs/pack-flow-2">
<function>
<product>
<property>/systems/air-conditioning/valves/flow-control-valve-2</property>
<property>/systems/air-conditioning/packs/pack-flow</property>
</product>
</function>
</fcs_function>
<switch name="/systems/air-conditioning/packs/pack-factor">
<default value="0"/>
@ -132,6 +150,70 @@
</test>
</switch>
<fcs_function name="/systems/air-conditioning/packs/pack-1-outlet-temp">
<function>
<product>
<value>0.6363636</value>
<property>/systems/air-conditioning/valves/flow-control-valve-1</property>
<property>/systems/pneumatics/precooler/temp-1</property>
</product>
</function>
</fcs_function>
<fcs_function name="/systems/air-conditioning/packs/pack-2-outlet-temp">
<function>
<product>
<value>0.6363636</value>
<property>/systems/air-conditioning/valves/flow-control-valve-2</property>
<property>/systems/pneumatics/precooler/temp-2</property>
</product>
</function>
</fcs_function>
<fcs_function name="/systems/air-conditioning/packs/pack-1-output-temp">
<function>
<sum>
<product>
<value>-1</value>
<sum>
<product>
<value>0.76</value>
<property>/systems/air-conditioning/packs/pack-1-outlet-temp</property>
</product>
<value>37.5</value>
</sum>
</product>
<property>/systems/air-conditioning/packs/pack-1-outlet-temp</property>
</sum>
</function>
</fcs_function>
<fcs_function name="/systems/air-conditioning/packs/pack-2-output-temp">
<function>
<sum>
<product>
<value>-1</value>
<sum>
<product>
<value>0.76</value>
<property>/systems/air-conditioning/packs/pack-2-outlet-temp</property>
</product>
<value>37.5</value>
</sum>
</product>
<property>/systems/air-conditioning/packs/pack-2-outlet-temp</property>
</sum>
</function>
</fcs_function>
</channel>
<channel name="Recirculation">
<switch name="/systems/air-conditioning/recirc/recirc-fans">
</switch>
</channel>
<channel name="Mass flow">