Improve canard, cone, gear damage logic.

parent 091af7eb
......@@ -371,7 +371,10 @@
<property>/sim/multiplay/generic/bool[71]</property>
</output>
<input>
<property>/fdm/jsbsim/fcs/cone/damage/break</property>
<greater-than>
<property>/fdm/jsbsim/fcs/cone/damage</property>
<value>2</value>
</greater-than>
</input>
</logic>
......
......@@ -499,7 +499,7 @@
<independentVar lookup="column">gear/pos-timer-norm</independentVar>
<tableData>
0.1 1.0
0.227 1.0 0.0
0.2 1.0 0.0
1.0 0.0 0.0
</tableData>
</table>
......@@ -1386,6 +1386,9 @@
<test value="10.0">
simulation/sim-time-sec LT 1.0
</test>
<test value="0.0">
fcs/canard/damage/jam NE 0
</test>
<test value="0.0455">
simulation/external-actuation NE 0
</test>
......@@ -1393,7 +1396,6 @@
fcs/panel/switch/canard-power EQ 0
systems/elec/DC27-reserve/U-ok EQ 0
systems/elec/AC115/U-ok EQ 0
fcs/canard/damage/jam NE 0
</test>
</switch>
......@@ -1444,7 +1446,6 @@
<table>
<independentVar lookup="row">fcs/canard/pos-norm</independentVar>
<tableData>
<!--0.227 90-->
0.0 90 <!-- Recording shows that deadband included [Bliznyuk p. 202] -->
1.0 0
</tableData>
......@@ -1457,6 +1458,7 @@
<channel name="Canard damage" execrate="16">
<!-- 1: temporary, 2: permanent -->
<switch name="fcs/canard/damage/jam">
<default value="fcs/canard/damage/jam"/>
<test logic="OR" value="0">
......@@ -1464,17 +1466,36 @@
<!-- Because WOW of the contact point is true at startup.. -->
simulation/init NE 0
</test>
<test logic="AND" value="1">
fcs/canard/pos-norm GT 0.227
fcs/canard/pos-norm LT 1.0
systems/pitot-static/V/Vind-ideal-km_h GT 600.0
</test>
<test logic="OR" value="1">
<test logic="OR" value="2">
fcs/canard/damage/break[0] NE 0
fcs/canard/damage/break[1] NE 0
gear/unit[21]/WOW NE 0
gear/unit[22]/WOW NE 0
</test>
<test logic="AND" value="0">
fcs/canard/pos-norm LT 0.5
fcs/canard/damage/jam NE 2
</test>
<test value="2">
systems/pitot-static/V/Vind-ideal-km_h GT 600.0
</test>
<test value="2">
fcs/canard/damage/jam EQ 2
</test>
<test value="1">
systems/pitot-static/V/Vind-ideal-km_h GT 460.0
</test>
<test logic="AND" value="1">
fcs/canard/error-norm GT 0.0
systems/pitot-static/V/Vind-ideal-km_h GT 420.0
</test>
<test value="0">
systems/pitot-static/V/Vind-ideal-km_h LT 400.0
</test>
<test logic="AND" value="0">
fcs/canard/error-norm LT 0.0
systems/pitot-static/V/Vind-ideal-km_h LT 440.0
</test>
</switch>
<switch name="fcs/canard/damage/break[0]">
......@@ -1483,13 +1504,12 @@
simulation/repair NE 0
<!-- Because WOW of the contact point is true at startup.. -->
simulation/init NE 0
fcs/canard/pos-norm LT 0.5
</test>
<test logic="AND" value="1">
fcs/canard/pos-norm GT 0.5
systems/pitot-static/V/Vind-ideal-km_h GT 880.0
<test value="1">
systems/pitot-static/V/Vind-ideal-km_h GT 800.0
</test>
<test logic="AND" value="1">
fcs/canard/pos-norm GT 0.5
gear/unit[21]/WOW NE 0
<!-- 50 km/h -->
gear/unit[21]/wheel-speed-fps GT 45.6
......@@ -1502,13 +1522,12 @@
simulation/repair NE 0
<!-- Because WOW of the contact point is true at startup.. -->
simulation/init NE 0
fcs/canard/pos-norm LT 0.5
</test>
<test logic="AND" value="1">
fcs/canard/pos-norm GT 0.5
systems/pitot-static/V/Vind-ideal-km_h GT 880.0
<test value="1">
systems/pitot-static/V/Vind-ideal-km_h GT 800.0
</test>
<test logic="AND" value="1">
fcs/canard/pos-norm GT 0.5
gear/unit[22]/WOW NE 0
<!-- 50 km/h -->
gear/unit[22]/wheel-speed-fps GT 45.6
......@@ -1597,6 +1616,9 @@
<test value="10.0">
simulation/sim-time-sec LT 1.0
</test>
<test value="0.0">
fcs/cone/damage NE 0
</test>
<test logic="AND" value="0.567">
fcs/panel/lever/cone-emergency-extend NE 0
fcs/cone/nitrogen/target-stored-deg GT fcs/cone/pos-deg
......@@ -1608,7 +1630,6 @@
fcs/panel/switch/cone-power EQ 0
systems/elec/DC27-reserve/U-ok EQ 0
systems/elec/AC115/U-ok EQ 0
fcs/cone/damage/jam NE 0
</test>
</switch>
......@@ -1647,11 +1668,12 @@
<p>fcs/cone/pos-deg</p>
</toradians>
</sin>
<lt>
<p>fcs/cone/damage</p>
<v>3</v>
</lt>
<!-- = 1 / sin(17 deg) -->
<v>3.4203036198332684</v>
<not>
<p>fcs/cone/damage/break</p>
</not>
</product>
</function>
</fcs_function>
......@@ -1661,47 +1683,54 @@
<channel name="Cone damage" execrate="16">
<switch name="fcs/cone/damage/jam">
<default value="fcs/cone/damage/jam"/>
<!-- 1: temporarily jam, 2: jam, 3: break -->
<switch name="fcs/cone/damage">
<default value="fcs/cone/damage"/>
<test logic="OR" value="0">
simulation/repair NE 0
<!-- Because WOW of the contact point is true at startup.. -->
simulation/init NE 0
fcs/cone/pos-deg LT 1.0
</test>
<test logic="AND" value="1">
<test logic="AND" value="3">
fcs/cone/pos-deg GT 12.0
systems/pitot-static/V/Vind-ideal-km_h GT 600.0
</test>
<test logic="AND" value="1">
fcs/cone/pos-deg GT 1.0
systems/pitot-static/V/Vind-ideal-km_h GT 870.0
systems/pitot-static/V/Vind-ideal-km_h GT 900.0
</test>
<test logic="OR" value="1">
fcs/cone/damage/break NE 0
<test logic="AND" value="3">
fcs/cone/pos-deg GT 5.0
gear/unit[23]/WOW NE 0
<!-- 30 km/h -->
gear/unit[23]/wheel-speed-fps GT 27.3
</test>
</switch>
<switch name="fcs/cone/damage/break">
<default value="fcs/cone/damage/break"/>
<test logic="OR" value="0">
simulation/repair NE 0
<!-- Because WOW of the contact point is true at startup.. -->
simulation/init NE 0
<test value="3">
fcs/cone/damage EQ 3
</test>
<test logic="AND" value="1">
fcs/cone/pos-deg GT 12.0
<test logic="OR" value="2">
systems/pitot-static/V/Vind-ideal-km_h GT 800.0
gear/unit[23]/WOW NE 0
</test>
<test logic="AND" value="2">
fcs/cone/pos-deg GT 12.0
systems/pitot-static/V/Vind-ideal-km_h GT 600.0
</test>
<test value="2">
fcs/cone/damage EQ 2
</test>
<test logic="AND" value="1">
fcs/cone/pos-deg GT 1.0
systems/pitot-static/V/Vind-ideal-km_h GT 1300.0
fcs/cone/error-deg LT 0.0
systems/pitot-static/V/Vind-ideal-km_h GT 750.0
</test>
<test logic="AND" value="1">
fcs/cone/pos-deg GT 5.0
gear/unit[23]/WOW NE 0
<!-- 30 km/h -->
gear/unit[23]/wheel-speed-fps GT 27.3
fcs/cone/error-deg LT 0.0
fcs/cone/pos-deg GT 12.0
systems/pitot-static/V/Vind-ideal-km_h GT 500.0
</test>
<test value="0">
systems/pitot-static/V/Vind-ideal-km_h LT 450.0
</test>
<test logic="AND" value="0">
fcs/cone/pos-deg LT 12.0
systems/pitot-static/V/Vind-ideal-km_h LT 700.0
</test>
</switch>
......@@ -2058,13 +2087,14 @@
gear/unit[0]/compression-ft GT 1.969
</test>
<test value="2">
systems/pitot-static/V/Vind-ideal-km_h GT 550.0
systems/pitot-static/V/Vind-ideal-km_h GT 650.0
</test>
<test value="2">
gear/unit[0]/damage EQ 2
</test>
<test value="1">
systems/pitot-static/V/Vind-ideal-km_h GT 470.0
<test logic="AND" value="1">
gear/unit[0]/func/pos-dot-norm_sec LT 0.0
systems/pitot-static/V/Vind-ideal-km_h GT 472.0
</test>
<test value="0">
systems/pitot-static/V/Vind-ideal-km_h LT 450.0
......@@ -2135,13 +2165,14 @@
gear/unit[1]/compression-ft GT 1.969
</test>
<test value="2">
systems/pitot-static/V/Vind-ideal-km_h GT 555.0
systems/pitot-static/V/Vind-ideal-km_h GT 675.0
</test>
<test value="2">
gear/unit[1]/damage EQ 2
</test>
<test value="1">
systems/pitot-static/V/Vind-ideal-km_h GT 500.0
<test logic="AND" value="1">
gear/unit[1]/func/pos-dot-norm_sec LT 0.0
systems/pitot-static/V/Vind-ideal-km_h GT 477.0
</test>
<test value="0">
systems/pitot-static/V/Vind-ideal-km_h LT 460.0
......@@ -2212,13 +2243,14 @@
gear/unit[2]/compression-ft GT 1.969
</test>
<test value="2">
systems/pitot-static/V/Vind-ideal-km_h GT 560.0
systems/pitot-static/V/Vind-ideal-km_h GT 672.0
</test>
<test value="2">
gear/unit[2]/damage EQ 2
</test>
<test value="1">
systems/pitot-static/V/Vind-ideal-km_h GT 495.0
<test logic="AND" value="1">
gear/unit[2]/func/pos-dot-norm_sec LT 0.0
systems/pitot-static/V/Vind-ideal-km_h GT 479.0
</test>
<test value="0">
systems/pitot-static/V/Vind-ideal-km_h LT 465.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment