This repository has been archived on 2021-09-26. You can view files and clone it, but cannot push or open issues or pull requests.
IDG-A32X/Systems/a320-electrical.xml
2019-09-23 13:07:11 -04:00

848 lines
27 KiB
XML

<?xml version="1.0"?>
<!-- Copyright (c) 2019 Jonathan Redpath (legoboyvdlp) -->
<system name="A320: Electrical">
<channel name="Main Electrical" execrate="8">
<!-- Battery 1 -->
<fcs_function name="/systems/electrical/sources/bat-1/volt">
<function>
<table>
<independentVar lookup="row">/systems/electrical/sources/bat-1/percent</independentVar>
<independentVar lookup="column">/systems/failures/electrical/bat-1</independentVar>
<tableData>
0 1
0 0 0
10 24 4
100 31 7
</tableData>
</table>
</function>
</fcs_function>
<switch name="/systems/electrical/sources/bat-1/amp"> <!-- todo - should relate to load / charging -->
<default value="0"/>
<test logic="AND" value="2">
/controls/electrical/switches/bat-1 eq 1
/systems/electrical/sources/bat-1/volt ge 10
</test>
</switch>
<!-- Battery 2 -->
<fcs_function name="/systems/electrical/sources/bat-2/volt">
<function>
<table>
<independentVar lookup="row">/systems/electrical/sources/bat-2/percent</independentVar>
<independentVar lookup="column">/systems/failures/electrical/bat-2</independentVar>
<tableData>
0 1
0 0 0
10 24 4
100 31 7
</tableData>
</table>
</function>
</fcs_function>
<switch name="/systems/electrical/sources/bat-2/amp"> <!-- todo - should relate to load / charging -->
<default value="0"/>
<test logic="AND" value="2">
/controls/electrical/switches/bat-2 eq 1
/systems/electrical/sources/bat-2/volt ge 10
</test>
</switch>
<!-- IDG 1 -->
<pure_gain name="/systems/electrical/sources/idg-1/drive-rpm-input">
<input>/engines/engine[0]/n2-actual</input>
<gain>90.298</gain> <!-- 1% N2 RPM value * 0.604 -->
</pure_gain>
<pure_gain name="/systems/electrical/sources/idg-1/drive-rpm">
<input>/systems/electrical/sources/idg-1/drive-rpm-input</input>
<gain>/controls/electrical/switches/idg-1-disc</gain>
</pure_gain>
<fcs_function name="/systems/electrical/sources/idg-1/csd-gearbox-ratio-cmd">
<function>
<quotient>
<value>12000</value>
<property>/systems/electrical/sources/idg-1/drive-rpm</property>
</quotient>
</function>
<clipto>
<min>1.3</min>
<max>2.8</max>
</clipto>
</fcs_function>
<lag_filter name="/systems/electrical/sources/idg-1/csd-gearbox-ratio">
<input>/systems/electrical/sources/idg-1/csd-gearbox-ratio-cmd</input>
<c1>40</c1>
</lag_filter>
<pure_gain name="/systems/electrical/sources/idg-1/csd-rpm">
<input>/systems/electrical/sources/idg-1/drive-rpm</input>
<gain>/systems/electrical/sources/idg-1/csd-gearbox-ratio</gain>
</pure_gain>
<fcs_function name="/systems/electrical/sources/idg-1/pmg-volt">
<function>
<product>
<property>/systems/electrical/sources/idg-1/csd-rpm</property>
<quotient>
<value>115</value>
<value>12000</value>
</quotient>
</product>
</function>
</fcs_function>
<fcs_function name="/systems/electrical/sources/idg-1/pmg-hertz">
<function>
<quotient>
<product>
<property>/systems/electrical/sources/idg-1/csd-rpm</property>
<value>4</value> <!-- Number of poles in generator -->
</product>
<value>120</value>
</quotient>
</function>
</fcs_function>
<switch name="/systems/electrical/sources/idg-1/gcr-relay">
<default value="0"/>
<test logic="AND" value="1">
/controls/electrical/switches/gen-1 eq 1
/systems/failures/electrical/gen-1 ne 1
/systems/electrical/sources/idg-1/csd-rpm ge 11500
</test>
</switch>
<pure_gain name="/systems/electrical/sources/idg-1/output-volt">
<input>/systems/electrical/sources/idg-1/pmg-volt</input>
<gain>/systems/electrical/sources/idg-1/gcr-relay</gain>
</pure_gain>
<pure_gain name="/systems/electrical/sources/idg-1/output-hertz">
<input>/systems/electrical/sources/idg-1/pmg-hertz</input>
<gain>/systems/electrical/sources/idg-1/gcr-relay</gain>
</pure_gain>
<!-- IDG 2 -->
<pure_gain name="/systems/electrical/sources/idg-2/drive-rpm-input">
<input>/engines/engine[1]/n2-actual</input>
<gain>90.298</gain> <!-- 1% N2 RPM value * 0.604 -->
</pure_gain>
<pure_gain name="/systems/electrical/sources/idg-2/drive-rpm">
<input>/systems/electrical/sources/idg-2/drive-rpm-input</input>
<gain>/controls/electrical/switches/idg-1-disc</gain>
</pure_gain>
<fcs_function name="/systems/electrical/sources/idg-2/csd-gearbox-ratio-cmd">
<function>
<quotient>
<value>12000</value>
<property>/systems/electrical/sources/idg-2/drive-rpm</property>
</quotient>
</function>
<clipto>
<min>1.3</min>
<max>2.8</max>
</clipto>
</fcs_function>
<lag_filter name="/systems/electrical/sources/idg-2/csd-gearbox-ratio">
<input>/systems/electrical/sources/idg-2/csd-gearbox-ratio-cmd</input>
<c1>40</c1>
</lag_filter>
<pure_gain name="/systems/electrical/sources/idg-2/csd-rpm">
<input>/systems/electrical/sources/idg-2/drive-rpm</input>
<gain>/systems/electrical/sources/idg-2/csd-gearbox-ratio</gain>
</pure_gain>
<fcs_function name="/systems/electrical/sources/idg-2/pmg-volt">
<function>
<product>
<property>/systems/electrical/sources/idg-2/csd-rpm</property>
<quotient>
<value>115</value>
<value>12000</value>
</quotient>
</product>
</function>
</fcs_function>
<fcs_function name="/systems/electrical/sources/idg-2/pmg-hertz">
<function>
<quotient>
<product>
<property>/systems/electrical/sources/idg-2/csd-rpm</property>
<value>4</value> <!-- Number of poles in generator -->
</product>
<value>120</value>
</quotient>
</function>
</fcs_function>
<switch name="/systems/electrical/sources/idg-2/gcr-relay">
<default value="0"/>
<test logic="AND" value="1">
/controls/electrical/switches/gen-2 eq 1
/systems/failures/electrical/gen-2 ne 1
/systems/electrical/sources/idg-2/csd-rpm ge 11500
</test>
</switch>
<pure_gain name="/systems/electrical/sources/idg-2/output-volt">
<input>/systems/electrical/sources/idg-2/pmg-volt</input>
<gain>/systems/electrical/sources/idg-2/gcr-relay</gain>
</pure_gain>
<pure_gain name="/systems/electrical/sources/idg-2/output-hertz">
<input>/systems/electrical/sources/idg-2/pmg-hertz</input>
<gain>/systems/electrical/sources/idg-2/gcr-relay</gain>
</pure_gain>
<!-- APU gen -->
<!-- IDG 1 -->
<pure_gain name="/systems/electrical/sources/apu/drive-rpm-input">
<input>/systems/apu/n2</input>
<gain>240</gain>
</pure_gain>
<!--<pure_gain name="/systems/electrical/sources/apu/drive-rpm">
<input>/systems/electrical/sources/apu/drive-rpm-input</input>
<gain>/controls/electrical/switches/gen-drive-1</gain>
</pure_gain>--> <!-- Fire btn -->
<fcs_function name="/systems/electrical/sources/apu/pmg-volt">
<function>
<product>
<property>/systems/electrical/sources/apu/drive-rpm-input</property>
<quotient>
<value>115</value>
<value>24000</value>
</quotient>
</product>
</function>
</fcs_function>
<fcs_function name="/systems/electrical/sources/apu/pmg-hertz">
<function>
<quotient>
<product>
<property>/systems/electrical/sources/apu/drive-rpm-input</property>
<value>2</value> <!-- Number of poles in generator -->
</product>
<value>120</value>
</quotient>
</function>
</fcs_function>
<switch name="/systems/electrical/sources/apu/gcr-relay">
<default value="0"/>
<test logic="AND" value="1">
/controls/electrical/switches/apu eq 1
/systems/failures/electrical/apu ne 1
/systems/electrical/sources/apu/drive-rpm-input ge 23000
</test>
</switch>
<pure_gain name="/systems/electrical/sources/apu/output-volt">
<input>/systems/electrical/sources/apu/pmg-volt</input>
<gain>/systems/electrical/sources/apu/gcr-relay</gain>
</pure_gain>
<pure_gain name="/systems/electrical/sources/apu/output-hertz">
<input>/systems/electrical/sources/apu/pmg-hertz</input>
<gain>/systems/electrical/sources/apu/gcr-relay</gain>
</pure_gain>
<!-- External Power -->
<fcs_function name="/systems/electrical/sources/ext/output-volt">
<function>
<ifthen>
<eq>
<property>/controls/switches/cart</property>
<value>1</value>
</eq>
<value>115</value>
<value>0</value>
</ifthen>
</function>
</fcs_function>
<fcs_function name="/systems/electrical/sources/ext/output-hertz">
<function>
<ifthen>
<ge>
<property>/systems/electrical/sources/ext/output-volt</property>
<value>110</value>
</ge>
<value>400</value>
<value>0</value>
</ifthen>
</function>
</fcs_function>
<!-- Static Inverter -->
<switch name="/systems/electrical/sources/inverter/inverter-active">
<default value="0"/>
<test logic="AND" value="1">
/instrumentation/airspeed-indicator/indicated-speed-kt ge 50
/instrumentation/airspeed-indicator/indicated-speed-kt lt 100
</test>
<test logic="AND" value="1">
/instrumentation/airspeed-indicator/indicated-speed-kt lt 50
/controls/electrical/switches/bat-1 eq 1
/controls/electrical/switches/bat-2 eq 1
</test>
</switch>
<!-- Emergency Generator -->
<switch name="/systems/electrical/some-electric-thingie/emer-gen-operate">
<default value="0"/>
<test value="1">
/controls/electrical/switches/emer-gen-test eq 1
</test>
<test logic="AND" value="1">
/instrumentation/airspeed-indicator/indicated-speed-kt gt 100
/systems/electrical/bus/ac-1 eq 0
/systems/electrical/bus/ac-1 eq 2
/controls/electrical/switches/emer-elec-man-on eq 0
</test>
<test value="1">
/controls/electrical/switches/emer-elec-man-on eq 1
</test>
</switch>
<!-- TODO: Must wait 3s after rat deploys + powers emer gen -->
<!-- Regulated to 115V, no point doing fancy, HYD controls it -->
<switch name="/systems/electrical/sources/emer-gen/output-volt">
<default value="0"/>
<test logic="AND" value="115">
/systems/electrical/some-electric-thingie/emer-gen-operate eq 1
/systems/hydraulic/blue-psi gt 2500
</test>
</switch>
<switch name="/systems/electrical/sources/emer-gen/output-hertz">
<default value="0"/>
<test logic="AND" value="400">
/systems/electrical/sources/emer-gen/output-volt eq 115
</test>
</switch>
<!-- Source Relays -->
<switch name="/systems/electrical/relay/gen-1-glc/contact-pos">
<default value="0"/>
<test logic="AND" value="1">
/controls/electrical/switches/gen-1 eq 1
/systems/electrical/sources/idg-1/output-volt ge 110
</test>
</switch>
<switch name="/systems/electrical/relay/gen-1-glc/output">
<default value="0"/>
<test value="/systems/electrical/sources/idg-1/output-volt">
/systems/electrical/relay/gen-1-glc/contact-pos eq 1
</test>
</switch>
<switch name="/systems/electrical/relay/gen-2-glc/contact-pos">
<default value="0"/>
<test logic="AND" value="1">
/controls/electrical/switches/gen-2 eq 1
/systems/electrical/sources/idg-2/output-volt ge 110
</test>
</switch>
<switch name="/systems/electrical/relay/gen-2-glc/output">
<default value="0"/>
<test value="/systems/electrical/sources/idg-2/output-volt">
/systems/electrical/relay/gen-2-glc/contact-pos eq 1
</test>
</switch>
<switch name="/systems/electrical/relay/apu-glc/contact-pos">
<default value="0"/>
<test logic="AND" value="1">
/controls/electrical/switches/apu eq 1
/systems/electrical/sources/apu/output-volt ge 110
/systems/electrical/relay/ext-epc/contact-pos eq 0
</test>
</switch>
<switch name="/systems/electrical/relay/apu-glc/output">
<default value="0"/>
<test value="/systems/electrical/sources/apu/output-volt">
/systems/electrical/relay/apu-glc/contact-pos eq 1
</test>
</switch>
<switch name="/systems/electrical/relay/ext-epc/contact-pos">
<default value="0"/>
<test logic="AND" value="1">
/systems/electrical/sources/ext/output-volt ge 110
/controls/electrical/switches/ext-pwr eq 1
</test>
</switch>
<switch name="/systems/electrical/relay/ext-epc/output">
<default value="0"/>
<test value="/systems/electrical/sources/ext/output-volt">
/systems/electrical/relay/ext-epc/contact-pos eq 1
</test>
</switch>
<!-- Bus Tie -->
<switch name="/systems/electrical/relay/ac-bus-tie-1/contact-pos">
<default value="0"/>
<test value="0">
/systems/electrical/relay/gen-1-glc/contact-pos eq 1
</test>
<test value="1">
/controls/electrical/switches/bus-tie eq 1
</test>
</switch>
<switch name="/systems/electrical/relay/ac-bus-tie-1/output">
<default value="0"/>
<test value="/systems/electrical/bus/ac-bus-tie">
/systems/electrical/relay/ac-bus-tie-1/contact-pos eq 1
</test>
</switch>
<switch name="/systems/electrical/relay/ac-bus-tie-2/contact-pos">
<default value="0"/>
<test value="0">
/systems/electrical/relay/gen-2-glc/contact-pos eq 1
</test>
<test value="1">
/controls/electrical/switches/bus-tie eq 1
</test>
</switch>
<switch name="/systems/electrical/relay/ac-bus-tie-2/output">
<default value="0"/>
<test value="/systems/electrical/bus/ac-bus-tie">
/systems/electrical/relay/ac-bus-tie-2/contact-pos eq 1
</test>
</switch>
<!-- AC ESS Feed -->
<switch name="/systems/electrical/relay/ac-ess-feed-1/contact-pos">
<default value="0"/>
<test value="1">
/controls/electrical/switches/ac-ess-feed eq 1
</test>
</switch>
<switch name="/systems/electrical/relay/ac-ess-feed-1/output">
<default value="0"/>
<test value="/systems/electrical/bus/ac-1">
/systems/electrical/relay/ac-ess-feed-1/contact-pos eq 1
</test>
</switch>
<switch name="/systems/electrical/relay/ac-ess-feed-2/contact-pos">
<default value="0"/>
<test value="1"> <!-- TODO: Confirm, according to TTM transfer is not auto -->
/controls/electrical/switches/ac-ess-feed eq 0
</test>
</switch>
<switch name="/systems/electrical/relay/ac-ess-feed-2/output">
<default value="0"/>
<test value="/systems/electrical/bus/ac-2">
/systems/electrical/relay/ac-ess-feed-2/contact-pos eq 1
</test>
</switch>
<switch name="/systems/electrical/relay/ac-ess-shed-switch/contact-pos">
<default value="1"/>
<!--<test value="0">
TODO: During EMER GEN test OR static inverter operation is off
confirm these conditions are for galley, NOT AC ESS:
during single generator is off, if GALY AND CAB pb is off (todo - do we have this?) is off
</test> -->
</switch>
<switch name="/systems/electrical/relay/ac-ess-shed-switch/output">
<default value="0"/>
<test value="/systems/electrical/bus/ac-ess">
/systems/electrical/relay/ac-ess-shed-switch/contact-pos eq 1
</test>
</switch>
<switch name="/systems/electrical/relay/dc-ess-shed-switch/contact-pos">
<default value="1"/>
<!--<test value="0">
TODO: During EMER GEN test OR static inverter operation is off
confirm these conditions are for galley, NOT AC ESS:
during single generator is off, if GALY AND CAB pb is off (todo - do we have this?) is off
</test> -->
</switch>
<switch name="/systems/electrical/relay/dc-ess-shed-switch/output">
<default value="/systems/electrical/bus/dc-ess"/>
<!-- TODO -->
</switch>
<!-- TR Contactors - USE for output of TRs -->
<switch name="/systems/electrical/relay/dc-tr-1-contactor/contact-pos">
<default value="0"/>
<test value="1">
/systems/failures/electrical/tr-1 eq 0
</test>
</switch>
<switch name="/systems/electrical/relay/dc-tr-1-contactor/output">
<default value="0"/>
<test value="/systems/electrical/sources/tr-1/output-volt">
/systems/electrical/relay/dc-tr-1-contactor/contact-pos eq 1
</test>
</switch>
<switch name="/systems/electrical/relay/dc-tr-2-contactor/contact-pos">
<default value="0"/>
<test value="1">
/systems/failures/electrical/tr-2 eq 0
</test>
</switch>
<switch name="/systems/electrical/relay/dc-tr-2-contactor/output">
<default value="0"/>
<test value="/systems/electrical/sources/tr-2/output-volt">
/systems/electrical/relay/dc-tr-2-contactor/contact-pos eq 1
</test>
</switch>
<switch name="/systems/electrical/relay/dc-tr-ess-contactor/contact-pos">
<default value="0"/>
<test logic="OR" value="1">
/systems/electrical/sources/tr-1/output-volt lt 110 <!-- TODO: Check if failure or just low volt -->
/systems/electrical/sources/tr-2/output-volt lt 110
</test>
</switch>
<switch name="/systems/electrical/relay/dc-tr-ess-contactor/output">
<default value="0"/>
<test value="/systems/electrical/sources/tr-ess/output-volt">
/systems/electrical/relay/dc-tr-ess-contactor/contact-pos eq 1
</test>
</switch>
<!-- DC Tie -->
<switch name="/systems/electrical/relay/dc-tie-1-contactor/contact-pos">
<default value="0"/>
<test logic="OR" value="1"> <!-- If either TR is providing voltage then Bus Tie is open -->
/systems/electrical/sources/tr-1/output-volt gt 110
/systems/electrical/sources/tr-2/output-volt gt 110
</test>
</switch>
<switch name="/systems/electrical/relay/dc-tie-1-contactor/output">
<default value="0"/>
<test logic="AND" value="/systems/electrical/bus/dc-1">
/systems/electrical/relay/dc-tr-2-contactor/contact-pos eq 1
/systems/electrical/sources/tr-1/output-volt gt 25
/systems/electrical/sources/tr-2/output-volt eq 0
</test>
<test logic="AND" value="/systems/electrical/bus/dc-bat">
/systems/electrical/relay/dc-tr-2-contactor/contact-pos eq 1
/systems/electrical/sources/tr-1/output-volt eq 0
/systems/electrical/sources/tr-2/output-volt gt 25
</test>
</switch>
<switch name="/systems/electrical/relay/dc-tie-2-contactor/contact-pos">
<default value="0"/>
<test logic="OR" value="1"> <!-- If either TR is providing voltage then Bus Tie is open -->
/systems/electrical/sources/tr-1/output-volt gt 110
/systems/electrical/sources/tr-2/output-volt gt 110
</test>
</switch>
<switch name="/systems/electrical/relay/dc-tie-2-contactor/output">
<default value="0"/>
<test logic="AND" value="/systems/electrical/bus/dc-2">
/systems/electrical/relay/dc-tr-2-contactor/contact-pos eq 1
/systems/electrical/sources/tr-1/output-volt eq 0
/systems/electrical/sources/tr-2/output-volt gt 25
</test>
<test logic="AND" value="/systems/electrical/bus/dc-bat">
/systems/electrical/relay/dc-tr-2-contactor/contact-pos eq 1
/systems/electrical/sources/tr-1/output-volt gt 25
/systems/electrical/sources/tr-2/output-volt eq 0
</test>
</switch>
<switch name="/systems/electrical/relay/dc-tie-ess/contact-pos">
<default value="0"/>
<test logic="OR" value="1"> <!-- To avoid fancy, just leave it open all the time except when the ess tr is powering DC Bat -->
/systems/electrical/relay/dc-tr-ess-contactor/contact-pos eq 0
</test>
</switch>
<switch name="/systems/electrical/relay/dc-tie-ess/output">
<default value="0"/>
<test logic="AND" value="/systems/electrical/bus/dc-bat">
/systems/electrical/relay/dc-tie-ess/contact-pos eq 1
/systems/electrical/bus/dc-bat gt 25
</test>
</switch>
<!-- AC Bus 1 -->
<switch name="/systems/electrical/bus/ac-1-src">
<description>Tell which source is being used for priority purpose</description>
<default value="0"/> <!-- OFF -->
<test value="1"> <!-- IDG1 -->
/systems/electrical/relay/gen-1-glc/contact-pos eq 1
</test>
<test value="2"> <!-- Bus Tie -->
/systems/electrical/relay/ac-bus-tie-1/contact-pos eq 1
</test>
</switch>
<fcs_function name="/systems/electrical/bus/ac-1">
<function>
<max>
<property>/systems/electrical/relay/gen-1-glc/output</property>
<property>/systems/electrical/relay/ac-bus-tie-1/output</property>
</max>
</function>
</fcs_function>
<switch name="/systems/electrical/bus/ac-2-src">
<description>Tell which source is being used for priority purpose</description>
<default value="0"/> <!-- OFF -->
<test value="1"> <!-- IDG2 -->
/systems/electrical/relay/gen-2-glc/contact-pos eq 1
</test>
<test value="2"> <!-- Bus Tie -->
/systems/electrical/relay/ac-bus-tie-2/contact-pos eq 1
</test>
</switch>
<fcs_function name="/systems/electrical/bus/ac-2">
<function>
<max>
<property>/systems/electrical/relay/gen-2-glc/output</property>
<property>/systems/electrical/relay/ac-bus-tie-2/output</property>
</max>
</function>
</fcs_function>
<fcs_function name="/systems/electrical/bus/ac-bus-tie">
<function>
<max>
<property>/systems/electrical/relay/ext-epc/output</property>
<property>/systems/electrical/relay/apu-glc/output</property>
</max>
</function>
</fcs_function>
<fcs_function name="/systems/electrical/bus/ac-ess">
<function>
<max>
<property>/systems/electrical/relay/ac-ess-feed-1/output</property>
<property>/systems/electrical/relay/ac-ess-feed-2/output</property>
<property>/systems/electrical/sources/emer-gen/output-volt</property>
<!-- static inverter -->
</max>
</function>
</fcs_function>
<pure_gain name="/systems/electrical/bus/ac-ess-shed">
<input>/systems/electrical/relay/ac-ess-shed-switch/output</input>
<gain>/systems/electrical/relay/ac-ess-shed-switch/contact-pos</gain>
</pure_gain>
<!-- TR1 -->
<pure_gain name="/systems/electrical/sources/tr-1/output-volt">
<input>/systems/electrical/bus/ac-1</input>
<gain>0.24347826086956523</gain> <!-- AC to DC converter -->
</pure_gain>
<fcs_function name="/systems/electrical/sources/tr-1/output-amp">
<function>
<table>
<independentVar lookup="row">/systems/electrical/sources/tr-1/output-volt</independentVar>
<tableData>
0 0
27.5 200 <!-- TODO = make it depend on current draw -->
</tableData>
</table>
</function>
</fcs_function>
<!-- TR2 -->
<pure_gain name="/systems/electrical/sources/tr-2/output-volt">
<input>/systems/electrical/bus/ac-2</input>
<gain>0.24347826086956523</gain> <!-- AC to DC converter -->
</pure_gain>
<fcs_function name="/systems/electrical/sources/tr-2/output-amp">
<function>
<table> <!-- TODO: Make it depend on current draw -->
<independentVar lookup="row">/systems/electrical/sources/tr-2/output-volt</independentVar>
<tableData>
0 0
27.5 200
</tableData>
</table>
</function>
</fcs_function>
<!-- TR ESS -->
<!-- Only active when tr1 or 2 is failed, but we'll do this supply-side to avoid complex logic here -->
<pure_gain name="/systems/electrical/sources/tr-ess/output-volt">
<input>/systems/electrical/bus/ac-ess</input>
<gain>0.24347826086956523</gain> <!-- AC to DC converter -->
</pure_gain>
<fcs_function name="/systems/electrical/sources/tr-ess/output-amp">
<function>
<table> <!-- TODO: Make it depend on current draw -->
<independentVar lookup="row">/systems/electrical/sources/tr-ess/output-volt</independentVar>
<tableData>
0 0
27.5 200
</tableData>
</table>
</function>
</fcs_function>
<!-- DC Buses -->
<switch name="/systems/electrical/bus/dc-1-src">
<description>Tell which source is being used for priority purpose</description>
<default value="0"/> <!-- OFF -->
<test value="1"> <!-- TR1 -->
/systems/electrical/relay/dc-tr-1-contactor/contact-pos eq 1
</test>
<test value="2"> <!-- DC Bat -->
/systems/electrical/relay/dc-tie-1-contactor/contact-pos eq 1
</test>
</switch>
<fcs_function name="/systems/electrical/bus/dc-1">
<function>
<max>
<property>/systems/electrical/relay/dc-tr-1-contactor/output</property>
<property>/systems/electrical/relay/dc-tie-1-contactor/output</property>
</max>
</function>
</fcs_function>
<switch name="/systems/electrical/bus/dc-2-src">
<description>Tell which source is being used for priority purpose</description>
<default value="0"/> <!-- OFF -->
<test value="1"> <!-- TR2 -->
/systems/electrical/relay/dc-tr-2-contactor/contact-pos eq 1
</test>
<test value="2"> <!-- DC Bat -->
/systems/electrical/relay/dc-tie-2-contactor/contact-pos eq 1
</test>
</switch>
<fcs_function name="/systems/electrical/bus/dc-2">
<function>
<max>
<property>/systems/electrical/relay/dc-tr-2-contactor/output</property>
<property>/systems/electrical/relay/dc-tie-2-contactor/output</property>
</max>
</function>
</fcs_function>
<switch name="/systems/electrical/bus/dc-bat-src">
<description>Tell which source is being used for priority purpose</description>
<default value="0"/> <!-- OFF -->
<test value="1"> <!-- DC1 -->
/systems/electrical/relay/dc-tie-1-contactor/contact-pos eq 1
</test>
<test value="2"> <!-- DC2 -->
/systems/electrical/relay/dc-tie-2-contactor/contact-pos eq 1
</test>
<!-- TODO: Batteries connection -->
</switch>
<fcs_function name="/systems/electrical/bus/dc-bat">
<function>
<max>
<property>/systems/electrical/relay/dc-tie-1-contactor/output</property>
<property>/systems/electrical/relay/dc-tie-2-contactor/output</property>
<!-- TODO: Batteries connection -->
</max>
</function>
</fcs_function>
<switch name="/systems/electrical/bus/dc-ess-src">
<description>Tell which source is being used for priority purpose</description>
<default value="0"/> <!-- OFF -->
<test value="1"> <!-- DC Bat -->
/systems/electrical/relay/dc-tie-ess/contact-pos eq 1
</test>
<test value="2"> <!-- ESS TR -->
/systems/electrical/relay/dc-tr-ess-contactor/contact-pos eq 1
</test>
</switch>
<fcs_function name="/systems/electrical/bus/dc-ess">
<function>
<max>
<property>/systems/electrical/relay/dc-tie-ess/output</property>
<property>/systems/electrical/relay/dc-tr-ess-contactor/output</property>
</max>
</function>
</fcs_function>
<pure_gain name="/systems/electrical/bus/dc-ess-shed">
<input>/systems/electrical/relay/dc-ess-shed-switch/output</input>
<gain>/systems/electrical/relay/dc-ess-shed-switch/contact-pos</gain>
</pure_gain>
</channel>
<!-- Notes -->
<!-- Priority: eng, ext, apu but EXT ON lt stays on even when not feeding a/c -->
<!-- Ground service bus connected directly to input-volt -->
<!-- TR 2 fail leads to loss of gnd FLT bus -->
<!-- TODO: Galley: During single generator is off, if GALY AND CAB pb is off (TODO: Do we have this?) is off -->
<channel name="Overhead Lights" execrate="8">
<switch name="/systems/electrical/light/gen1-fault">
<default value="0"/>
<test value="1">
/controls/electrical/switches/gen-1 eq 1
/systems/electrical/sources/idg-1/gcr-relay eq 0
</test>
</switch>
<switch name="/systems/electrical/light/gen2-fault">
<default value="0"/>
<test value="1">
/controls/electrical/switches/gen-2 eq 1
/systems/electrical/sources/idg-2/gcr-relay eq 0
</test>
</switch>
<switch name="/systems/electrical/light/rat-emer-gen-fault">
<default value="0"/>
<test value="1">
/systems/electrical/sources/tr-ess/output-volt eq 0
/systems/electrical/bus/ac-1 eq 0
/systems/electrical/bus/ac-2 eq 0
position/wow eq 0
</test>
</switch>
</channel>
</system>