1
0
Fork 0
A320-family/Systems/a320-spoiler.xml
2022-08-16 12:04:48 -04:00

1016 lines
No EOL
26 KiB
XML

<?xml version="1.0"?>
<!-- Airbus A320 Spoilers -->
<!-- Copyright (c) 2022 Josh Davidson (Octal450) -->
<system name="A320: Spoilers">
<property value="0">hydraulics/spoiler-l2/main-cmd-feedback</property>
<channel name="Spoiler Logic">
<switch name="spoilers/auto-speedbrake-arm"> <!-- Important for spoiler axis -->
<default value="/controls/flight/speedbrake-arm"/>
<test value="0">
/controls/flight/speedbrake gt 0
</test>
<output>/controls/flight/speedbrake-arm</output>
</switch>
<fcs_function name="spoilers/lever-input">
<function>
<table>
<independentVar lookup="row">/controls/flight/speedbrake</independentVar>
<tableData>
0.10 0.0
0.45 0.5
0.55 0.5
0.90 1.0
</tableData>
</table>
</function>
</fcs_function>
<switch name="spoilers/main-gear-or">
<default value="0"/>
<test logic="OR" value="1">
gear/unit[1]/WOW eq 1
gear/unit[2]/WOW eq 1
</test>
</switch>
<switch name="spoilers/main-gear-and">
<default value="0"/>
<test logic="AND" value="1">
gear/unit[1]/WOW eq 1
gear/unit[2]/WOW eq 1
</test>
</switch>
<switch name="spoilers/auto-speedbrake">
<default value="spoilers/auto-speedbrake"/>
<test logic="OR" value="0"> <!-- Reset -->
fadec/control-1/detent ne 0
fadec/control-2/detent ne 0
/controls/flight/speedbrake-arm ne 1
</test>
<test logic="AND" value="1"> <!-- EXT Set -->
fadec/control-1/detent eq 0
fadec/control-2/detent eq 0
/controls/flight/speedbrake-arm eq 1
spoilers/main-gear-and eq 1
/velocities/groundspeed-kt ge 72
</test>
<test logic="AND" value="0.2"> <!-- PLD Set 10 degrees -->
fadec/control-1/detent eq 0
fadec/control-2/detent eq 0
/controls/flight/speedbrake-arm eq 1
spoilers/main-gear-or eq 1
/velocities/groundspeed-kt ge 72
</test>
</switch>
<switch name="spoilers/lever-cmd">
<default value="spoilers/lever-input"/>
<test value="spoilers/auto-speedbrake">
/controls/flight/speedbrake-arm eq 1
</test>
</switch>
<switch name="spoilers/max-spoiler">
<default value="1.0"/>
<test logic="AND" value="0.4">
spoilers/main-gear-or eq 0
fbw/fmgc/enabled eq 1
</test>
</switch>
<fcs_function name="spoilers/main-cmd">
<function>
<table>
<independentVar lookup="row">spoilers/lever-cmd</independentVar>
<tableData> <!-- Half is 12.5/25 of 20/40 -->
0.0 0.000
0.5 0.625
1.0 1.000
</tableData>
</table>
</function>
<output>fbw/spoiler-output</output>
<clipto>
<min>0</min>
<max>spoilers/max-spoiler</max>
</clipto>
</fcs_function>
<fcs_function name="hydraulics/spoiler-droop-rate">
<function>
<table>
<independentVar lookup="row">aero/qbar-psf</independentVar>
<tableData>
9 1
33 6
</tableData>
</table>
</function>
</fcs_function>
</channel>
<channel name="Spoiler L1">
<switch name="hydraulics/spoiler-l1/switch">
<default value="0"/>
<test logic="AND" value="spoilers/main-cmd">
/systems/hydraulic/green-psi ge 1500
spoilers/main-gear-and eq 1
/systems/failures/spoilers/spoiler-l1 eq 0
</test>
<clipto>
<min>0.0</min>
<max>1.0</max>
</clipto>
</switch>
<pure_gain name="hydraulics/spoiler-l1/cmd-deg">
<input>hydraulics/spoiler-l1/switch</input>
<gain>50</gain>
</pure_gain>
<switch name="hydraulics/spoiler-l1/rate">
<default value="hydraulics/spoiler-droop-rate"/>
<test value="100">
/systems/acconfig/autoconfig-running eq 1
</test>
<test value="35">
/systems/hydraulic/green-psi ge 1500
</test>
</switch>
<actuator name="hydraulics/spoiler-l1/final-actuator">
<input>hydraulics/spoiler-l1/cmd-deg</input>
<rate_limit>hydraulics/spoiler-l1/rate</rate_limit>
<lag>26.5</lag>
<output>hydraulics/spoiler-l1/final-deg</output>
</actuator>
</channel>
<channel name="Spoiler L2">
<switch name="hydraulics/spoiler-l2/main-cmd-rate">
<default value="0.72"/>
<test value="0.9">
spoilers/main-gear-and eq 1
</test>
</switch>
<fcs_function name="hydraulics/spoiler-l2/main-cmd-calc">
<function>
<product>
<property>spoilers/main-cmd</property>
<value>0.8</value>
</product>
</function>
</fcs_function>
<actuator name="hydraulics/spoiler-l2/main-cmd">
<input>hydraulics/spoiler-l2/main-cmd-calc</input>
<rate_limit>hydraulics/spoiler-l2/main-cmd-rate</rate_limit>
<output>hydraulics/spoiler-l2/main-cmd-feedback</output>
</actuator>
<fcs_function name="hydraulics/spoiler-l2/air-extended">
<function>
<sum>
<product>
<property>hydraulics/spoiler-l2/main-cmd</property>
<value>0.5</value>
</product>
<table>
<independentVar lookup="row">fbw/roll/s-l-2</independentVar>
<tableData>
0.0 0.0
1.0 -0.55
</tableData>
</table>
</sum>
</function>
</fcs_function>
<fcs_function name="hydraulics/spoiler-l2/ground-extended">
<function>
<sum>
<property>spoilers/main-cmd</property>
<table>
<independentVar lookup="row">fbw/roll/s-l-2</independentVar>
<tableData>
0.0 0.0
1.0 -0.7
</tableData>
</table>
</sum>
</function>
</fcs_function>
<fcs_function name="hydraulics/spoiler-l2/retracted">
<function>
<table>
<independentVar lookup="row">fbw/roll/s-l-2</independentVar>
<tableData>
-1.0 0.7
0.0 0.0
</tableData>
</table>
</function>
</fcs_function>
<switch name="hydraulics/spoiler-l2/switch">
<default value="0"/>
<test logic="AND" value="hydraulics/spoiler-l2/air-extended">
/systems/hydraulic/yellow-psi ge 1500
spoilers/main-gear-and eq 0
/systems/failures/spoilers/spoiler-l2 eq 0
spoilers/main-cmd gt 0
</test>
<test logic="AND" value="hydraulics/spoiler-l2/ground-extended">
/systems/hydraulic/yellow-psi ge 1500
spoilers/main-gear-and eq 1
/systems/failures/spoilers/spoiler-l2 eq 0
spoilers/main-cmd gt 0
</test>
<test logic="AND" value="hydraulics/spoiler-l2/retracted">
/systems/hydraulic/yellow-psi ge 1500
/systems/failures/spoilers/spoiler-l2 eq 0
</test>
<clipto>
<min>0.0</min>
<max>1.0</max>
</clipto>
</switch>
<pure_gain name="hydraulics/spoiler-l2/cmd-deg">
<input>hydraulics/spoiler-l2/switch</input>
<gain>50</gain>
</pure_gain>
<switch name="hydraulics/spoiler-l2/rate">
<default value="hydraulics/spoiler-droop-rate"/>
<test value="100">
/systems/acconfig/autoconfig-running eq 1
</test>
<test value="35">
/systems/hydraulic/yellow-psi ge 1500
</test>
</switch>
<actuator name="hydraulics/spoiler-l2/final-actuator">
<input>hydraulics/spoiler-l2/cmd-deg</input>
<rate_limit>hydraulics/spoiler-l2/rate</rate_limit>
<lag>26.5</lag>
<output>hydraulics/spoiler-l2/final-deg</output>
</actuator>
</channel>
<channel name="Spoiler L3">
<fcs_function name="hydraulics/spoiler-l3/ground-extended">
<function>
<sum>
<property>spoilers/main-cmd</property>
<table>
<independentVar lookup="row">fbw/roll/s-l-3</independentVar>
<tableData>
0.0 0.0
1.0 -0.7
</tableData>
</table>
</sum>
</function>
</fcs_function>
<fcs_function name="hydraulics/spoiler-l3/air-extended">
<function>
<sum>
<product>
<property>spoilers/main-cmd</property>
<value>0.8</value>
</product>
<table>
<independentVar lookup="row">fbw/roll/s-l-3</independentVar>
<tableData>
0.0 0.0
1.0 -0.7
</tableData>
</table>
</sum>
</function>
</fcs_function>
<fcs_function name="hydraulics/spoiler-l3/retracted">
<function>
<table>
<independentVar lookup="row">fbw/roll/s-l-3</independentVar>
<tableData>
-1.0 0.7
0.0 0.0
</tableData>
</table>
</function>
</fcs_function>
<switch name="hydraulics/spoiler-l3/switch">
<default value="0"/>
<test logic="AND" value="hydraulics/spoiler-l3/air-extended">
/systems/hydraulic/blue-psi ge 1500
spoilers/main-gear-and eq 0
/systems/failures/spoilers/spoiler-l3 eq 0
spoilers/main-cmd gt 0
</test>
<test logic="AND" value="hydraulics/spoiler-l3/ground-extended">
/systems/hydraulic/blue-psi ge 1500
spoilers/main-gear-and eq 1
/systems/failures/spoilers/spoiler-l3 eq 0
spoilers/main-cmd gt 0
</test>
<test logic="AND" value="hydraulics/spoiler-l3/retracted">
/systems/hydraulic/blue-psi ge 1500
/systems/failures/spoilers/spoiler-l3 eq 0
</test>
<clipto>
<min>0.0</min>
<max>1.0</max>
</clipto>
</switch>
<pure_gain name="hydraulics/spoiler-l3/cmd-deg">
<input>hydraulics/spoiler-l3/switch</input>
<gain>50</gain>
</pure_gain>
<switch name="hydraulics/spoiler-l3/rate">
<default value="hydraulics/spoiler-droop-rate"/>
<test value="100">
/systems/acconfig/autoconfig-running eq 1
</test>
<test value="35">
/systems/hydraulic/blue-psi ge 1500
</test>
</switch>
<actuator name="hydraulics/spoiler-l3/final-actuator">
<input>hydraulics/spoiler-l3/cmd-deg</input>
<rate_limit>hydraulics/spoiler-l3/rate</rate_limit>
<lag>26.5</lag>
<output>hydraulics/spoiler-l3/final-deg</output>
</actuator>
</channel>
<channel name="Spoiler L4">
<fcs_function name="hydraulics/spoiler-l4/ground-extended">
<function>
<sum>
<property>spoilers/main-cmd</property>
<table>
<independentVar lookup="row">fbw/roll/s-l-4</independentVar>
<tableData>
0.0 0.0
1.0 -0.7
</tableData>
</table>
</sum>
</function>
</fcs_function>
<fcs_function name="hydraulics/spoiler-l4/air-extended">
<function>
<sum>
<product>
<property>spoilers/main-cmd</property>
<value>0.8</value>
</product>
<table>
<independentVar lookup="row">fbw/roll/s-l-4</independentVar>
<tableData>
0.0 0.0
1.0 -0.7
</tableData>
</table>
</sum>
</function>
</fcs_function>
<fcs_function name="hydraulics/spoiler-l4/retracted">
<function>
<sum>
<table>
<independentVar lookup="row">fbw/roll/s-l-4</independentVar>
<tableData>
-1.0 0.7
0.0 0.0
</tableData>
</table>
<property>fbw/laf/output-sp</property>
</sum>
</function>
</fcs_function>
<switch name="hydraulics/spoiler-l4/switch">
<default value="0"/>
<test logic="AND" value="hydraulics/spoiler-l4/air-extended">
/systems/hydraulic/yellow-psi ge 1500
spoilers/main-gear-and eq 0
/systems/failures/spoilers/spoiler-l4 eq 0
spoilers/main-cmd gt 0
</test>
<test logic="AND" value="hydraulics/spoiler-l4/ground-extended">
/systems/hydraulic/yellow-psi ge 1500
spoilers/main-gear-and eq 1
/systems/failures/spoilers/spoiler-l4 eq 0
spoilers/main-cmd gt 0
</test>
<test logic="AND" value="hydraulics/spoiler-l4/retracted">
/systems/hydraulic/yellow-psi ge 1500
/systems/failures/spoilers/spoiler-l4 eq 0
</test>
<clipto>
<min>0.0</min>
<max>1.0</max>
</clipto>
</switch>
<pure_gain name="hydraulics/spoiler-l4/cmd-deg">
<input>hydraulics/spoiler-l4/switch</input>
<gain>50</gain>
</pure_gain>
<switch name="hydraulics/spoiler-l4/rate">
<default value="hydraulics/spoiler-droop-rate"/>
<test value="100">
/systems/acconfig/autoconfig-running eq 1
</test>
<test value="35">
/systems/hydraulic/yellow-psi ge 1500
</test>
</switch>
<actuator name="hydraulics/spoiler-l4/final-actuator">
<input>hydraulics/spoiler-l4/cmd-deg</input>
<rate_limit>hydraulics/spoiler-l4/rate</rate_limit>
<lag>26.5</lag>
<output>hydraulics/spoiler-l4/final-deg</output>
</actuator>
</channel>
<channel name="Spoiler L5">
<fcs_function name="hydraulics/spoiler-l5/ground-extended">
<function>
<sum>
<property>spoilers/main-cmd</property>
<table>
<independentVar lookup="row">fbw/roll/s-l-5</independentVar>
<tableData>
0.0 0.0
1.0 -0.7
</tableData>
</table>
</sum>
</function>
</fcs_function>
<fcs_function name="hydraulics/spoiler-l5/retracted">
<function>
<sum>
<table>
<independentVar lookup="row">fbw/roll/s-l-5</independentVar>
<tableData>
-1.0 0.7
0.0 0.0
</tableData>
</table>
<property>fbw/laf/output-sp</property>
</sum>
</function>
</fcs_function>
<switch name="hydraulics/spoiler-l5/switch">
<default value="0"/>
<test logic="AND" value="hydraulics/spoiler-l5/ground-extended">
/systems/hydraulic/green-psi ge 1500
spoilers/main-gear-and eq 1
/systems/failures/spoilers/spoiler-l5 eq 0
spoilers/main-cmd gt 0
</test>
<test logic="AND" value="hydraulics/spoiler-l5/retracted">
/systems/hydraulic/green-psi ge 1500
/systems/failures/spoilers/spoiler-l5 eq 0
</test>
<clipto>
<min>0.0</min>
<max>1.0</max>
</clipto>
</switch>
<pure_gain name="hydraulics/spoiler-l5/cmd-deg">
<input>hydraulics/spoiler-l5/switch</input>
<gain>50</gain>
</pure_gain>
<switch name="hydraulics/spoiler-l5/rate">
<default value="hydraulics/spoiler-droop-rate"/>
<test value="100">
/systems/acconfig/autoconfig-running eq 1
</test>
<test value="35">
/systems/hydraulic/green-psi ge 1500
</test>
</switch>
<actuator name="hydraulics/spoiler-l5/final-actuator">
<input>hydraulics/spoiler-l5/cmd-deg</input>
<rate_limit>hydraulics/spoiler-l5/rate</rate_limit>
<lag>26.5</lag>
<output>hydraulics/spoiler-l5/final-deg</output>
</actuator>
</channel>
<channel name="Spoiler R1">
<switch name="hydraulics/spoiler-r1/switch">
<default value="0"/>
<test logic="AND" value="spoilers/main-cmd">
/systems/hydraulic/green-psi ge 1500
spoilers/main-gear-and eq 1
/systems/failures/spoilers/spoiler-r1 eq 0
</test>
<clipto>
<min>0.0</min>
<max>1.0</max>
</clipto>
</switch>
<pure_gain name="hydraulics/spoiler-r1/cmd-deg">
<input>hydraulics/spoiler-r1/switch</input>
<gain>50</gain>
</pure_gain>
<switch name="hydraulics/spoiler-r1/rate">
<default value="hydraulics/spoiler-droop-rate"/>
<test value="100">
/systems/acconfig/autoconfig-running eq 1
</test>
<test value="35">
/systems/hydraulic/green-psi ge 1500
</test>
</switch>
<actuator name="hydraulics/spoiler-r1/final-actuator">
<input>hydraulics/spoiler-r1/cmd-deg</input>
<rate_limit>hydraulics/spoiler-r1/rate</rate_limit>
<lag>26.5</lag>
<output>hydraulics/spoiler-r1/final-deg</output>
</actuator>
</channel>
<channel name="Spoiler R2">
<switch name="hydraulics/spoiler-r2/main-cmd-rate">
<default value="0.72"/>
<test value="0.9">
spoilers/main-gear-and eq 1
</test>
</switch>
<fcs_function name="hydraulics/spoiler-r2/main-cmd-calc">
<function>
<product>
<property>spoilers/main-cmd</property>
<value>0.8</value>
</product>
</function>
</fcs_function>
<actuator name="hydraulics/spoiler-r2/main-cmd">
<input>hydraulics/spoiler-r2/main-cmd-calc</input>
<rate_limit>hydraulics/spoiler-r2/main-cmd-rate</rate_limit>
<output>hydraulics/spoiler-r2/main-cmd-feedback</output>
</actuator>
<fcs_function name="hydraulics/spoiler-r2/air-extended">
<function>
<sum>
<product>
<property>hydraulics/spoiler-r2/main-cmd</property>
<value>0.5</value>
</product>
<table>
<independentVar lookup="row">fbw/roll/s-r-2</independentVar>
<tableData>
-1.0 -0.55
0.0 0.0
</tableData>
</table>
</sum>
</function>
</fcs_function>
<fcs_function name="hydraulics/spoiler-r2/ground-extended">
<function>
<sum>
<property>spoilers/main-cmd</property>
<table>
<independentVar lookup="row">fbw/roll/s-r-2</independentVar>
<tableData>
-1.0 -0.7
0.0 0.0
</tableData>
</table>
</sum>
</function>
</fcs_function>
<fcs_function name="hydraulics/spoiler-r2/retracted">
<function>
<table>
<independentVar lookup="row">fbw/roll/s-r-2</independentVar>
<tableData>
0.0 0.0
1.0 0.7
</tableData>
</table>
</function>
</fcs_function>
<switch name="hydraulics/spoiler-r2/switch">
<default value="0"/>
<test logic="AND" value="hydraulics/spoiler-r2/air-extended">
/systems/hydraulic/yellow-psi ge 1500
spoilers/main-gear-and eq 0
/systems/failures/spoilers/spoiler-r2 eq 0
spoilers/main-cmd gt 0
</test>
<test logic="AND" value="hydraulics/spoiler-r2/ground-extended">
/systems/hydraulic/yellow-psi ge 1500
spoilers/main-gear-and eq 1
/systems/failures/spoilers/spoiler-r2 eq 0
spoilers/main-cmd gt 0
</test>
<test logic="AND" value="hydraulics/spoiler-r2/retracted">
/systems/hydraulic/yellow-psi ge 1500
/systems/failures/spoilers/spoiler-r2 eq 0
</test>
<clipto>
<min>0.0</min>
<max>1.0</max>
</clipto>
</switch>
<pure_gain name="hydraulics/spoiler-r2/cmd-deg">
<input>hydraulics/spoiler-r2/switch</input>
<gain>50</gain>
</pure_gain>
<switch name="hydraulics/spoiler-r2/rate">
<default value="hydraulics/spoiler-droop-rate"/>
<test value="100">
/systems/acconfig/autoconfig-running eq 1
</test>
<test value="35">
/systems/hydraulic/yellow-psi ge 1500
</test>
</switch>
<actuator name="hydraulics/spoiler-r2/final-actuator">
<input>hydraulics/spoiler-r2/cmd-deg</input>
<rate_limit>hydraulics/spoiler-r2/rate</rate_limit>
<lag>26.5</lag>
<output>hydraulics/spoiler-r2/final-deg</output>
</actuator>
</channel>
<channel name="Spoiler R3">
<fcs_function name="hydraulics/spoiler-r3/ground-extended">
<function>
<sum>
<property>spoilers/main-cmd</property>
<table>
<independentVar lookup="row">fbw/roll/s-r-3</independentVar>
<tableData>
-1.0 -0.7
0.0 0.0
</tableData>
</table>
</sum>
</function>
</fcs_function>
<fcs_function name="hydraulics/spoiler-r3/air-extended">
<function>
<sum>
<product>
<property>spoilers/main-cmd</property>
<value>0.8</value>
</product>
<table>
<independentVar lookup="row">fbw/roll/s-r-3</independentVar>
<tableData>
-1.0 -0.7
0.0 0.0
</tableData>
</table>
</sum>
</function>
</fcs_function>
<fcs_function name="hydraulics/spoiler-r3/retracted">
<function>
<table>
<independentVar lookup="row">fbw/roll/s-r-3</independentVar>
<tableData>
0.0 0.0
1.0 0.7
</tableData>
</table>
</function>
</fcs_function>
<switch name="hydraulics/spoiler-r3/switch">
<default value="0"/>
<test logic="AND" value="hydraulics/spoiler-r3/air-extended">
/systems/hydraulic/blue-psi ge 1500
spoilers/main-gear-and eq 0
/systems/failures/spoilers/spoiler-r3 eq 0
spoilers/main-cmd gt 0
</test>
<test logic="AND" value="hydraulics/spoiler-r3/ground-extended">
/systems/hydraulic/blue-psi ge 1500
spoilers/main-gear-and eq 1
/systems/failures/spoilers/spoiler-r3 eq 0
spoilers/main-cmd gt 0
</test>
<test logic="AND" value="hydraulics/spoiler-r3/retracted">
/systems/hydraulic/blue-psi ge 1500
/systems/failures/spoilers/spoiler-r3 eq 0
</test>
<clipto>
<min>0.0</min>
<max>1.0</max>
</clipto>
</switch>
<pure_gain name="hydraulics/spoiler-r3/cmd-deg">
<input>hydraulics/spoiler-r3/switch</input>
<gain>50</gain>
</pure_gain>
<switch name="hydraulics/spoiler-r3/rate">
<default value="hydraulics/spoiler-droop-rate"/>
<test value="100">
/systems/acconfig/autoconfig-running eq 1
</test>
<test value="35">
/systems/hydraulic/blue-psi ge 1500
</test>
</switch>
<actuator name="hydraulics/spoiler-r3/final-actuator">
<input>hydraulics/spoiler-r3/cmd-deg</input>
<rate_limit>hydraulics/spoiler-r3/rate</rate_limit>
<lag>26.5</lag>
<output>hydraulics/spoiler-r3/final-deg</output>
</actuator>
</channel>
<channel name="Spoiler R4">
<fcs_function name="hydraulics/spoiler-r4/ground-extended">
<function>
<sum>
<property>spoilers/main-cmd</property>
<table>
<independentVar lookup="row">fbw/roll/s-r-4</independentVar>
<tableData>
-1.0 -0.7
0.0 0.0
</tableData>
</table>
</sum>
</function>
</fcs_function>
<fcs_function name="hydraulics/spoiler-r4/air-extended">
<function>
<sum>
<product>
<property>spoilers/main-cmd</property>
<value>0.8</value>
</product>
<table>
<independentVar lookup="row">fbw/roll/s-r-4</independentVar>
<tableData>
-1.0 -0.7
0.0 0.0
</tableData>
</table>
</sum>
</function>
</fcs_function>
<fcs_function name="hydraulics/spoiler-r4/retracted">
<function>
<sum>
<table>
<independentVar lookup="row">fbw/roll/s-r-4</independentVar>
<tableData>
0.0 0.0
1.0 0.7
</tableData>
</table>
<property>fbw/laf/output-sp</property>
</sum>
</function>
</fcs_function>
<switch name="hydraulics/spoiler-r4/switch">
<default value="0"/>
<test logic="AND" value="hydraulics/spoiler-r4/air-extended">
/systems/hydraulic/yellow-psi ge 1500
spoilers/main-gear-and eq 0
/systems/failures/spoilers/spoiler-r4 eq 0
spoilers/main-cmd gt 0
</test>
<test logic="AND" value="hydraulics/spoiler-r4/ground-extended">
/systems/hydraulic/yellow-psi ge 1500
spoilers/main-gear-and eq 1
/systems/failures/spoilers/spoiler-r4 eq 0
spoilers/main-cmd gt 0
</test>
<test logic="AND" value="hydraulics/spoiler-r4/retracted">
/systems/hydraulic/yellow-psi ge 1500
/systems/failures/spoilers/spoiler-r4 eq 0
</test>
<clipto>
<min>0.0</min>
<max>1.0</max>
</clipto>
</switch>
<pure_gain name="hydraulics/spoiler-r4/cmd-deg">
<input>hydraulics/spoiler-r4/switch</input>
<gain>50</gain>
</pure_gain>
<switch name="hydraulics/spoiler-r4/rate">
<default value="hydraulics/spoiler-droop-rate"/>
<test value="100">
/systems/acconfig/autoconfig-running eq 1
</test>
<test value="35">
/systems/hydraulic/yellow-psi ge 1500
</test>
</switch>
<actuator name="hydraulics/spoiler-r4/final-actuator">
<input>hydraulics/spoiler-r4/cmd-deg</input>
<rate_limit>hydraulics/spoiler-r4/rate</rate_limit>
<lag>26.5</lag>
<output>hydraulics/spoiler-r4/final-deg</output>
</actuator>
</channel>
<channel name="Spoiler R5">
<fcs_function name="hydraulics/spoiler-r5/ground-extended">
<function>
<sum>
<property>spoilers/main-cmd</property>
<table>
<independentVar lookup="row">fbw/roll/s-r-5</independentVar>
<tableData>
-1.0 -0.7
0.0 0.0
</tableData>
</table>
</sum>
</function>
</fcs_function>
<fcs_function name="hydraulics/spoiler-r5/retracted">
<function>
<sum>
<table>
<independentVar lookup="row">fbw/roll/s-r-5</independentVar>
<tableData>
0.0 0.0
1.0 0.7
</tableData>
</table>
<property>fbw/laf/output-sp</property>
</sum>
</function>
</fcs_function>
<switch name="hydraulics/spoiler-r5/switch">
<default value="0"/>
<test logic="AND" value="hydraulics/spoiler-r5/ground-extended">
/systems/hydraulic/green-psi ge 1500
spoilers/main-gear-and eq 1
/systems/failures/spoilers/spoiler-r5 eq 0
spoilers/main-cmd gt 0
</test>
<test logic="AND" value="hydraulics/spoiler-r5/retracted">
/systems/hydraulic/green-psi ge 1500
/systems/failures/spoilers/spoiler-r5 eq 0
</test>
<clipto>
<min>0.0</min>
<max>1.0</max>
</clipto>
</switch>
<pure_gain name="hydraulics/spoiler-r5/cmd-deg">
<input>hydraulics/spoiler-r5/switch</input>
<gain>50</gain>
</pure_gain>
<switch name="hydraulics/spoiler-r5/rate">
<default value="hydraulics/spoiler-droop-rate"/>
<test value="100">
/systems/acconfig/autoconfig-running eq 1
</test>
<test value="35">
/systems/hydraulic/green-psi ge 1500
</test>
</switch>
<actuator name="hydraulics/spoiler-r5/final-actuator">
<input>hydraulics/spoiler-r5/cmd-deg</input>
<rate_limit>hydraulics/spoiler-r5/rate</rate_limit>
<lag>26.5</lag>
<output>hydraulics/spoiler-r5/final-deg</output>
</actuator>
</channel>
<channel name="Output">
<summer name="fcs/spoiler-left-sum">
<input>hydraulics/spoiler-l1/final-actuator</input>
<input>hydraulics/spoiler-l2/final-actuator</input>
<input>hydraulics/spoiler-l3/final-actuator</input>
<input>hydraulics/spoiler-l4/final-actuator</input>
<input>hydraulics/spoiler-l5/final-actuator</input>
</summer>
<fcs_function name="fcs/spoiler-left-deg">
<function>
<quotient>
<property>fcs/spoiler-left-sum</property>
<value>5</value>
</quotient>
</function>
</fcs_function>
<summer name="fcs/spoiler-right-sum">
<input>hydraulics/spoiler-r1/final-actuator</input>
<input>hydraulics/spoiler-r2/final-actuator</input>
<input>hydraulics/spoiler-r3/final-actuator</input>
<input>hydraulics/spoiler-r4/final-actuator</input>
<input>hydraulics/spoiler-r5/final-actuator</input>
</summer>
<fcs_function name="fcs/spoiler-right-deg">
<function>
<quotient>
<property>fcs/spoiler-right-sum</property>
<value>5</value>
</quotient>
</function>
</fcs_function>
<fcs_function name="fcs/spoiler-symmetrical-deg">
<function>
<quotient>
<min>
<property>fcs/spoiler-left-sum</property>
<property>fcs/spoiler-right-sum</property>
</min>
<value>5</value>
</quotient>
</function>
</fcs_function>
</channel>
</system>