1
0
Fork 0

Control: Make Alpha Floor and Toga Lk work, DU: fix the a floor message on ECAM

This commit is contained in:
Josh Davidson 2021-05-16 13:18:18 -04:00
parent 04c6dd0312
commit ebcab7f21d
5 changed files with 129 additions and 37 deletions

View file

@ -12,7 +12,7 @@
viewBox="0 0 1024 1024"
version="1.1"
id="svg2"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
inkscape:version="0.91 r13725"
sodipodi:docname="cfm-eis2.svg">
<metadata
id="metadata375">
@ -37,14 +37,14 @@
guidetolerance="10"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="705"
inkscape:window-width="1920"
inkscape:window-height="1030"
id="namedview371"
showgrid="true"
inkscape:zoom="0.25"
inkscape:cx="971.41703"
inkscape:cy="1420.8195"
inkscape:window-x="-8"
inkscape:zoom="2.8284271"
inkscape:cx="267.87446"
inkscape:cy="1220.4634"
inkscape:window-x="1592"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
@ -1428,19 +1428,6 @@
width="137.63597"
id="SlatLine_clip"
style="opacity:0.5;fill:none;fill-opacity:1;stroke:none;stroke-width:3.34691048;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.71383667px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.7928459"
x="38.122616"
y="47.904297"
id="aFloor"
transform="scale(0.94595932,1.0571279)"
inkscape:label="#text1027"><tspan
sodipodi:role="line"
id="tspan1025"
x="38.122616"
y="47.904297"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:39.99999902px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#c56100;fill-opacity:1;stroke-width:0.7928459">A FLOOR</tspan></text>
<text
transform="scale(0.97051272,1.0303832)"
inkscape:label="#text4314"
@ -1467,4 +1454,18 @@
x="1061.88"
id="tspan1033"
sodipodi:role="line">°C</tspan></text>
<text
inkscape:label="#text4447"
id="aFloor"
y="44.548805"
x="111.21719"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#c56100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
xml:space="preserve"
transform="scale(0.87983286,1.1365795)"
sodipodi:linespacing="0%"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#c56100;fill-opacity:1;"
y="44.548805"
x="111.21719"
id="tspan3554"
sodipodi:role="line">A FLOOR</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

View file

@ -1796,19 +1796,6 @@
width="137.63597"
id="SlatLine_clip"
style="opacity:0.5;fill:none;fill-opacity:1;stroke:none;stroke-width:3.34691048;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.71383667px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.7928459"
x="38.122616"
y="47.904297"
id="aFloor"
transform="scale(0.94595932,1.0571279)"
inkscape:label="#text1027"><tspan
sodipodi:role="line"
id="tspan1025"
x="38.122616"
y="47.904297"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:39.99999902px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#c56100;fill-opacity:1;stroke-width:0.7928459">A FLOOR</tspan></text>
<text
transform="scale(0.97051272,1.0303832)"
inkscape:label="#text4314"
@ -1835,4 +1822,18 @@
x="1061.88"
id="tspan1033"
sodipodi:role="line">°C</tspan></text>
<text
inkscape:label="#text4447"
id="aFloor"
y="44.548805"
x="111.21719"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#c56100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
xml:space="preserve"
transform="scale(0.87983286,1.1365795)"
sodipodi:linespacing="0%"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#c56100;fill-opacity:1;"
y="44.548805"
x="111.21719"
id="tspan3554"
sodipodi:role="line">A FLOOR</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 112 KiB

View file

@ -9,6 +9,7 @@ if (pts.Options.eng.getValue() == "IAE") {
var FADEC = {
alphaFloor: props.globals.getNode("/fdm/jsbsim/fadec/alpha-floor"),
alphaFloorSwitch: props.globals.getNode("/fdm/jsbsim/fadec/alpha-floor-switch"),
clbReduc: props.globals.getNode("/fdm/jsbsim/fadec/clbreduc-ft"),
detent: [props.globals.getNode("/fdm/jsbsim/fadec/control-1/detent", 1), props.globals.getNode("/fdm/jsbsim/fadec/control-2/detent", 1)],
detentTemp: [0, 0],
@ -140,7 +141,9 @@ var FADEC = {
me.engOutTemp = me.engOut.getValue();
if (me.detentTextTemp[0] == "CL" and me.detentTextTemp[1] == "CL" and !me.engOutTemp) {
if (me.alphaFloorSwitch.getValue() > 0) {
me.lvrClb.setValue(0);
} else if (me.detentTextTemp[0] == "CL" and me.detentTextTemp[1] == "CL" and !me.engOutTemp) {
me.lvrClb.setValue(0);
} else if (((me.detentTextTemp[0] == "MCT" and pts.Engines.Engine.stateTemp[0] == 3) or (me.detentTextTemp[1] == "MCT" and pts.Engines.Engine.stateTemp[1] == 3)) and !me.Limit.flexActive.getBoolValue() and me.engOut.getValue()) {
me.lvrClb.setValue(0);
@ -193,6 +196,11 @@ setlistener("/fdm/jsbsim/fadec/control-2/detent", func() {
setlistener("/fdm/jsbsim/fadec/limit/active-mode-int", func() {
FADEC.updateTxt();
}, 0, 0);
setlistener("/fdm/jsbsim/fadec/alpha-floor-switch", func() {
if (FADEC.alphaFloorSwitch.getValue() == 2) {
fmgc.ITAF.athrMaster(1);
}
}, 0, 0);
var lockThr = func() {
state1 = systems.FADEC.detentText[0].getValue();

View file

@ -1004,6 +1004,74 @@
</test>
</switch>
<!-- Alpha Floor and Toga Lk -->
<switch name="fadec/alpha-floor-engage">
<default value="9.5"/>
<test logic="OR" value="15">
/controls/flight/flaps-pos eq 1
/controls/flight/flaps-pos eq 2
/controls/flight/flaps-pos eq 3
</test>
<test value="14">
/controls/flight/flaps-pos eq 4
</test>
<test value="13">
/controls/flight/flaps-pos eq 5
</test>
</switch>
<switch name="fadec/alpha-floor-disengage">
<default value="8"/>
<test logic="OR" value="13">
/controls/flight/flaps-pos eq 1
/controls/flight/flaps-pos eq 2
/controls/flight/flaps-pos eq 3
</test>
<test value="12">
/controls/flight/flaps-pos eq 4
</test>
<test value="11">
/controls/flight/flaps-pos eq 5
</test>
</switch>
<switch name="fadec/alpha-floor-switch">
<default value="fadec/alpha-floor-switch"/>
<test logic="OR" value="0"> <!-- Reset -->
position/wow eq 1
/it-fbw/law ne 0
</test>
<test logic="AND" value="0"> <!-- Reset -->
fadec/eng-out eq 1
/controls/flight/flaps-pos ne 0
</test>
<test logic="AND" value="0"> <!-- Reset only in Toga Lk -->
fadec/alpha-floor-switch eq 1
/it-autoflight/output/athr eq 0
</test>
<test value="2"> <!-- Alpha Floor -->
aero/alpha-deg-damped gt fadec/alpha-floor-engage
</test>
<test logic="AND" value="1"> <!-- Toga Lk -->
fadec/alpha-floor-switch eq 2
aero/alpha-deg-damped lt fadec/alpha-floor-disengage
</test>
</switch>
<switch name="fadec/alpha-floor">
<default value="0"/>
<test value="1">
fadec/alpha-floor-switch eq 2
</test>
</switch>
<switch name="fadec/toga-lk">
<default value="0"/>
<test value="1">
fadec/alpha-floor-switch eq 1
</test>
</switch>
<!-- Common Control Logic -->
<fcs_function name="fadec/both-at-idle">
<function>
@ -1050,9 +1118,9 @@
/controls/engines/engine[0]/reverse-cmd eq 1
/controls/engines/engine[1]/reverse-cmd eq 1
</test>
<!--test logic="OR" value="0"> TOGA
alpha floor or toga lk
</test-->
<test value="0"> <!-- TOGA -->
fadec/alpha-floor-switch gt 0
</test>
<test logic="AND" value="2"> <!-- CLB -->
fadec/max-detent le 2
fadec/limit/eng-off-wow-switch eq 0
@ -1118,6 +1186,9 @@
<switch name="fadec/athr/active">
<default value="0"/>
<test value="0">
fadec/alpha-floor-switch gt 0
</test>
<test logic="AND" value="1">
/it-autoflight/output/athr eq 1
fadec/eng-out eq 1
@ -1186,6 +1257,9 @@
<test value="fadec/reverse-1/throttle-rev">
fadec/reverse-1/position-norm ne 0
</test>
<test value="fadec/limit/toga-norm">
fadec/alpha-floor-switch gt 0
</test>
<test value="fadec/thr-locked-norm">
fadec/thr-locked eq 1
</test>
@ -1217,6 +1291,9 @@
<test value="fadec/reverse-2/throttle-rev">
fadec/reverse-2/position-norm ne 0
</test>
<test value="fadec/limit/toga-norm">
fadec/alpha-floor-switch gt 0
</test>
<test value="fadec/thr-locked-norm">
fadec/thr-locked eq 1
</test>

View file

@ -14,6 +14,11 @@
</test>
</switch>
<lag_filter name="aero/alpha-deg-damped">
<input>aero/alpha-deg-norm</input>
<c1>10</c1>
</lag_filter>
<switch name="position/wow">
<default value="0"/>
<test logic="OR" value="1">