FADEC: Redo and begin new system, Control: add simulated drooping
This commit is contained in:
parent
a4e38935d9
commit
3532ff11a0
9 changed files with 623 additions and 282 deletions
|
@ -690,20 +690,20 @@
|
|||
</aircraft-effects>
|
||||
</environment>
|
||||
|
||||
<fdm>
|
||||
<jsbsim>
|
||||
<aero>
|
||||
<fdm n="0">
|
||||
<jsbsim n="0">
|
||||
<aero n="0">
|
||||
<alpha-deg-norm type="double">0</alpha-deg-norm>
|
||||
</aero>
|
||||
<external_reactions>
|
||||
<external_reactions n="0">
|
||||
<tractor>
|
||||
<magnitude alias="/sim/model/autopush/force-lbf"/>
|
||||
<x alias="/sim/model/autopush/force-x"/>
|
||||
<y alias="/sim/model/autopush/force-y"/>
|
||||
</tractor>
|
||||
</external_reactions>
|
||||
<fbw>
|
||||
<yaw>
|
||||
<fbw n="0">
|
||||
<yaw n="0">
|
||||
<max-deg-switch type="double">25</max-deg-switch>
|
||||
</yaw>
|
||||
</fbw>
|
||||
|
@ -1127,6 +1127,8 @@
|
|||
<engine n="0">
|
||||
<egt-actual type="double">0</egt-actual>
|
||||
<epr-actual type="double">1</epr-actual>
|
||||
<ff-actual type="double">0</ff-actual>
|
||||
<fuel-flow_pph type="double">0</fuel-flow_pph>
|
||||
<n1-actual type="double">0</n1-actual>
|
||||
<n2-actual type="double">0</n2-actual>
|
||||
<on-fire type="bool">0</on-fire>
|
||||
|
@ -1137,6 +1139,8 @@
|
|||
<engine n="1">
|
||||
<egt-actual type="double">0</egt-actual>
|
||||
<epr-actual type="double">1</epr-actual>
|
||||
<ff-actual type="double">0</ff-actual>
|
||||
<fuel-flow_pph type="double">0</fuel-flow_pph>
|
||||
<n1-actual type="double">0</n1-actual>
|
||||
<n2-actual type="double">0</n2-actual>
|
||||
<on-fire type="bool">0</on-fire>
|
||||
|
@ -1197,6 +1201,14 @@
|
|||
<acconfig n="0">
|
||||
<autoconfig-running type="bool">0</autoconfig-running>
|
||||
<options n="0">
|
||||
<fadec n="0"> <!-- Configurable Detents -->
|
||||
<climb-b type="double">0.6</climb-b>
|
||||
<climb-t type="double">0.65</climb-t>
|
||||
<idle-t type="double">0.01</idle-t>
|
||||
<mct-b type="double">0.78</mct-b>
|
||||
<mct-t type="double">0.83</mct-t>
|
||||
<toga-b type="double">0.95</toga-b>
|
||||
</fadec>
|
||||
<seperate-tiller-axis type="bool">0</seperate-tiller-axis>
|
||||
</options>
|
||||
</acconfig>
|
||||
|
|
|
@ -1028,8 +1028,8 @@ input = {
|
|||
EPRthr_2: "/ECAM/Upper/EPRthr[1]",
|
||||
|
||||
# fuel flow
|
||||
fuelflow_1: "/engines/engine[0]/fuel-flow_actual",
|
||||
fuelflow_2: "/engines/engine[1]/fuel-flow_actual",
|
||||
fuelflow_1: "/engines/engine[0]/ff-actual",
|
||||
fuelflow_2: "/engines/engine[1]/ff-actual",
|
||||
|
||||
# flaps
|
||||
flapsPos: "/controls/flight/flaps-pos",
|
||||
|
|
|
@ -54,86 +54,86 @@ var doTOGAThrust = func {
|
|||
}
|
||||
}
|
||||
|
||||
# Reverse Thrust System
|
||||
# Reverse Thrust System - TODO: Totally f*cked! Redo the whole d*mn thing!
|
||||
var toggleFastRevThrust = func {
|
||||
if (pts.Systems.Thrust.state[0].getValue() == "IDLE" and pts.Systems.Thrust.state[1].getValue() == "IDLE" and pts.Controls.Engines.Engine.reverser[0].getValue() == 0 and pts.Controls.Engines.Engine.reverser[1].getValue() == 0 and pts.Gear.wow[1].getValue() == 1 and pts.Gear.wow[2].getValue() == 1) {
|
||||
if (pts.Sim.Input.Selected.engine[0].getBoolValue()) {
|
||||
interpolate("/engines/engine[0]/reverser-pos-norm", 1, 1.4);
|
||||
pts.Controls.Engines.Engine.reverser[0].setValue(1);
|
||||
pts.Controls.Engines.Engine.throttleRev[0].setValue(0.65);
|
||||
pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[0].setValue(3.14);
|
||||
}
|
||||
if (pts.Sim.Input.Selected.engine[1].getBoolValue()) {
|
||||
interpolate("/engines/engine[1]/reverser-pos-norm", 1, 1.4);
|
||||
pts.Controls.Engines.Engine.reverser[1].setValue(1);
|
||||
pts.Controls.Engines.Engine.throttleRev[1].setValue(0.65);
|
||||
pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[1].setValue(3.14);
|
||||
}
|
||||
} else if (pts.Controls.Engines.Engine.reverser[0].getValue() == 1 or pts.Controls.Engines.Engine.reverser[1].getValue() == 1) {
|
||||
interpolate("/engines/engine[0]/reverser-pos-norm", 0, 1.0);
|
||||
interpolate("/engines/engine[1]/reverser-pos-norm", 0, 1.0);
|
||||
pts.Controls.Engines.Engine.throttleRev[0].setValue(0);
|
||||
pts.Controls.Engines.Engine.throttleRev[1].setValue(0);
|
||||
pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[0].setValue(0);
|
||||
pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[1].setValue(0);
|
||||
pts.Controls.Engines.Engine.reverser[0].setValue(0);
|
||||
pts.Controls.Engines.Engine.reverser[1].setValue(0);
|
||||
}
|
||||
#if (pts.Systems.Thrust.state[0].getValue() == "IDLE" and pts.Systems.Thrust.state[1].getValue() == "IDLE" and pts.Controls.Engines.Engine.reverser[0].getValue() == 0 and pts.Controls.Engines.Engine.reverser[1].getValue() == 0 and pts.Gear.wow[1].getValue() == 1 and pts.Gear.wow[2].getValue() == 1) {
|
||||
# if (pts.Sim.Input.Selected.engine[0].getBoolValue()) {
|
||||
# interpolate("/engines/engine[0]/reverser-pos-norm", 1, 1.4);
|
||||
# pts.Controls.Engines.Engine.reverser[0].setValue(1);
|
||||
# pts.Controls.Engines.Engine.throttleRev[0].setValue(0.65);
|
||||
# pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[0].setValue(3.14);
|
||||
# }
|
||||
# if (pts.Sim.Input.Selected.engine[1].getBoolValue()) {
|
||||
# interpolate("/engines/engine[1]/reverser-pos-norm", 1, 1.4);
|
||||
# pts.Controls.Engines.Engine.reverser[1].setValue(1);
|
||||
# pts.Controls.Engines.Engine.throttleRev[1].setValue(0.65);
|
||||
# pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[1].setValue(3.14);
|
||||
# }
|
||||
#} else if (pts.Controls.Engines.Engine.reverser[0].getValue() == 1 or pts.Controls.Engines.Engine.reverser[1].getValue() == 1) {
|
||||
# interpolate("/engines/engine[0]/reverser-pos-norm", 0, 1.0);
|
||||
# interpolate("/engines/engine[1]/reverser-pos-norm", 0, 1.0);
|
||||
# pts.Controls.Engines.Engine.throttleRev[0].setValue(0);
|
||||
# pts.Controls.Engines.Engine.throttleRev[1].setValue(0);
|
||||
# pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[0].setValue(0);
|
||||
# pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[1].setValue(0);
|
||||
# pts.Controls.Engines.Engine.reverser[0].setValue(0);
|
||||
# pts.Controls.Engines.Engine.reverser[1].setValue(0);
|
||||
#}
|
||||
}
|
||||
|
||||
var doRevThrust = func {
|
||||
if (pts.Gear.wow[1].getValue() != 1 and pts.Gear.wow[2].getValue() != 1) {
|
||||
# Can't select reverse if not on the ground
|
||||
return;
|
||||
}
|
||||
if (pts.Sim.Input.Selected.engine[0].getBoolValue() and pts.Controls.Engines.Engine.reverser[0].getValue() == 1) {
|
||||
var pos = pts.Controls.Engines.Engine.throttleRev[0].getValue();
|
||||
if (pos < 0.649) {
|
||||
pts.Controls.Engines.Engine.throttleRev[0].setValue(pos + 0.15);
|
||||
}
|
||||
}
|
||||
if (pts.Sim.Input.Selected.engine[1].getBoolValue() and pts.Controls.Engines.Engine.reverser[1].getValue() == 1) {
|
||||
var pos = pts.Controls.Engines.Engine.throttleRev[1].getValue();
|
||||
if (pos < 0.649) {
|
||||
pts.Controls.Engines.Engine.throttleRev[1].setValue(pos + 0.15);
|
||||
}
|
||||
}
|
||||
|
||||
if (pts.Sim.Input.Selected.engine[0].getBoolValue() and pts.Systems.Thrust.state[0].getValue() == "IDLE" and pts.Controls.Engines.Engine.reverser[0].getValue() == 0) {
|
||||
interpolate("/engines/engine[0]/reverser-pos-norm", 1, 1.4);
|
||||
pts.Controls.Engines.Engine.throttleRev[0].setValue(0.05);
|
||||
pts.Controls.Engines.Engine.reverser[0].setValue(1);
|
||||
pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[0].setValue(3.14);
|
||||
}
|
||||
if (pts.Sim.Input.Selected.engine[1].getBoolValue() and pts.Systems.Thrust.state[1].getValue() == "IDLE" and pts.Controls.Engines.Engine.reverser[1].getValue() == 0) {
|
||||
interpolate("/engines/engine[1]/reverser-pos-norm", 1, 1.4);
|
||||
pts.Controls.Engines.Engine.throttleRev[1].setValue(0.05);
|
||||
pts.Controls.Engines.Engine.reverser[1].setValue(1);
|
||||
pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[1].setValue(3.14);
|
||||
}
|
||||
#if (pts.Gear.wow[1].getValue() != 1 and pts.Gear.wow[2].getValue() != 1) {
|
||||
# # Can't select reverse if not on the ground
|
||||
# return;
|
||||
#}
|
||||
#if (pts.Sim.Input.Selected.engine[0].getBoolValue() and pts.Controls.Engines.Engine.reverser[0].getValue() == 1) {
|
||||
# var pos = pts.Controls.Engines.Engine.throttleRev[0].getValue();
|
||||
# if (pos < 0.649) {
|
||||
# pts.Controls.Engines.Engine.throttleRev[0].setValue(pos + 0.15);
|
||||
# }
|
||||
#}
|
||||
#if (pts.Sim.Input.Selected.engine[1].getBoolValue() and pts.Controls.Engines.Engine.reverser[1].getValue() == 1) {
|
||||
# var pos = pts.Controls.Engines.Engine.throttleRev[1].getValue();
|
||||
# if (pos < 0.649) {
|
||||
# pts.Controls.Engines.Engine.throttleRev[1].setValue(pos + 0.15);
|
||||
# }
|
||||
#}
|
||||
#
|
||||
#if (pts.Sim.Input.Selected.engine[0].getBoolValue() and pts.Systems.Thrust.state[0].getValue() == "IDLE" and pts.Controls.Engines.Engine.reverser[0].getValue() == 0) {
|
||||
# interpolate("/engines/engine[0]/reverser-pos-norm", 1, 1.4);
|
||||
# pts.Controls.Engines.Engine.throttleRev[0].setValue(0.05);
|
||||
# pts.Controls.Engines.Engine.reverser[0].setValue(1);
|
||||
# pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[0].setValue(3.14);
|
||||
#}
|
||||
#if (pts.Sim.Input.Selected.engine[1].getBoolValue() and pts.Systems.Thrust.state[1].getValue() == "IDLE" and pts.Controls.Engines.Engine.reverser[1].getValue() == 0) {
|
||||
# interpolate("/engines/engine[1]/reverser-pos-norm", 1, 1.4);
|
||||
# pts.Controls.Engines.Engine.throttleRev[1].setValue(0.05);
|
||||
# pts.Controls.Engines.Engine.reverser[1].setValue(1);
|
||||
# pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[1].setValue(3.14);
|
||||
#}
|
||||
}
|
||||
|
||||
var unRevThrust = func {
|
||||
if (pts.Sim.Input.Selected.engine[0].getBoolValue() and pts.Controls.Engines.Engine.reverser[0].getValue() == 1) {
|
||||
var pos = pts.Controls.Engines.Engine.throttleRev[0].getValue();
|
||||
if (pos > 0.051) {
|
||||
pts.Controls.Engines.Engine.throttleRev[0].setValue(pos - 0.15);
|
||||
} else {
|
||||
interpolate("/engines/engine[0]/reverser-pos-norm", 0, 1.0);
|
||||
pts.Controls.Engines.Engine.throttleRev[0].setValue(0);
|
||||
pts.Controls.Engines.Engine.reverser[0].setValue(0);
|
||||
pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[0].setValue(0);
|
||||
}
|
||||
}
|
||||
if (pts.Sim.Input.Selected.engine[1].getBoolValue() and pts.Controls.Engines.Engine.reverser[1].getValue() == 1) {
|
||||
var pos = pts.Controls.Engines.Engine.throttleRev[1].getValue();
|
||||
if (pos > 0.051) {
|
||||
pts.Controls.Engines.Engine.throttleRev[1].setValue(pos - 0.15);
|
||||
} else {
|
||||
interpolate("/engines/engine[1]/reverser-pos-norm", 0, 1.0);
|
||||
pts.Controls.Engines.Engine.throttleRev[1].setValue(0);
|
||||
pts.Controls.Engines.Engine.reverser[1].setValue(0);
|
||||
pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[1].setValue(0);
|
||||
}
|
||||
}
|
||||
#if (pts.Sim.Input.Selected.engine[0].getBoolValue() and pts.Controls.Engines.Engine.reverser[0].getValue() == 1) {
|
||||
# var pos = pts.Controls.Engines.Engine.throttleRev[0].getValue();
|
||||
# if (pos > 0.051) {
|
||||
# pts.Controls.Engines.Engine.throttleRev[0].setValue(pos - 0.15);
|
||||
# } else {
|
||||
# interpolate("/engines/engine[0]/reverser-pos-norm", 0, 1.0);
|
||||
# pts.Controls.Engines.Engine.throttleRev[0].setValue(0);
|
||||
# pts.Controls.Engines.Engine.reverser[0].setValue(0);
|
||||
# pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[0].setValue(0);
|
||||
# }
|
||||
#}
|
||||
#if (pts.Sim.Input.Selected.engine[1].getBoolValue() and pts.Controls.Engines.Engine.reverser[1].getValue() == 1) {
|
||||
# var pos = pts.Controls.Engines.Engine.throttleRev[1].getValue();
|
||||
# if (pos > 0.051) {
|
||||
# pts.Controls.Engines.Engine.throttleRev[1].setValue(pos - 0.15);
|
||||
# } else {
|
||||
# interpolate("/engines/engine[1]/reverser-pos-norm", 0, 1.0);
|
||||
# pts.Controls.Engines.Engine.throttleRev[1].setValue(0);
|
||||
# pts.Controls.Engines.Engine.reverser[1].setValue(0);
|
||||
# pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[1].setValue(0);
|
||||
# }
|
||||
#}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# A3XX FADEC/Throttle Control System
|
||||
|
||||
# NOTE: Needs to be redone totally - so I will be breaking this file during the development of the new one
|
||||
# Copyright (c) 2020 Josh Davidson (Octal450)
|
||||
|
||||
if (getprop("options/eng") == "IAE") {
|
||||
|
@ -92,9 +92,7 @@ setlistener("/controls/engines/engine[0]/throttle-pos", func {
|
|||
if (pts.Gear.wow[0].getValue() and (engstate1 == 3 or engstate2 == 3)) {
|
||||
fmgc.Input.athr.setValue(1);
|
||||
}
|
||||
pts.Controls.Engines.Engine.throttleFdm[0].setValue(0.99);
|
||||
} else {
|
||||
pts.Controls.Engines.Engine.throttleFdm[0].setValue(0.95);
|
||||
}
|
||||
}
|
||||
pts.Systems.Thrust.state[0].setValue("MCT");
|
||||
|
@ -105,7 +103,6 @@ setlistener("/controls/engines/engine[0]/throttle-pos", func {
|
|||
if (pts.Gear.wow[0].getValue() and (engstate1 == 3 or engstate2 == 3)) {
|
||||
fmgc.Input.athr.setValue(1);
|
||||
}
|
||||
pts.Controls.Engines.Engine.throttleFdm[0].setValue(0.99);
|
||||
pts.Systems.Thrust.state[0].setValue("TOGA");
|
||||
unflex();
|
||||
}
|
||||
|
@ -125,7 +122,6 @@ setlistener("/controls/engines/engine[0]/throttle-pos", func {
|
|||
} else if (thr1 >= 0.95) {
|
||||
pts.Systems.Thrust.state[0].setValue("TOGA");
|
||||
}
|
||||
pts.Controls.Engines.Engine.throttleFdm[0].setValue(0.99);
|
||||
}
|
||||
}, 0, 0);
|
||||
|
||||
|
@ -153,9 +149,7 @@ setlistener("/controls/engines/engine[1]/throttle-pos", func {
|
|||
if (pts.Gear.wow[0].getValue() and (engstate1 == 3 or engstate2 == 3)) {
|
||||
fmgc.Input.athr.setValue(1);
|
||||
}
|
||||
pts.Controls.Engines.Engine.throttleFdm[1].setValue(0.99);
|
||||
} else {
|
||||
pts.Controls.Engines.Engine.throttleFdm[1].setValue(0.95);
|
||||
}
|
||||
}
|
||||
pts.Systems.Thrust.state[1].setValue("MCT");
|
||||
|
@ -166,7 +160,6 @@ setlistener("/controls/engines/engine[1]/throttle-pos", func {
|
|||
if (pts.Gear.wow[0].getValue() and (engstate1 == 3 or engstate2 == 3)) {
|
||||
fmgc.Input.athr.setValue(1);
|
||||
}
|
||||
pts.Controls.Engines.Engine.throttleFdm[1].setValue(0.99);
|
||||
pts.Systems.Thrust.state[1].setValue("TOGA");
|
||||
unflex();
|
||||
}
|
||||
|
@ -186,7 +179,6 @@ setlistener("/controls/engines/engine[1]/throttle-pos", func {
|
|||
} else if (thr2 >= 0.95) {
|
||||
pts.Systems.Thrust.state[1].setValue("TOGA");
|
||||
}
|
||||
pts.Controls.Engines.Engine.throttleFdm[1].setValue(0.99);
|
||||
}
|
||||
}, 0, 0);
|
||||
|
||||
|
@ -290,14 +282,10 @@ var thrust_loop = maketimer(0.04, func {
|
|||
Thrust.alphaFloor.setValue(1);
|
||||
Thrust.togaLk.setValue(0);
|
||||
fmgc.Input.athr.setValue(1);
|
||||
pts.Controls.Engines.Engine.throttleFdm[0].setValue(0.99);
|
||||
pts.Controls.Engines.Engine.throttleFdm[1].setValue(0.99);
|
||||
} else if (Thrust.alphaFloor.getValue() and alpha < togaLock) {
|
||||
fmgc.Input.athr.setValue(1);
|
||||
Thrust.alphaFloor.setValue(0);
|
||||
Thrust.togaLk.setValue(1);
|
||||
pts.Controls.Engines.Engine.throttleFdm[0].setValue(0.99);
|
||||
pts.Controls.Engines.Engine.throttleFdm[1].setValue(0.99);
|
||||
}
|
||||
} else {
|
||||
Thrust.alphaFloor.setValue(0);
|
||||
|
|
|
@ -6,8 +6,18 @@
|
|||
<system name="A320: CFM56 Engine">
|
||||
|
||||
<property value="45">fadec/limit/rated-temp</property>
|
||||
<property value="0">fadec/limit/flex-active</property>
|
||||
<property value="30">fadec/limit/flex-rated-temp</property>
|
||||
<property value="27000">fadec/limit/rated-thrust</property>
|
||||
<property value="18.9">fadec/limit/min-n1</property>
|
||||
<property value="104">fadec/limit/max-n1</property>
|
||||
|
||||
<!-- Remap/remove this sh*t -->
|
||||
<property value="0">/controls/engines/engine[0]/throttle-lever</property>
|
||||
<property value="0">/controls/engines/engine[0]/throttle-pos</property>
|
||||
<property value="0">/controls/engines/engine[1]/throttle-lever</property>
|
||||
<property value="0">/controls/engines/engine[1]/throttle-pos</property>
|
||||
<property value="0">/fdm/jsbsim/fadec/control-2/lever-n1</property>
|
||||
|
||||
<channel name="Thrust Limits">
|
||||
|
||||
|
@ -132,7 +142,7 @@
|
|||
|
||||
<fcs_function name="fadec/limit/toga-ref"> <!-- Vs 98.7, 104.8 (-15 bias + 1), 103.2 -->
|
||||
<function>
|
||||
<table> <!-- TODO: Figure out how to integrate FCOM table with this one -->
|
||||
<table>
|
||||
<independentVar lookup="row">/position/altitude-ft</independentVar>
|
||||
<independentVar lookup="column">propulsion/tat-c</independentVar>
|
||||
<tableData>
|
||||
|
@ -162,6 +172,18 @@
|
|||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/toga-norm">
|
||||
<function>
|
||||
<table>
|
||||
<independentVar lookup="row">fadec/limit/toga</independentVar>
|
||||
<tableData>
|
||||
18.9 0
|
||||
104.0 1
|
||||
</tableData>
|
||||
</table>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<summer name="fadec/limit/flex-temp-input"> <!-- (Rated - Flex) + TAT -->
|
||||
<input>fadec/limit/flex-rated-temp</input> <!-- Fix the calculations -->
|
||||
<input>-/FMGC/internal/flex</input>
|
||||
|
@ -203,20 +225,265 @@
|
|||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<!--
|
||||
TODO: need to figure out how to make MCT work, 24370lbs
|
||||
<fcs_function name="fadec/limit/mct-ref">
|
||||
<function>
|
||||
<product>
|
||||
<property>fadec/limit/toga-ref</property>
|
||||
<value>0.96</value> <!-- About 24370lbs -->
|
||||
</product>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<switch name="fadec/limit/mct-final-ref">
|
||||
<switch name="fadec/limit/mct-flex-ref">
|
||||
<default value="fadec/limit/mct-ref"/>
|
||||
<test value="fadec/limit/flex-ref">
|
||||
fadec/limit/flex-active eq 1
|
||||
</test>
|
||||
</switch>
|
||||
-->
|
||||
|
||||
<fcs_function name="fadec/limit/mct">
|
||||
<function>
|
||||
<quotient>
|
||||
<integer>
|
||||
<sum>
|
||||
<product>
|
||||
<property>fadec/limit/mct-flex-ref</property>
|
||||
<value>10</value>
|
||||
</product>
|
||||
<value>0.5</value> <!-- Make it round correctly -->
|
||||
</sum>
|
||||
</integer>
|
||||
<value>10</value>
|
||||
</quotient>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/mct-norm">
|
||||
<function>
|
||||
<table>
|
||||
<independentVar lookup="row">fadec/limit/mct</independentVar>
|
||||
<tableData>
|
||||
18.9 0
|
||||
104.0 1
|
||||
</tableData>
|
||||
</table>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/climb-ref">
|
||||
<function>
|
||||
<product> <!-- TEMPORARY REPLACE WITH TABLE LATER -->
|
||||
<property>fadec/limit/toga-ref</property>
|
||||
<value>0.9</value>
|
||||
</product>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/climb">
|
||||
<function>
|
||||
<quotient>
|
||||
<integer>
|
||||
<sum>
|
||||
<product>
|
||||
<property>fadec/limit/climb-ref</property>
|
||||
<value>10</value>
|
||||
</product>
|
||||
<value>0.5</value> <!-- Make it round correctly -->
|
||||
</sum>
|
||||
</integer>
|
||||
<value>10</value>
|
||||
</quotient>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/climb-norm">
|
||||
<function>
|
||||
<table>
|
||||
<independentVar lookup="row">fadec/limit/climb</independentVar>
|
||||
<tableData>
|
||||
18.9 0
|
||||
104.0 1
|
||||
</tableData>
|
||||
</table>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
</channel>
|
||||
|
||||
<channel name="Engine Control"> <!-- Very complicated, please don't touch if you don't understand it -->
|
||||
|
||||
<!-- Engine 1 -->
|
||||
<switch name="fadec/control-1/throttle-pos">
|
||||
<default value="/controls/engines/engine[0]/throttle"/>
|
||||
<!--test value="0">
|
||||
fadec/reverse-1/position-norm ne 0
|
||||
</test-->
|
||||
<!--test logic="AND" value="fadec/athr-cmd-1">
|
||||
</test-->
|
||||
</switch>
|
||||
|
||||
<fcs_function name="fadec/control-1/idle-climb-n1">
|
||||
<function>
|
||||
<sum>
|
||||
<property>fadec/limit/min-n1</property>
|
||||
<product>
|
||||
<difference>
|
||||
<property>fadec/control-1/throttle-pos</property>
|
||||
<property>/systems/acconfig/options/fadec/idle-t</property>
|
||||
</difference>
|
||||
<quotient>
|
||||
<difference>
|
||||
<property>fadec/limit/climb</property>
|
||||
<property>fadec/limit/min-n1</property>
|
||||
</difference>
|
||||
<difference>
|
||||
<property>/systems/acconfig/options/fadec/climb-b</property>
|
||||
<property>/systems/acconfig/options/fadec/idle-t</property>
|
||||
</difference>
|
||||
</quotient>
|
||||
</product>
|
||||
</sum>
|
||||
</function>
|
||||
<clipto>
|
||||
<min>fadec/limit/min-n1</min>
|
||||
<max>fadec/limit/climb</max>
|
||||
</clipto>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/control-1/climb-mct-n1">
|
||||
<function>
|
||||
<sum>
|
||||
<property>fadec/limit/climb</property>
|
||||
<product>
|
||||
<difference>
|
||||
<property>fadec/control-1/throttle-pos</property>
|
||||
<property>/systems/acconfig/options/fadec/climb-t</property>
|
||||
</difference>
|
||||
<quotient>
|
||||
<difference>
|
||||
<property>fadec/limit/mct</property>
|
||||
<property>fadec/limit/climb</property>
|
||||
</difference>
|
||||
<difference>
|
||||
<property>/systems/acconfig/options/fadec/mct-b</property>
|
||||
<property>/systems/acconfig/options/fadec/climb-t</property>
|
||||
</difference>
|
||||
</quotient>
|
||||
</product>
|
||||
</sum>
|
||||
</function>
|
||||
<clipto>
|
||||
<min>fadec/limit/climb</min>
|
||||
<max>fadec/limit/mct</max>
|
||||
</clipto>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/control-1/mct-toga-n1">
|
||||
<function>
|
||||
<sum>
|
||||
<property>fadec/limit/mct</property>
|
||||
<product>
|
||||
<difference>
|
||||
<property>fadec/control-1/throttle-pos</property>
|
||||
<property>/systems/acconfig/options/fadec/mct-t</property>
|
||||
</difference>
|
||||
<quotient>
|
||||
<difference>
|
||||
<property>fadec/limit/toga</property>
|
||||
<property>fadec/limit/mct</property>
|
||||
</difference>
|
||||
<difference>
|
||||
<property>/systems/acconfig/options/fadec/toga-b</property>
|
||||
<property>/systems/acconfig/options/fadec/mct-t</property>
|
||||
</difference>
|
||||
</quotient>
|
||||
</product>
|
||||
</sum>
|
||||
</function>
|
||||
<clipto>
|
||||
<min>fadec/limit/mct</min>
|
||||
<max>fadec/limit/toga</max>
|
||||
</clipto>
|
||||
</fcs_function>
|
||||
|
||||
<switch name="fadec/control-1/lever-n1">
|
||||
<default value="fadec/control-1/idle-climb-n1"/>
|
||||
<test value="fadec/control-1/mct-toga-n1">
|
||||
fadec/control-1/throttle-pos gt /systems/acconfig/options/fadec/mct-t
|
||||
</test>
|
||||
<test value="fadec/control-1/climb-mct-n1">
|
||||
fadec/control-1/throttle-pos gt /systems/acconfig/options/fadec/climb-t
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<fcs_function name="fadec/control-1/lever-norm">
|
||||
<function>
|
||||
<table>
|
||||
<independentVar lookup="row">fadec/control-1/lever-n1</independentVar>
|
||||
<tableData>
|
||||
18.9 0
|
||||
104.0 1
|
||||
</tableData>
|
||||
</table>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<switch name="fadec/control-1/throttle-output">
|
||||
<default value="fadec/control-1/lever-norm"/> <!-- CHANGE THE -->
|
||||
<!--test value="fadec/reverse-1/throttle-rev-cmd">
|
||||
/controls/engines/engine[0]/reverse-lever gt 0
|
||||
</test-->
|
||||
</switch>
|
||||
|
||||
<lag_filter name="fadec/control-1/throttle-fdm">
|
||||
<input>fadec/control-1/throttle-output</input>
|
||||
<c1>0.75</c1>
|
||||
<output>fcs/throttle-pos-norm[0]</output>
|
||||
</lag_filter>
|
||||
|
||||
</channel>
|
||||
|
||||
<channel name="Engine Parameters" execrate="2">
|
||||
|
||||
<lag_filter name="fadec/n1-actual-1">
|
||||
<input>/engines/engine[0]/n1</input>
|
||||
<c1>2.25</c1>
|
||||
<output>/engines/engine[0]/n1-actual</output>
|
||||
<output>/engines/engine[3]/n1</output>
|
||||
</lag_filter>
|
||||
|
||||
<lag_filter name="fadec/n1-actual-2">
|
||||
<input>/engines/engine[1]/n1</input>
|
||||
<c1>2.25</c1>
|
||||
<output>/engines/engine[1]/n1-actual</output>
|
||||
<output>/engines/engine[4]/n1</output>
|
||||
</lag_filter>
|
||||
|
||||
<lag_filter name="fadec/n2-actual-1">
|
||||
<input>/engines/engine[0]/n2</input>
|
||||
<c1>2.25</c1>
|
||||
<output>/engines/engine[0]/n2-actual</output>
|
||||
<output>/engines/engine[3]/n2</output>
|
||||
</lag_filter>
|
||||
|
||||
<lag_filter name="fadec/n2-actual-2">
|
||||
<input>/engines/engine[1]/n2</input>
|
||||
<c1>2.25</c1>
|
||||
<output>/engines/engine[1]/n2-actual</output>
|
||||
<output>/engines/engine[4]/n2</output>
|
||||
</lag_filter>
|
||||
|
||||
<lag_filter name="fadec/ff-actual-1">
|
||||
<input>/engines/engine[0]/fuel-flow_pph</input>
|
||||
<c1>3</c1>
|
||||
<output>/engines/engine[0]/ff-actual</output>
|
||||
</lag_filter>
|
||||
|
||||
<lag_filter name="fadec/ff-actual-2">
|
||||
<input>/engines/engine[1]/fuel-flow_pph</input>
|
||||
<c1>3</c1>
|
||||
<output>/engines/engine[1]/ff-actual</output>
|
||||
</lag_filter>
|
||||
|
||||
</channel>
|
||||
|
||||
|
|
|
@ -12,10 +12,22 @@
|
|||
<fcs_function name="hydraulics/aileron-droop">
|
||||
<function>
|
||||
<table>
|
||||
<independentVar lookup="row">/velocities/airspeed-kt</independentVar>
|
||||
<independentVar lookup="row">aero/qbar-psf</independentVar>
|
||||
<tableData>
|
||||
62 1.0
|
||||
116 0.0
|
||||
7 1
|
||||
31 0
|
||||
</tableData>
|
||||
</table>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="hydraulics/aileron-droop-rate">
|
||||
<function>
|
||||
<table>
|
||||
<independentVar lookup="row">aero/qbar-psf</independentVar>
|
||||
<tableData>
|
||||
7 0.333333
|
||||
31 2
|
||||
</tableData>
|
||||
</table>
|
||||
</function>
|
||||
|
@ -24,10 +36,22 @@
|
|||
<fcs_function name="hydraulics/elevator-droop">
|
||||
<function>
|
||||
<table>
|
||||
<independentVar lookup="row">/velocities/airspeed-kt</independentVar>
|
||||
<independentVar lookup="row">aero/qbar-psf</independentVar>
|
||||
<tableData>
|
||||
72 1.0
|
||||
121 0.0
|
||||
8 1
|
||||
32 0
|
||||
</tableData>
|
||||
</table>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="hydraulics/elevator-droop-rate">
|
||||
<function>
|
||||
<table>
|
||||
<independentVar lookup="row">aero/qbar-psf</independentVar>
|
||||
<tableData>
|
||||
8 0.333333
|
||||
32 2
|
||||
</tableData>
|
||||
</table>
|
||||
</function>
|
||||
|
@ -105,18 +129,24 @@
|
|||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="hydraulics/aileron-l/actuator-enabled">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
hydraulics/aileron-l/pressure-switch-or eq 1
|
||||
/systems/failures/aileron-left eq 0
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="hydraulics/aileron-l/switch">
|
||||
<default value="hydraulics/aileron-droop"/>
|
||||
<test logic="AND" value="hydraulics/aileron-l/extended">
|
||||
hydraulics/aileron-l/pressure-switch-or eq 1
|
||||
hydraulics/aileron-l/actuator-enabled eq 1
|
||||
spoilers/anti-droop-final ne 0
|
||||
/gear/gear[1]/wow eq 1
|
||||
/gear/gear[2]/wow eq 1
|
||||
/systems/failures/aileron-left eq 0
|
||||
</test>
|
||||
<test logic="AND" value="hydraulics/aileron-l/retracted">
|
||||
hydraulics/aileron-l/pressure-switch-or eq 1
|
||||
/systems/failures/aileron-left eq 0
|
||||
<test value="hydraulics/aileron-l/retracted">
|
||||
hydraulics/aileron-l/actuator-enabled eq 1
|
||||
</test>
|
||||
<clipto>
|
||||
<min>-1.0</min>
|
||||
|
@ -129,9 +159,16 @@
|
|||
<gain>25</gain>
|
||||
</pure_gain>
|
||||
|
||||
<switch name="hydraulics/aileron-l/rate">
|
||||
<default value="hydraulics/aileron-droop-rate"/>
|
||||
<test value="82">
|
||||
hydraulics/aileron-l/actuator-enabled eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<actuator name="hydraulics/aileron-l/final-actuator">
|
||||
<input>hydraulics/aileron-l/cmd-deg</input>
|
||||
<rate_limit>82</rate_limit>
|
||||
<rate_limit>hydraulics/aileron-l/rate</rate_limit>
|
||||
<lag>26.5</lag>
|
||||
<output>hydraulics/aileron-l/final-deg</output>
|
||||
</actuator>
|
||||
|
@ -184,18 +221,24 @@
|
|||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="hydraulics/aileron-r/actuator-enabled">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
hydraulics/aileron-r/pressure-switch-or eq 1
|
||||
/systems/failures/aileron-right eq 0
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="hydraulics/aileron-r/switch">
|
||||
<default value="hydraulics/aileron-droop"/>
|
||||
<test logic="AND" value="hydraulics/aileron-r/extended">
|
||||
hydraulics/aileron-r/pressure-switch-or eq 1
|
||||
hydraulics/aileron-r/actuator-enabled eq 1
|
||||
spoilers/anti-droop-final ne 0
|
||||
/gear/gear[1]/wow eq 1
|
||||
/gear/gear[2]/wow eq 1
|
||||
/systems/failures/aileron-right eq 0
|
||||
</test>
|
||||
<test logic="AND" value="hydraulics/aileron-r/retracted">
|
||||
hydraulics/aileron-r/pressure-switch-or eq 1
|
||||
/systems/failures/aileron-right eq 0
|
||||
<test value="hydraulics/aileron-r/retracted">
|
||||
hydraulics/aileron-r/actuator-enabled eq 1
|
||||
</test>
|
||||
<clipto>
|
||||
<min>-1.0</min>
|
||||
|
@ -208,9 +251,16 @@
|
|||
<gain>25</gain>
|
||||
</pure_gain>
|
||||
|
||||
<switch name="hydraulics/aileron-r/rate">
|
||||
<default value="hydraulics/aileron-droop-rate"/>
|
||||
<test value="82">
|
||||
hydraulics/aileron-r/actuator-enabled eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<actuator name="hydraulics/aileron-r/final-actuator">
|
||||
<input>hydraulics/aileron-r/cmd-deg</input>
|
||||
<rate_limit>82</rate_limit>
|
||||
<rate_limit>hydraulics/aileron-r/rate</rate_limit>
|
||||
<lag>26.5</lag>
|
||||
<output>hydraulics/aileron-r/final-deg</output>
|
||||
</actuator>
|
||||
|
@ -258,25 +308,29 @@
|
|||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="hydraulics/elevator-l/switch">
|
||||
<default value="hydraulics/elevator-droop"/>
|
||||
<test logic="AND" value="0">
|
||||
<switch name="hydraulics/elevator-l/actuator-enabled">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1"> <!-- Don't use pressure-switch-or -->
|
||||
<test logic="OR">
|
||||
/systems/hydraulic/blue-psi ge 1500
|
||||
/systems/hydraulic/green-psi ge 1500
|
||||
</test>
|
||||
/systems/failures/elevator-left eq 0
|
||||
<test logic="AND"> <!-- only pitch trim available -->
|
||||
/systems/fctl/elac1 eq 0
|
||||
/systems/fctl/sec1 eq 0
|
||||
/systems/fctl/elac2 eq 0
|
||||
/systems/fctl/sec2 eq 0
|
||||
</test>
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="hydraulics/elevator-l/switch">
|
||||
<default value="hydraulics/elevator-droop"/>
|
||||
<test logic="AND" value="0"> <!-- Only pitch trim available -->
|
||||
hydraulics/elevator-l/actuator-enabled eq 1
|
||||
/systems/fctl/elac1 eq 0
|
||||
/systems/fctl/sec1 eq 0
|
||||
/systems/fctl/elac2 eq 0
|
||||
/systems/fctl/sec2 eq 0
|
||||
</test>
|
||||
<test logic="AND" value="hydraulics/elevator-output-switch">
|
||||
hydraulics/elevator-l/actuator-enabled eq 1
|
||||
hydraulics/elevator-l/pressure-switch-or eq 1
|
||||
/systems/failures/elevator-left eq 0
|
||||
/it-fbw/law ne 3
|
||||
</test>
|
||||
<clipto>
|
||||
<min>-1.0</min>
|
||||
|
@ -293,9 +347,16 @@
|
|||
</clipto>
|
||||
</pure_gain>
|
||||
|
||||
<switch name="hydraulics/elevator-l/rate">
|
||||
<default value="hydraulics/elevator-droop-rate"/>
|
||||
<test value="82">
|
||||
hydraulics/elevator-l/actuator-enabled eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<actuator name="hydraulics/elevator-l/final-actuator">
|
||||
<input>hydraulics/elevator-l/cmd-deg</input>
|
||||
<rate_limit>82</rate_limit>
|
||||
<rate_limit>hydraulics/elevator-l/rate</rate_limit>
|
||||
<lag>26.5</lag>
|
||||
<output>hydraulics/elevator-l/final-deg</output>
|
||||
</actuator>
|
||||
|
@ -324,25 +385,29 @@
|
|||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="hydraulics/elevator-r/switch">
|
||||
<default value="hydraulics/elevator-droop"/>
|
||||
<test logic="AND" value="0">
|
||||
<switch name="hydraulics/elevator-r/actuator-enabled">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1"> <!-- Don't use pressure-switch-or -->
|
||||
<test logic="OR">
|
||||
/systems/hydraulic/blue-psi ge 1500
|
||||
/systems/hydraulic/yellow-psi ge 1500
|
||||
</test>
|
||||
/systems/failures/elevator-right eq 0
|
||||
<test logic="AND"> <!-- only pitch trim available -->
|
||||
/systems/fctl/elac1 eq 0
|
||||
/systems/fctl/sec1 eq 0
|
||||
/systems/fctl/elac2 eq 0
|
||||
/systems/fctl/sec2 eq 0
|
||||
</test>
|
||||
/systems/failures/elevator-left eq 0
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="hydraulics/elevator-r/switch">
|
||||
<default value="hydraulics/elevator-droop"/>
|
||||
<test logic="AND" value="0"> <!-- Only pitch trim available -->
|
||||
hydraulics/elevator-r/actuator-enabled eq 1
|
||||
/systems/fctl/elac1 eq 0
|
||||
/systems/fctl/sec1 eq 0
|
||||
/systems/fctl/elac2 eq 0
|
||||
/systems/fctl/sec2 eq 0
|
||||
</test>
|
||||
<test logic="AND" value="hydraulics/elevator-output-switch">
|
||||
hydraulics/elevator-r/actuator-enabled eq 1
|
||||
hydraulics/elevator-r/pressure-switch-or eq 1
|
||||
/systems/failures/elevator-right eq 0
|
||||
/it-fbw/law ne 3
|
||||
</test>
|
||||
<clipto>
|
||||
<min>-1.0</min>
|
||||
|
@ -359,16 +424,23 @@
|
|||
</clipto>
|
||||
</pure_gain>
|
||||
|
||||
<switch name="hydraulics/elevator-r/rate">
|
||||
<default value="hydraulics/elevator-droop-rate"/>
|
||||
<test value="82">
|
||||
hydraulics/elevator-r/actuator-enabled eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<actuator name="hydraulics/elevator-r/final-actuator">
|
||||
<input>hydraulics/elevator-r/cmd-deg</input>
|
||||
<rate_limit>82</rate_limit>
|
||||
<rate_limit>hydraulics/elevator-r/rate</rate_limit>
|
||||
<lag>26.5</lag>
|
||||
<output>hydraulics/elevator-r/final-deg</output>
|
||||
</actuator>
|
||||
|
||||
</channel>
|
||||
|
||||
<channel name="Pitch Trim">
|
||||
<channel name="Stabilizer">
|
||||
|
||||
<switch name="hydraulics/stabilizer/rate">
|
||||
<default value="0"/> <!-- only mechanical input to hyd actuator. So it does need hydraulic power -->
|
||||
|
@ -484,7 +556,7 @@
|
|||
<input>hydraulics/rudder/trim-deg</input>
|
||||
<domain>
|
||||
<min>-20</min>
|
||||
<max> 20</max>
|
||||
<max>20</max>
|
||||
</domain>
|
||||
<range>
|
||||
<min>-0.8</min>
|
||||
|
@ -506,10 +578,12 @@
|
|||
<product>
|
||||
<property>hydraulics/rudder-swing</property>
|
||||
<sin>
|
||||
<toradians><difference>
|
||||
<property>/orientation/heading-deg</property>
|
||||
<property>/environment/wind-from-heading-deg</property>
|
||||
</difference></toradians>
|
||||
<toradians>
|
||||
<difference>
|
||||
<property>/orientation/heading-deg</property>
|
||||
<property>/environment/wind-from-heading-deg</property>
|
||||
</difference>
|
||||
</toradians>
|
||||
</sin>
|
||||
<property>/environment/wind-speed-kt</property>
|
||||
<value>1.6666</value>
|
||||
|
@ -525,7 +599,7 @@
|
|||
<input>hydraulics/rudder/swing-deg</input>
|
||||
<domain>
|
||||
<min>-25</min>
|
||||
<max> 25</max>
|
||||
<max>25</max>
|
||||
</domain>
|
||||
<range>
|
||||
<min>-1.0</min>
|
||||
|
@ -565,47 +639,7 @@
|
|||
|
||||
</channel>
|
||||
|
||||
<channel name="FADEC">
|
||||
|
||||
<lag_filter name="fcs/throttle1">
|
||||
<input>/controls/engines/engine[0]/throttle-output</input>
|
||||
<c1>0.95</c1>
|
||||
<output>fcs/throttle-pos-norm[0]</output>
|
||||
</lag_filter>
|
||||
|
||||
<lag_filter name="fcs/throttle2">
|
||||
<input>/controls/engines/engine[1]/throttle-output</input>
|
||||
<c1>0.95</c1>
|
||||
<output>fcs/throttle-pos-norm[1]</output>
|
||||
</lag_filter>
|
||||
|
||||
<lag_filter name="fcs/n1-actual1">
|
||||
<input>/engines/engine[0]/n1</input>
|
||||
<c1>2.25</c1>
|
||||
<output>/engines/engine[0]/n1-actual</output>
|
||||
<output>/engines/engine[3]/n1</output>
|
||||
</lag_filter>
|
||||
|
||||
<lag_filter name="fcs/n1-actual2">
|
||||
<input>/engines/engine[1]/n1</input>
|
||||
<c1>2.25</c1>
|
||||
<output>/engines/engine[1]/n1-actual</output>
|
||||
<output>/engines/engine[4]/n1</output>
|
||||
</lag_filter>
|
||||
|
||||
<lag_filter name="fcs/n2-actual1">
|
||||
<input>/engines/engine[0]/n2</input>
|
||||
<c1>2.25</c1>
|
||||
<output>/engines/engine[0]/n2-actual</output>
|
||||
<output>/engines/engine[3]/n2</output>
|
||||
</lag_filter>
|
||||
|
||||
<lag_filter name="fcs/n2-actual2">
|
||||
<input>/engines/engine[1]/n2</input>
|
||||
<c1>2.25</c1>
|
||||
<output>/engines/engine[1]/n2-actual</output>
|
||||
<output>/engines/engine[4]/n2</output>
|
||||
</lag_filter>
|
||||
<channel name="FADEC"> <!-- Redo it later -->
|
||||
|
||||
<lag_filter name="fcs/throttle-lever[0]">
|
||||
<input>/controls/engines/engine[0]/throttle-lever</input>
|
||||
|
|
|
@ -107,6 +107,18 @@
|
|||
<input>/controls/flight/speedbrake-arm</input>
|
||||
<c1>20</c1>
|
||||
</lag_filter>
|
||||
|
||||
<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>
|
||||
|
||||
|
@ -130,9 +142,19 @@
|
|||
<gain>50.0</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>35</rate_limit>
|
||||
<rate_limit>hydraulics/spoiler-l1/rate</rate_limit>
|
||||
<lag>26.5</lag>
|
||||
<output>hydraulics/spoiler-l1/final-deg</output>
|
||||
</actuator>
|
||||
|
@ -238,9 +260,19 @@
|
|||
<gain>50.0</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>35</rate_limit>
|
||||
<rate_limit>hydraulics/spoiler-l2/rate</rate_limit>
|
||||
<lag>26.5</lag>
|
||||
<output>hydraulics/spoiler-l2/final-deg</output>
|
||||
</actuator>
|
||||
|
@ -297,13 +329,13 @@
|
|||
<switch name="hydraulics/spoiler-l3/switch">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="hydraulics/spoiler-l3/air-extended">
|
||||
/systems/hydraulic/yellow-psi ge 1500
|
||||
/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/yellow-psi ge 1500
|
||||
/systems/hydraulic/blue-psi ge 1500
|
||||
spoilers/main-gear-and eq 1
|
||||
/systems/failures/spoilers/spoiler-l3 eq 0
|
||||
spoilers/main-cmd gt 0
|
||||
|
@ -324,9 +356,19 @@
|
|||
<gain>50.0</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>35</rate_limit>
|
||||
<rate_limit>hydraulics/spoiler-l3/rate</rate_limit>
|
||||
<lag>26.5</lag>
|
||||
<output>hydraulics/spoiler-l3/final-deg</output>
|
||||
</actuator>
|
||||
|
@ -395,7 +437,7 @@
|
|||
spoilers/main-cmd gt 0
|
||||
</test>
|
||||
<test logic="AND" value="hydraulics/spoiler-l4/retracted">
|
||||
/systems/hydraulic/blue-psi ge 1500
|
||||
/systems/hydraulic/yellow-psi ge 1500
|
||||
/systems/failures/spoilers/spoiler-l4 eq 0
|
||||
spoilers/main-cmd eq 0
|
||||
</test>
|
||||
|
@ -410,9 +452,19 @@
|
|||
<gain>50.0</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>35</rate_limit>
|
||||
<rate_limit>hydraulics/spoiler-l4/rate</rate_limit>
|
||||
<lag>26.5</lag>
|
||||
<output>hydraulics/spoiler-l4/final-deg</output>
|
||||
</actuator>
|
||||
|
@ -472,9 +524,19 @@
|
|||
<gain>50.0</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>35</rate_limit>
|
||||
<rate_limit>hydraulics/spoiler-l5/rate</rate_limit>
|
||||
<lag>26.5</lag>
|
||||
<output>hydraulics/spoiler-l5/final-deg</output>
|
||||
</actuator>
|
||||
|
@ -501,9 +563,19 @@
|
|||
<gain>50.0</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>35</rate_limit>
|
||||
<rate_limit>hydraulics/spoiler-r1/rate</rate_limit>
|
||||
<lag>26.5</lag>
|
||||
<output>hydraulics/spoiler-r1/final-deg</output>
|
||||
</actuator>
|
||||
|
@ -609,9 +681,19 @@
|
|||
<gain>50.0</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>35</rate_limit>
|
||||
<rate_limit>hydraulics/spoiler-r2/rate</rate_limit>
|
||||
<lag>26.5</lag>
|
||||
<output>hydraulics/spoiler-r2/final-deg</output>
|
||||
</actuator>
|
||||
|
@ -668,13 +750,13 @@
|
|||
<switch name="hydraulics/spoiler-r3/switch">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="hydraulics/spoiler-r3/air-extended">
|
||||
/systems/hydraulic/yellow-psi ge 1500
|
||||
/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/yellow-psi ge 1500
|
||||
/systems/hydraulic/blue-psi ge 1500
|
||||
spoilers/main-gear-and eq 1
|
||||
/systems/failures/spoilers/spoiler-r3 eq 0
|
||||
spoilers/main-cmd gt 0
|
||||
|
@ -695,9 +777,19 @@
|
|||
<gain>50.0</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>35</rate_limit>
|
||||
<rate_limit>hydraulics/spoiler-r3/rate</rate_limit>
|
||||
<lag>26.5</lag>
|
||||
<output>hydraulics/spoiler-r3/final-deg</output>
|
||||
</actuator>
|
||||
|
@ -766,7 +858,7 @@
|
|||
spoilers/main-cmd gt 0
|
||||
</test>
|
||||
<test logic="AND" value="hydraulics/spoiler-r4/retracted">
|
||||
/systems/hydraulic/blue-psi ge 1500
|
||||
/systems/hydraulic/yellow-psi ge 1500
|
||||
/systems/failures/spoilers/spoiler-r4 eq 0
|
||||
spoilers/main-cmd eq 0
|
||||
</test>
|
||||
|
@ -781,9 +873,19 @@
|
|||
<gain>50.0</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>35</rate_limit>
|
||||
<rate_limit>hydraulics/spoiler-r4/rate</rate_limit>
|
||||
<lag>26.5</lag>
|
||||
<output>hydraulics/spoiler-r4/final-deg</output>
|
||||
</actuator>
|
||||
|
@ -843,9 +945,19 @@
|
|||
<gain>50.0</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>35</rate_limit>
|
||||
<rate_limit>hydraulics/spoiler-r5/rate</rate_limit>
|
||||
<lag>26.5</lag>
|
||||
<output>hydraulics/spoiler-r5/final-deg</output>
|
||||
</actuator>
|
||||
|
|
|
@ -32,22 +32,6 @@
|
|||
<filter-gain>0.0</filter-gain>
|
||||
</predict-simple>
|
||||
|
||||
<filter>
|
||||
<name>FF 1</name>
|
||||
<type>exponential</type>
|
||||
<input>/engines/engine[0]/fuel-flow_pph</input>
|
||||
<output>/engines/engine[0]/fuel-flow_actual</output>
|
||||
<filter-time>0.32</filter-time>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>FF 2</name>
|
||||
<type>exponential</type>
|
||||
<input>/engines/engine[1]/fuel-flow_pph</input>
|
||||
<output>/engines/engine[1]/fuel-flow_actual</output>
|
||||
<filter-time>0.32</filter-time>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>OIL PSI 1</name>
|
||||
<type>gain</type>
|
||||
|
@ -230,62 +214,6 @@
|
|||
<max>99</max>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Throttle L</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/controls/engines/engine[0]/reverser</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/controls/engines/engine[0]/throttle</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/controls/engines/engine[0]/reverser</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<value>0</value>
|
||||
</input>
|
||||
<output>
|
||||
<property>/controls/engines/engine[0]/throttle-lever</property>
|
||||
<property>/controls/engines/engine[0]/throttle-pos</property>
|
||||
</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Throttle R</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/controls/engines/engine[1]/reverser</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/controls/engines/engine[1]/throttle</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/controls/engines/engine[1]/reverser</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<value>0</value>
|
||||
</input>
|
||||
<output>
|
||||
<property>/controls/engines/engine[1]/throttle-lever</property>
|
||||
<property>/controls/engines/engine[1]/throttle-pos</property>
|
||||
</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Target Pressurize Altitude CMD</name>
|
||||
<type>gain</type>
|
||||
|
|
|
@ -271,7 +271,7 @@
|
|||
</condition>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/engines/engine[0]/n1-actual-cmd</property>
|
||||
<property>/fdm/jsbsim/fadec/control-1/lever-n1</property>
|
||||
<entry><ind> 20.0</ind><dep>-131</dep></entry>
|
||||
<entry><ind> 50.0</ind><dep> -64</dep></entry>
|
||||
<entry><ind>100.0</ind><dep> 48</dep></entry>
|
||||
|
@ -353,7 +353,7 @@
|
|||
</condition>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/engines/engine[1]/n1-actual-cmd</property>
|
||||
<property>/fdm/jsbsim/fadec/control-2/lever-n1</property>
|
||||
<entry><ind> 20.0</ind><dep>-131</dep></entry>
|
||||
<entry><ind> 50.0</ind><dep> -64</dep></entry>
|
||||
<entry><ind>100.0</ind><dep> 48</dep></entry>
|
||||
|
|
Loading…
Add table
Reference in a new issue