1
0
Fork 0

Duct temperatures

This commit is contained in:
legoboyvdlp R 2020-06-20 17:08:56 +01:00
parent 09e83023ce
commit 3cf9fcc6ba
4 changed files with 138 additions and 5 deletions

View file

@ -1003,6 +1003,9 @@
</packs>
<temperatures>
<cabin-overall-temp-kelvin type="double">297</cabin-overall-temp-kelvin>
<cockpit-duct type="double">0</cockpit-duct>
<cabin-aft-duct type="double">0</cabin-aft-duct>
<cabin-fwd-duct type="double">0</cabin-fwd-duct>
</temperatures>
<valves>
<flow-control-valve-1 type="double">0</flow-control-valve-1>

View file

@ -1082,7 +1082,7 @@ var canvas_lowerECAM_cond = {
},
getKeys: func() {
return ["TAT","SAT","GW","UTCh","UTCm","GW-weight-unit","CargoCond","CONDHotAirValve","CONDFanFwdFault","CONDFanAftFault",
"CONDTrimValveCKPT","CONDTrimValveAFT","CONDTrimValveFWD"];
"CONDTrimValveCKPT","CONDTrimValveAFT","CONDTrimValveFWD","CONDDuctTempCKPT","CONDDuctTempAFT","CONDDuctTempFWD","CONDTempCKPT","CONDTempAFT","CONDTempFWD"];
},
update: func() {
if (systems.PNEU.Valves.hotAir.getValue() == 0) {
@ -1105,6 +1105,10 @@ var canvas_lowerECAM_cond = {
me["CONDTrimValveAFT"].setRotation(systems.PNEU.Packs.trimAft.getValue() * D2R);
me["CONDTrimValveFWD"].setRotation(systems.PNEU.Packs.trimFwd.getValue() * D2R);
me["CONDDuctTempCKPT"].setText(sprintf("%2.0f",math.round(systems.PNEU.Packs.cockpitDuctTemp.getValue())));
me["CONDDuctTempAFT"].setText(sprintf("%2.0f",math.round(systems.PNEU.Packs.cabinAftDuctTemp.getValue())));
me["CONDDuctTempFWD"].setText(sprintf("%2.0f",math.round(systems.PNEU.Packs.cabinFwdDuctTemp.getValue())));
# fans faults not implemented
me["CONDFanFwdFault"].hide();
me["CONDFanAftFault"].hide();

View file

@ -55,6 +55,9 @@ var PNEU = {
trimCockpit: props.globals.getNode("/ECAM/Lower/trim-cockpit-output"),
trimAft: props.globals.getNode("/ECAM/Lower/trim-aft-output"),
trimFwd: props.globals.getNode("/ECAM/Lower/trim-fwd-output"),
cockpitDuctTemp: props.globals.getNode("/systems/air-conditioning/temperatures/cockpit-duct"),
cabinAftDuctTemp: props.globals.getNode("/systems/air-conditioning/temperatures/cabin-aft-duct"),
cabinFwdDuctTemp: props.globals.getNode("/systems/air-conditioning/temperatures/cabin-fwd-duct"),
},
Psi: {
engine1: props.globals.getNode("/systems/pneumatics/psi/engine-1-psi"),

View file

@ -309,6 +309,33 @@
</function>
</fcs_function>
<fcs_function name="/systems/air-conditioning/packs/demand-temp/cockpit-duct-cmd">
<function>
<ifthen>
<eq>
<property>/controls/pneumatics/switches/hot-air</property>
<value>0</value>
</eq>
<min>
<property>/systems/air-conditioning/packs/demand-temp/cockpit</property>
<property>/systems/air-conditioning/packs/demand-temp/cabin-aft</property>
<property>/systems/air-conditioning/packs/demand-temp/cabin-fwd</property>
</min>
<property>/systems/air-conditioning/packs/demand-temp/cockpit</property>
</ifthen>
</function>
</fcs_function>
<actuator name="/systems/air-conditioning/temperatures/cockpit-duct">
<input>/systems/air-conditioning/packs/demand-temp/cockpit-duct-cmd</input>
<rate_limit>/systems/air-conditioning/valves/trim-power-cockpit</rate_limit>
</actuator>
<lag_filter name="/systems/air-conditioning/temperatures/cockpit-temp">
<input>/systems/air-conditioning/packs/demand-temp/cockpit</input>
<c1>0.01</c1>
</lag_filter>
<fcs_function name="/systems/air-conditioning/packs/demand-temp/cabin-aft">
<function>
<table>
@ -322,6 +349,46 @@
</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.0 18
0.5 24
1.0 30
</tableData>
</table>
</function>
</fcs_function>
<fcs_function name="/systems/air-conditioning/packs/demand-temp/cabin-aft-duct-cmd">
<function>
<ifthen>
<eq>
<property>/controls/pneumatics/switches/hot-air</property>
<value>0</value>
</eq>
<min>
<property>/systems/air-conditioning/packs/demand-temp/cockpit</property>
<property>/systems/air-conditioning/packs/demand-temp/cabin-aft</property>
<property>/systems/air-conditioning/packs/demand-temp/cabin-fwd</property>
</min>
<property>/systems/air-conditioning/packs/demand-temp/cabin-aft</property>
</ifthen>
</function>
</fcs_function>
<actuator name="/systems/air-conditioning/temperatures/cabin-aft-duct">
<input>/systems/air-conditioning/packs/demand-temp/cabin-aft-duct-cmd</input>
<rate_limit>/systems/air-conditioning/valves/trim-power-cabin-aft</rate_limit>
</actuator>
<lag_filter name="/systems/air-conditioning/temperatures/cabin-aft-temp">
<input>/systems/air-conditioning/packs/demand-temp/cabin-aft</input>
<c1>0.01</c1>
</lag_filter>
<fcs_function name="/systems/air-conditioning/packs/demand-temp/cabin-fwd">
<function>
<table>
@ -335,6 +402,33 @@
</function>
</fcs_function>
<fcs_function name="/systems/air-conditioning/packs/demand-temp/cabin-fwd-duct-cmd">
<function>
<ifthen>
<eq>
<property>/controls/pneumatics/switches/hot-air</property>
<value>0</value>
</eq>
<min>
<property>/systems/air-conditioning/packs/demand-temp/cockpit</property>
<property>/systems/air-conditioning/packs/demand-temp/cabin-aft</property>
<property>/systems/air-conditioning/packs/demand-temp/cabin-fwd</property>
</min>
<property>/systems/air-conditioning/packs/demand-temp/cabin-fwd</property>
</ifthen>
</function>
</fcs_function>
<actuator name="/systems/air-conditioning/temperatures/cabin-fwd-duct">
<input>/systems/air-conditioning/packs/demand-temp/cabin-fwd-duct-cmd</input>
<rate_limit>/systems/air-conditioning/valves/trim-power-cabin-fwd</rate_limit>
</actuator>
<lag_filter name="/systems/air-conditioning/temperatures/cabin-fwd-temp">
<input>/systems/air-conditioning/packs/demand-temp/cabin-fwd</input>
<c1>0.01</c1>
</lag_filter>
<switch name="/systems/air-conditioning/valves/ram-air-cmd">
<default value="0"/>
<test logic="AND" value="1">
@ -457,8 +551,37 @@
<rate_limit>/systems/air-conditioning/valves/hot-air-power</rate_limit>
</actuator>
<switch name="/systems/air-conditioning/valves/trim-power">
<switch name="/systems/air-conditioning/valves/trim-power-cockpit">
<default value="0"/>
<test logic="AND" value="0">
/systems/failures/pneumatics/trim-valve-cockpit eq 1
</test>
<test logic="OR" value="0.5"> <!-- ?? unsure about power src, use pack controllers -->
/systems/electrical/bus/ac-1 ge 110
/systems/electrical/bus/ac-2 ge 110
/systems/electrical/bus/dc-1 ge 25
/systems/electrical/bus/dc-2 ge 25
</test>
</switch>
<switch name="/systems/air-conditioning/valves/trim-power-cabin-fwd">
<default value="0"/>
<test logic="AND" value="0">
/systems/failures/pneumatics/trim-valve-cabin-fwd eq 1
</test>
<test logic="OR" value="0.5"> <!-- ?? unsure about power src, use pack controllers -->
/systems/electrical/bus/ac-1 ge 110
/systems/electrical/bus/ac-2 ge 110
/systems/electrical/bus/dc-1 ge 25
/systems/electrical/bus/dc-2 ge 25
</test>
</switch>
<switch name="/systems/air-conditioning/valves/trim-power-cabin-aft">
<default value="0"/>
<test logic="AND" value="0">
/systems/failures/pneumatics/trim-valve-cabin-aft eq 1
</test>
<test logic="OR" value="0.5"> <!-- ?? unsure about power src, use pack controllers -->
/systems/electrical/bus/ac-1 ge 110
/systems/electrical/bus/ac-2 ge 110
@ -569,7 +692,7 @@
<actuator name="/systems/air-conditioning/valves/trim-cockpit">
<input>/systems/air-conditioning/valves/trim-cockpit-cmd</input>
<rate_limit>/systems/air-conditioning/valves/trim-power</rate_limit>
<rate_limit>/systems/air-conditioning/valves/trim-power-cockpit</rate_limit>
</actuator>
<switch name="/systems/air-conditioning/valves/trim-aft-cmd">
@ -581,7 +704,7 @@
<actuator name="/systems/air-conditioning/valves/trim-aft">
<input>/systems/air-conditioning/valves/trim-aft-cmd</input>
<rate_limit>/systems/air-conditioning/valves/trim-power</rate_limit>
<rate_limit>/systems/air-conditioning/valves/trim-power-cabin-aft</rate_limit>
</actuator>
<switch name="/systems/air-conditioning/valves/trim-fwd-cmd">
@ -593,7 +716,7 @@
<actuator name="/systems/air-conditioning/valves/trim-fwd">
<input>/systems/air-conditioning/valves/trim-fwd-cmd</input>
<rate_limit>/systems/air-conditioning/valves/trim-power</rate_limit>
<rate_limit>/systems/air-conditioning/valves/trim-power-cabin-fwd</rate_limit>
</actuator>
</channel>