1
0
Fork 0

Add emergency ram air valve

This commit is contained in:
legoboyvdlp R 2020-06-03 19:20:10 +01:00
parent ecf434666d
commit 569a4811d5
6 changed files with 118 additions and 18 deletions

View file

@ -1010,6 +1010,7 @@
<valves>
<flow-control-valve-1 type="double">0</flow-control-valve-1>
<flow-control-valve-2 type="double">0</flow-control-valve-2>
<ram-air type="double">0</ram-air>
</valves>
<warnings>
<pack-1-disagree type="bool">0</pack-1-disagree>

View file

@ -734,7 +734,8 @@ var canvas_lowerECAM_bleed = {
"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"];
"BLEED-xbleedLeft","BLEED-xbleedCenter","BLEED-xbleedRight","BLEED-cond-1","BLEED-cond-2","BLEED-cond-3","BLEED-Ram-Air-connection",
"BLEED-Ram-Air"];
},
update: func() {
# X BLEED
@ -1030,6 +1031,45 @@ var canvas_lowerECAM_bleed = {
me["BLEED-Pack-2-Flow-Valve"].setColor(0.7333,0.3803,0);
}
# Ram Air
if (systems.PNEU.Valves.ramAir.getValue() == 0) {
me["BLEED-Ram-Air"].setRotation(90 * D2R);
me["BLEED-Ram-Air"].setColor(0.0509,0.7529,0.2941);
me["BLEED-Ram-Air"].setColorFill(0.0509,0.7529,0.2941);
me["BLEED-Ram-Air-connection"].hide();
} elsif (systems.PNEU.Valves.ramAir.getValue() == 1) {
me["BLEED-Ram-Air"].setRotation(0);
if (pts.Gear.wow[1].getValue()) {
me["BLEED-Ram-Air"].setColor(0.7333,0.3803,0);
me["BLEED-Ram-Air"].setColorFill(0.7333,0.3803,0);
} else {
me["BLEED-Ram-Air"].setColor(0.0509,0.7529,0.2941);
me["BLEED-Ram-Air"].setColorFill(0.0509,0.7529,0.2941);
}
me["BLEED-Ram-Air-connection"].show();
} else {
me["BLEED-Ram-Air"].setRotation(45 * D2R);
me["BLEED-Ram-Air"].setColor(0.7333,0.3803,0);
me["BLEED-Ram-Air"].setColorFill(0.7333,0.3803,0);
me["BLEED-Ram-Air-connection"].show();
}
# Triangles
if (systems.PNEU.Valves.pack1.getValue() == 0 and systems.PNEU.Valves.pack2.getValue() == 0) {
if (pts.Gear.wow[1].getValue() or systems.PNEU.Valves.ramAir.getValue() != 1) {
me["BLEED-cond-1"].setColor(0.7333,0.3803,0);
me["BLEED-cond-2"].setColor(0.7333,0.3803,0);
me["BLEED-cond-3"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-cond-1"].setColor(0.0509,0.7529,0.2941);
me["BLEED-cond-2"].setColor(0.0509,0.7529,0.2941);
me["BLEED-cond-3"].setColor(0.0509,0.7529,0.2941);
}
} else {
me["BLEED-cond-1"].setColor(0.0509,0.7529,0.2941);
me["BLEED-cond-2"].setColor(0.0509,0.7529,0.2941);
me["BLEED-cond-3"].setColor(0.0509,0.7529,0.2941);
}
me.updateBottomStatus();
},
};

View file

@ -3899,7 +3899,7 @@
<repeatable>false</repeatable>
<binding>
<command>property-adjust</command>
<property>controls/pneumatic/switches/cockpit-temp</property>
<property>controls/pneumatics/switches/temp-cockpit</property>
<step>0.1</step>
<min>0</min>
<max>1</max>
@ -3911,7 +3911,7 @@
<repeatable>false</repeatable>
<binding>
<command>property-adjust</command>
<property>controls/pneumatic/switches/cockpit-temp</property>
<property>controls/pneumatics/switches/temp-cockpit</property>
<step>-0.1</step>
<min>0</min>
<max>1</max>
@ -3922,7 +3922,7 @@
<name>Cockpit Temp rotate</name>
<type>rotate</type>
<object-name>CockpitACKnb</object-name>
<property>controls/pneumatic/switches/cockpit-temp</property>
<property>controls/pneumatics/switches/temp-cockpit</property>
<interpolation>
<entry><ind>0</ind><dep> 135</dep></entry>
<entry><ind>1</ind><dep>-135</dep></entry>
@ -3949,7 +3949,7 @@
<repeatable>false</repeatable>
<binding>
<command>property-adjust</command>
<property>controls/pneumatic/switches/fwd-temp</property>
<property>controls/pneumatics/switches/temp-cabin-fwd</property>
<step>0.1</step>
<min>0</min>
<max>1</max>
@ -3961,7 +3961,7 @@
<repeatable>false</repeatable>
<binding>
<command>property-adjust</command>
<property>controls/pneumatic/switches/fwd-temp</property>
<property>controls/pneumatics/switches/temp-cabin-fwd</property>
<step>-0.1</step>
<min>0</min>
<max>1</max>
@ -3972,7 +3972,7 @@
<name>FWD Temp rotate</name>
<type>rotate</type>
<object-name>FwdCabinACKnb</object-name>
<property>controls/pneumatic/switches/fwd-temp</property>
<property>controls/pneumatics/switches/temp-cabin-fwd</property>
<interpolation>
<entry><ind>0</ind><dep> 135</dep></entry>
<entry><ind>1</ind><dep>-135</dep></entry>
@ -3999,7 +3999,7 @@
<repeatable>false</repeatable>
<binding>
<command>property-adjust</command>
<property>controls/pneumatic/switches/aft-temp</property>
<property>controls/pneumatics/switches/temp-cabin-aft</property>
<step>0.1</step>
<min>0</min>
<max>1</max>
@ -4011,7 +4011,7 @@
<repeatable>false</repeatable>
<binding>
<command>property-adjust</command>
<property>controls/pneumatic/switches/aft-temp</property>
<property>controls/pneumatics/switches/temp-cabin-aft</property>
<step>-0.1</step>
<min>0</min>
<max>1</max>
@ -4022,7 +4022,7 @@
<name>AFT Temp rotate</name>
<type>rotate</type>
<object-name>AftCabinACKnb</object-name>
<property>controls/pneumatic/switches/aft-temp</property>
<property>controls/pneumatics/switches/temp-cabin-aft</property>
<interpolation>
<entry><ind>0</ind><dep> 135</dep></entry>
<entry><ind>1</ind><dep>-135</dep></entry>
@ -4398,7 +4398,7 @@
</greater-than-equals>
</condition>
<command>property-toggle</command>
<property>controls/pneumatic/switches/hot-air</property>
<property>controls/pneumatics/switches/hot-air</property>
</binding>
<binding>
<command>nasal</command>
@ -4418,7 +4418,7 @@
<value>1</value>
</equals>
<equals>
<property>controls/pneumatic/switches/hot-air</property>
<property>controls/pneumatics/switches/hot-air</property>
<value>1</value>
</equals>
</and>
@ -4436,7 +4436,7 @@
<condition>
<or>
<equals>
<property>controls/pneumatic/switches/hot-air</property>
<property>controls/pneumatics/switches/hot-air</property>
<value>0</value>
</equals>
<equals>
@ -4539,7 +4539,7 @@
</and>
</condition>
<command>property-toggle</command>
<property>controls/pneumatic/switches/ram-air</property>
<property>controls/pneumatics/switches/ram-air</property>
</binding>
<binding>
<condition>
@ -4601,7 +4601,7 @@
<condition>
<or>
<equals>
<property>controls/pneumatic/switches/ram-air</property>
<property>controls/pneumatics/switches/ram-air</property>
<value>1</value>
</equals>
<equals>

View file

@ -112,7 +112,7 @@ var start_one_check = func {
}
var start_one_check_b = func {
if (getprop("/controls/engines/engine-start-switch") == 2 and systems.PNEU.Psi.engine1.getValue() and !getprop("/controls/engines/engine[0]/cutoff-switch")) { {
if (getprop("/controls/engines/engine-start-switch") == 2 and systems.PNEU.Psi.engine1.getValue() and !getprop("/controls/engines/engine[0]/cutoff-switch")) {
auto_start_one();
}
}
@ -195,7 +195,7 @@ var start_two_check = func {
}
var start_two_check_b = func {
if (getprop("/controls/engines/engine-start-switch") == 2 and systems.PNEU.Psi.engine2.getValue() >= 25 and !getprop("/controls/engines/engine[1]/cutoff-switch")) { {
if (getprop("/controls/engines/engine-start-switch") == 2 and systems.PNEU.Psi.engine2.getValue() >= 25 and !getprop("/controls/engines/engine[1]/cutoff-switch")) {
auto_start_two();
}
}

View file

@ -89,11 +89,12 @@ var PNEU = {
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"),
ramAir: props.globals.getNode("/systems/air-conditioning/valves/ram-air"),
},
init: func() {
me.resetFail();
# Legacy shit
# Legacy pressurization system
setprop("/systems/pressurization/mode", "GN");
setprop("/systems/pressurization/vs", "0");
setprop("/systems/pressurization/targetvs", "0");

View file

@ -268,6 +268,64 @@
<c1>0.8</c1>
</lag_filter>
<fcs_function name="/systems/air-conditioning/packs/demand-temp/cockpit">
<function>
<table>
<independentVar lookup="row">/controls/pneumatics/switches/temp-cockpit</independentVar>
<tableData>
0 18
0.5 24
1 30
</tableData>
</table>
</function>
</fcs_function>
<fcs_function name="/systems/air-conditioning/packs/demand-temp/cabin-aft">
<function>
<table>
<independentVar lookup="row">/controls/pneumatics/switches/temp-cabin-aft</independentVar>
<tableData>
0 18
0.5 24
1 30
</tableData>
</table>
</function>
</fcs_function>
<fcs_function name="/systems/air-conditioning/packs/demand-temp/cabin-fwd">
<function>
<table>
<independentVar lookup="row">/controls/pneumatics/switches/temp-cabin-fwd</independentVar>
<tableData>
0 18
0.5 24
1 30
</tableData>
</table>
</function>
</fcs_function>
<switch name="/systems/air-conditioning/valves/ram-air-cmd">
<default value="0"/>
<test logic="AND" value="1">
/controls/pneumatics/switches/ram-air eq 1
/systems/pressurization/ditchingpb eq 0
</test>
</switch>
<switch name="/systems/air-conditioning/valves/ram-air-power">
<default value="0"/>
<test logic="AND" value="0.5">
/systems/electrical/bus/dc-ess-shed ge 25
</test>
</switch>
<actuator name="/systems/air-conditioning/valves/ram-air">
<input>/systems/air-conditioning/valves/ram-air-cmd</input>
<rate_limit>/systems/air-conditioning/valves/ram-air-power</rate_limit>
</actuator>
</channel>
<channel name="Recirculation">