FMGC: Add envelope protection laws to Autopilot V/S and FPA modes
This commit is contained in:
parent
1d17fb8618
commit
61b0d4bfb0
4 changed files with 291 additions and 18 deletions
|
@ -799,23 +799,26 @@
|
|||
</weight>
|
||||
</payload>
|
||||
|
||||
<it-autoflight>
|
||||
<config>
|
||||
<altitude-dial-mode>0</altitude-dial-mode>
|
||||
<it-autoflight n="0">
|
||||
<config n="0">
|
||||
<altitude-dial-mode type="bool">0</altitude-dial-mode>
|
||||
</config>
|
||||
<output>
|
||||
<ap1>0</ap1>
|
||||
<ap2>0</ap2>
|
||||
<lat>0</lat>
|
||||
<vert>0</vert>
|
||||
<input n="0">
|
||||
<kts type="int">100</kts>
|
||||
</input>
|
||||
<output n="0">
|
||||
<ap1 type="bool">0</ap1>
|
||||
<ap2 type="bool">0</ap2>
|
||||
<lat type="int">0</lat>
|
||||
<vert type="int">0</vert>
|
||||
</output>
|
||||
<custom>
|
||||
<show-hdg>0</show-hdg>
|
||||
<trk-fpa>0</trk-fpa>
|
||||
<hdg-knb>0</hdg-knb>
|
||||
<spd-knb>0</spd-knb>
|
||||
<alt-knb>0</alt-knb>
|
||||
<vs-knb>0</vs-knb>
|
||||
<custom n="0">
|
||||
<alt-knb type="int">0</alt-knb>
|
||||
<hdg-knb type="int">0</hdg-knb>
|
||||
<show-hdg type="bool">0</show-hdg>
|
||||
<spd-knb type="int">0</spd-knb>
|
||||
<trk-fpa type="bool">0</trk-fpa>
|
||||
<vs-knb type="int">0</vs-knb>
|
||||
</custom>
|
||||
</it-autoflight>
|
||||
|
||||
|
|
|
@ -33,6 +33,15 @@
|
|||
</test>
|
||||
</switch>
|
||||
|
||||
<fcs_function name="/FMGC/internal/vmo-mmo-minus-5">
|
||||
<function>
|
||||
<sum>
|
||||
<property>/FMGC/internal/vmo-mmo</property>
|
||||
<value>-5</value>
|
||||
</sum>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="/FMGC/internal/vmo-mmo-plus-6">
|
||||
<function>
|
||||
<sum>
|
||||
|
@ -606,6 +615,55 @@
|
|||
|
||||
<channel name="FMGC Misc" execrate="8">
|
||||
|
||||
<summer name="/it-autoflight/internal/vmo-mmo-error">
|
||||
<input>/instrumentation/airspeed-indicator/indicated-speed-kt</input>
|
||||
<input>-/FMGC/internal/vmo-mmo</input>
|
||||
<clipto>
|
||||
<min>-5</min>
|
||||
<max>5</max>
|
||||
</clipto>
|
||||
</summer>
|
||||
|
||||
<fcs_function name="/FMGC/internal/vls-switched-plus-5">
|
||||
<function>
|
||||
<ifthen>
|
||||
<le>
|
||||
<property>/it-autoflight/input/kts</property>
|
||||
<property>/FMGC/internal/vls</property>
|
||||
</le>
|
||||
<property>/FMGC/internal/vls</property> <!-- Engage at VLS for VLS - 5 -->
|
||||
<sum> <!-- Engage at VLS + 5 for VLS -->
|
||||
<property>/FMGC/internal/vls</property>
|
||||
<value>5</value>
|
||||
</sum>
|
||||
</ifthen>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="/it-autoflight/internal/vls-error">
|
||||
<function>
|
||||
<ifthen>
|
||||
<le>
|
||||
<property>/it-autoflight/input/kts</property>
|
||||
<property>/FMGC/internal/vls</property>
|
||||
</le>
|
||||
<difference>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
|
||||
<value>-5</value> <!-- Intentional double negative -->
|
||||
<property>/FMGC/internal/vls</property>
|
||||
</difference>
|
||||
<difference>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
|
||||
<property>/FMGC/internal/vls</property>
|
||||
</difference>
|
||||
</ifthen>
|
||||
</function>
|
||||
<clipto>
|
||||
<min>-5</min>
|
||||
<max>5</max>
|
||||
</clipto>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="/systems/fmgc/cas-compare/cas-1-to-3">
|
||||
<function>
|
||||
<abs>
|
||||
|
|
|
@ -497,12 +497,166 @@
|
|||
<output>/it-autoflight/input/vs</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Vertical Speed VMO Protection</name>
|
||||
<type>gain</type>
|
||||
<input>
|
||||
<expression>
|
||||
<div>
|
||||
<product>
|
||||
<property>/instrumentation/airspeed-indicator/true-speed-kt</property>
|
||||
<value>101.26859142607174</value> <!-- FPM to Knot -->
|
||||
<dif>
|
||||
<product>
|
||||
<property>/fdm/jsbsim/forces/fbx-prop-lbs</property>
|
||||
<cos>
|
||||
<property>/fdm/jsbsim/aero/alpha-rad</property>
|
||||
</cos>
|
||||
</product>
|
||||
<product>
|
||||
<property>/fdm/jsbsim/forces/fwx-aero-lbs</property>
|
||||
<sum>
|
||||
<value>1</value>
|
||||
<product>
|
||||
<property>/it-autoflight/internal/vmo-mmo-error</property>
|
||||
<value>-0.1</value>
|
||||
</product>
|
||||
</sum>
|
||||
</product>
|
||||
</dif>
|
||||
</product>
|
||||
<property>/fdm/jsbsim/inertia/weight-lbs</property>
|
||||
</div>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/it-autoflight/internal/overspeed-vs</output>
|
||||
<min>-6000</min>
|
||||
<max>6000</max>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Vertical Speed VLS Protection</name>
|
||||
<type>gain</type>
|
||||
<input>
|
||||
<expression>
|
||||
<div>
|
||||
<product>
|
||||
<property>/instrumentation/airspeed-indicator/true-speed-kt</property>
|
||||
<value>101.26859142607174</value> <!-- FPM to Knot -->
|
||||
<dif>
|
||||
<product>
|
||||
<property>/fdm/jsbsim/forces/fbx-prop-lbs</property>
|
||||
<cos>
|
||||
<property>/fdm/jsbsim/aero/alpha-rad</property>
|
||||
</cos>
|
||||
</product>
|
||||
<product>
|
||||
<property>/fdm/jsbsim/forces/fwx-aero-lbs</property>
|
||||
<sum>
|
||||
<value>1</value>
|
||||
<product>
|
||||
<property>/it-autoflight/internal/vls-error</property>
|
||||
<value>-0.1</value>
|
||||
</product>
|
||||
</sum>
|
||||
</product>
|
||||
</dif>
|
||||
</product>
|
||||
<property>/fdm/jsbsim/inertia/weight-lbs</property>
|
||||
</div>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/it-autoflight/internal/underspeed-vs</output>
|
||||
<min>-6000</min>
|
||||
<max>6000</max>
|
||||
</filter>
|
||||
|
||||
<logic>
|
||||
<input>
|
||||
<and>
|
||||
<greater-than>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
|
||||
<property>/FMGC/internal/vmo-mmo-minus-5</property>
|
||||
</greater-than>
|
||||
<or>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<greater-than>
|
||||
<property>/it-autoflight/internal/overspeed-vs</property>
|
||||
<property>/it-autoflight/input/vs</property>
|
||||
</greater-than>
|
||||
</and>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>5</value>
|
||||
</equals>
|
||||
<greater-than>
|
||||
<property>/it-autoflight/internal/overspeed-vs</property>
|
||||
<property>/it-autoflight/internal/target-fpm-fpa-raw</property>
|
||||
</greater-than>
|
||||
</and>
|
||||
</or>
|
||||
</and>
|
||||
</input>
|
||||
<output>/it-autoflight/internal/overspeed-vs-prot</output>
|
||||
</logic>
|
||||
|
||||
<logic>
|
||||
<input>
|
||||
<and>
|
||||
<less-than>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
|
||||
<property>/FMGC/internal/vls-switched-plus-5</property>
|
||||
</less-than>
|
||||
<or>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<less-than>
|
||||
<property>/it-autoflight/internal/underspeed-vs</property>
|
||||
<property>/it-autoflight/input/vs</property>
|
||||
</less-than>
|
||||
</and>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>5</value>
|
||||
</equals>
|
||||
<less-than>
|
||||
<property>/it-autoflight/internal/underspeed-vs</property>
|
||||
<property>/it-autoflight/internal/target-fpm-fpa-raw</property>
|
||||
</less-than>
|
||||
</and>
|
||||
</or>
|
||||
</and>
|
||||
</input>
|
||||
<output>/it-autoflight/internal/underspeed-vs-prot</output>
|
||||
</logic>
|
||||
|
||||
<filter>
|
||||
<name>Vertical Speed Filter</name>
|
||||
<debug>false</debug>
|
||||
<type>noise-spike</type>
|
||||
<feedback-if-disabled>true</feedback-if-disabled>
|
||||
<initialize-to>output</initialize-to>
|
||||
<input>
|
||||
<condition>
|
||||
<property>/it-autoflight/internal/overspeed-vs-prot</property>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/overspeed-vs</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<property>/it-autoflight/internal/underspeed-vs-prot</property>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/underspeed-vs</property>
|
||||
</input>
|
||||
<input>/it-autoflight/input/vs</input>
|
||||
<output>/it-autoflight/internal/vs</output>
|
||||
<max-rate-of-change>
|
||||
|
@ -518,6 +672,8 @@
|
|||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
<not><property>/it-autoflight/internal/overspeed-vs-prot</property></not>
|
||||
<not><property>/it-autoflight/internal/underspeed-vs-prot</property></not>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>1</value>
|
||||
|
|
|
@ -265,11 +265,27 @@
|
|||
<filter>
|
||||
<name>FPA FPM Filter</name>
|
||||
<type>noise-spike</type>
|
||||
<input>
|
||||
<condition>
|
||||
<property>/it-autoflight/internal/overspeed-vs-prot</property>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/overspeed-vs</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<property>/it-autoflight/internal/underspeed-vs-prot</property>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/underspeed-vs</property>
|
||||
</input>
|
||||
<input>/it-autoflight/internal/target-fpm-fpa-raw</input>
|
||||
<output>/it-autoflight/internal/target-fpm-fpa</output>
|
||||
<max-rate-of-change>
|
||||
<condition>
|
||||
<not><property>/it-autoflight/internal/fpa-active</property></not>
|
||||
<or>
|
||||
<not><property>/it-autoflight/internal/fpa-active</property></not>
|
||||
<property>/it-autoflight/internal/overspeed-vs-prot</property>
|
||||
<property>/it-autoflight/internal/underspeed-vs-prot</property>
|
||||
</or>
|
||||
</condition>
|
||||
<value>10000</value>
|
||||
</max-rate-of-change>
|
||||
|
@ -355,6 +371,46 @@
|
|||
<max>0</max>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Vertical Speed FD Input</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<condition>
|
||||
<property>/it-autoflight/internal/overspeed-vs-prot</property>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/overspeed-vs</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<property>/it-autoflight/internal/underspeed-vs-prot</property>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/underspeed-vs</property>
|
||||
</input>
|
||||
<input>/it-autoflight/input/vs</input>
|
||||
<output>/it-autoflight/internal/vs-fd</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>FPA FD Input</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<condition>
|
||||
<property>/it-autoflight/internal/overspeed-vs-prot</property>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/overspeed-vs</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<property>/it-autoflight/internal/underspeed-vs-prot</property>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/underspeed-vs</property>
|
||||
</input>
|
||||
<input>/it-autoflight/internal/target-fpm-fpa-raw</input>
|
||||
<output>/it-autoflight/internal/fpa-fd</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Target FPM</name>
|
||||
<debug>false</debug>
|
||||
|
@ -376,7 +432,7 @@
|
|||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/input/vs</property>
|
||||
<property>/it-autoflight/internal/vs-fd</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
|
@ -409,7 +465,7 @@
|
|||
<value>5</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/target-fpm-fpa-raw</property>
|
||||
<property>/it-autoflight/internal/fpa-fd</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
|
|
Loading…
Add table
Reference in a new issue