Pack flow valves shown properly on the bleed page
This commit is contained in:
parent
0c90776852
commit
f85886d395
4 changed files with 55 additions and 12 deletions
|
@ -963,14 +963,13 @@ var canvas_lowerECAM_bleed = {
|
||||||
me["BLEED-Pack-1-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941);
|
me["BLEED-Pack-1-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941);
|
||||||
}
|
}
|
||||||
|
|
||||||
var flow_pos = systems.PNEU.Packs.packFlow1.getValue() - 50; # `-50` cause the middel position from where we move the needle is at 50
|
var flow_pos = systems.PNEU.Packs.packFlow1.getValue() * D2R;
|
||||||
flow_pos = flow_pos * D2R;
|
|
||||||
me["BLEED-Pack-1-Packflow-needle"].setRotation(flow_pos);
|
me["BLEED-Pack-1-Packflow-needle"].setRotation(flow_pos);
|
||||||
|
|
||||||
if (systems.PNEU.Valves.pack1.getValue() == 0) {
|
if (systems.PNEU.Valves.pack1.getValue() == 0) {
|
||||||
me["BLEED-Pack-1-Packflow-needle"].setColor(0.7333,0.3803,0);
|
me["BLEED-Pack-1-Packflow-needle"].setColorFill(0.7333,0.3803,0);
|
||||||
} else {
|
} else {
|
||||||
me["BLEED-Pack-1-Packflow-needle"].setColor(0.0509,0.7529,0.2941);
|
me["BLEED-Pack-1-Packflow-needle"].setColorFill(0.0509,0.7529,0.2941);
|
||||||
}
|
}
|
||||||
|
|
||||||
var pack_state = systems.PNEU.Valves.pack1.getValue();
|
var pack_state = systems.PNEU.Valves.pack1.getValue();
|
||||||
|
@ -1006,14 +1005,13 @@ var canvas_lowerECAM_bleed = {
|
||||||
me["BLEED-Pack-2-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941);
|
me["BLEED-Pack-2-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941);
|
||||||
}
|
}
|
||||||
|
|
||||||
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 = systems.PNEU.Packs.packFlow2.getValue() * D2R;
|
||||||
flow_pos = flow_pos * D2R;
|
|
||||||
me["BLEED-Pack-2-Packflow-needle"].setRotation(flow_pos);
|
me["BLEED-Pack-2-Packflow-needle"].setRotation(flow_pos);
|
||||||
|
|
||||||
if (systems.PNEU.Valves.pack2.getValue() == 0) {
|
if (systems.PNEU.Valves.pack2.getValue() == 0) {
|
||||||
me["BLEED-Pack-2-Packflow-needle"].setColor(0.7333,0.3803,0);
|
me["BLEED-Pack-2-Packflow-needle"].setColorFill(0.7333,0.3803,0);
|
||||||
} else {
|
} else {
|
||||||
me["BLEED-Pack-2-Packflow-needle"].setColor(0.0509,0.7529,0.2941);
|
me["BLEED-Pack-2-Packflow-needle"].setColorFill(0.0509,0.7529,0.2941);
|
||||||
}
|
}
|
||||||
|
|
||||||
var pack_state = systems.PNEU.Valves.pack2.getValue();
|
var pack_state = systems.PNEU.Valves.pack2.getValue();
|
||||||
|
|
|
@ -46,8 +46,8 @@ var PNEU = {
|
||||||
xbleed: props.globals.getNode("/systems/failures/pneumatics/x-bleed-valve"),
|
xbleed: props.globals.getNode("/systems/failures/pneumatics/x-bleed-valve"),
|
||||||
},
|
},
|
||||||
Packs: {
|
Packs: {
|
||||||
packFlow1: props.globals.getNode("/systems/air-conditioning/packs/pack-flow-1"),
|
packFlow1: props.globals.getNode("/ECAM/Lower/pack-1-flow-output"),
|
||||||
packFlow2: props.globals.getNode("/systems/air-conditioning/packs/pack-flow-2"),
|
packFlow2: props.globals.getNode("/ECAM/Lower/pack-2-flow-output"),
|
||||||
pack1OutTemp: props.globals.getNode("/systems/air-conditioning/packs/pack-1-output-temp"),
|
pack1OutTemp: props.globals.getNode("/systems/air-conditioning/packs/pack-1-output-temp"),
|
||||||
pack2OutTemp: props.globals.getNode("/systems/air-conditioning/packs/pack-2-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"),
|
pack1OutletTemp: props.globals.getNode("/systems/air-conditioning/packs/pack-1-outlet-temp"),
|
||||||
|
|
|
@ -116,7 +116,7 @@
|
||||||
</test>
|
</test>
|
||||||
</switch>
|
</switch>
|
||||||
|
|
||||||
<fcs_function name="/systems/air-conditioning/packs/pack-flow-1">
|
<fcs_function name="/systems/air-conditioning/packs/pack-flow-1-calc">
|
||||||
<function>
|
<function>
|
||||||
<product>
|
<product>
|
||||||
<property>/systems/air-conditioning/valves/flow-control-valve-1</property>
|
<property>/systems/air-conditioning/valves/flow-control-valve-1</property>
|
||||||
|
@ -125,7 +125,12 @@
|
||||||
</function>
|
</function>
|
||||||
</fcs_function>
|
</fcs_function>
|
||||||
|
|
||||||
<fcs_function name="/systems/air-conditioning/packs/pack-flow-2">
|
<lag_filter name="/systems/air-conditioning/packs/pack-flow-1">
|
||||||
|
<input>/systems/air-conditioning/packs/pack-flow-1-calc</input>
|
||||||
|
<c1>5</c1>
|
||||||
|
</lag_filter>
|
||||||
|
|
||||||
|
<fcs_function name="/systems/air-conditioning/packs/pack-flow-2-calc">
|
||||||
<function>
|
<function>
|
||||||
<product>
|
<product>
|
||||||
<property>/systems/air-conditioning/valves/flow-control-valve-2</property>
|
<property>/systems/air-conditioning/valves/flow-control-valve-2</property>
|
||||||
|
@ -133,6 +138,11 @@
|
||||||
</product>
|
</product>
|
||||||
</function>
|
</function>
|
||||||
</fcs_function>
|
</fcs_function>
|
||||||
|
|
||||||
|
<lag_filter name="/systems/air-conditioning/packs/pack-flow-2">
|
||||||
|
<input>/systems/air-conditioning/packs/pack-flow-2-calc</input>
|
||||||
|
<c1>5</c1>
|
||||||
|
</lag_filter>
|
||||||
|
|
||||||
<switch name="/systems/air-conditioning/packs/pack-factor">
|
<switch name="/systems/air-conditioning/packs/pack-factor">
|
||||||
<default value="0"/>
|
<default value="0"/>
|
||||||
|
|
|
@ -182,5 +182,40 @@
|
||||||
<input>/fdm/jsbsim/hydraulics/elevator-trim/final-deg</input>
|
<input>/fdm/jsbsim/hydraulics/elevator-trim/final-deg</input>
|
||||||
<output>/ECAM/Lower/elevator-trim-deg</output>
|
<output>/ECAM/Lower/elevator-trim-deg</output>
|
||||||
</filter>
|
</filter>
|
||||||
|
|
||||||
|
<filter>
|
||||||
|
<name>Pack 1 Flow Output</name>
|
||||||
|
<type>gain</type>
|
||||||
|
<gain>1.0</gain>
|
||||||
|
<input>
|
||||||
|
<expression>
|
||||||
|
<table>
|
||||||
|
<property>/systems/air-conditioning/packs/pack-flow-1</property>
|
||||||
|
<entry><ind>0.8</ind><dep>-80</dep></entry>
|
||||||
|
<entry><ind>1.0</ind><dep> 0</dep></entry>
|
||||||
|
<entry><ind>1.2</ind><dep> 80</dep></entry>
|
||||||
|
</table>
|
||||||
|
</expression>
|
||||||
|
</input>
|
||||||
|
<output>/ECAM/Lower/pack-1-flow-output</output>
|
||||||
|
</filter>
|
||||||
|
|
||||||
|
|
||||||
|
<filter>
|
||||||
|
<name>Pack 1 Flow Output</name>
|
||||||
|
<type>gain</type>
|
||||||
|
<gain>1.0</gain>
|
||||||
|
<input>
|
||||||
|
<expression>
|
||||||
|
<table>
|
||||||
|
<property>/systems/air-conditioning/packs/pack-flow-2</property>
|
||||||
|
<entry><ind>0.8</ind><dep>-80</dep></entry>
|
||||||
|
<entry><ind>1.0</ind><dep> 0</dep></entry>
|
||||||
|
<entry><ind>1.2</ind><dep> 80</dep></entry>
|
||||||
|
</table>
|
||||||
|
</expression>
|
||||||
|
</input>
|
||||||
|
<output>/ECAM/Lower/pack-2-flow-output</output>
|
||||||
|
</filter>
|
||||||
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
Loading…
Reference in a new issue