Fix gear extension.

parent b7caa35d
......@@ -2,12 +2,6 @@
<PropertyList>
<!--
TODO Different extension speed for each gear.
XXX Do NOT introduce separate timing for gears, make separate filters in the systems instead.
-->
<!--
Раскладка основной опоры шасси
......@@ -612,11 +606,11 @@ pos-norm MlgDoor{0,1} MlgBase MlgStrut MlgHinge
<property>gear/gear[1]/position-norm</property>
<interpolation>
<entry>
<ind>0.7</ind>
<ind>0.85</ind>
<dep>0.0</dep>
</entry>
<entry>
<ind>1.0</ind>
<ind>0.95</ind>
<dep>90.0</dep>
</entry>
</interpolation>
......@@ -1198,11 +1192,11 @@ pos-norm MlgDoor{0,1} MlgBase MlgStrut MlgHinge
<property>gear/gear[2]/position-norm</property>
<interpolation>
<entry>
<ind>0.7</ind>
<ind>0.85</ind>
<dep>0.0</dep>
</entry>
<entry>
<ind>1.0</ind>
<ind>0.95</ind>
<dep>-90.0</dep>
</entry>
</interpolation>
......
......@@ -38,7 +38,7 @@ var _reversers_full = 0;
var _PPM = 0;
var _gearpos = 0;
var _gearpos = 0.0;
var _gear_callout = "gear_out";
var _canardpos = 0;
var _canard_callout = "canard_in";
......@@ -201,7 +201,12 @@ var _loop = func {
}
}
var PPM = getprop("/fdm/jsbsim/fcs/NPK/panel/light/turn");
var gearpos = getprop("/fdm/jsbsim/gear/gear-pos-norm");
var ngear = 0;
var gearpos = 0.0;
for(ii = 0; ii < 4; ii += 1){
gearpos += getprop("/fdm/jsbsim/gear/unit[" ~ ii ~ "]/actuator-norm");
}
gearpos *= 0.25;
var canardpos = getprop("/fdm/jsbsim/fcs/canard/pos-norm");
var engine = 0;
for(ii = 0; ii < 4; ii += 1){
......
......@@ -380,7 +380,10 @@
<property>/sim/multiplay/generic/bool[72]</property>
</output>
<input>
<property>/fdm/jsbsim/gear/unit[0]/damage/break</property>
<greater-than>
<property>/fdm/jsbsim/gear/unit[0]/damage</property>
<value>2</value>
</greater-than>
</input>
</logic>
......@@ -389,7 +392,10 @@
<property>/sim/multiplay/generic/bool[73]</property>
</output>
<input>
<property>/fdm/jsbsim/gear/unit[1]/damage/break</property>
<greater-than>
<property>/fdm/jsbsim/gear/unit[1]/damage</property>
<value>2</value>
</greater-than>
</input>
</logic>
......@@ -398,7 +404,10 @@
<property>/sim/multiplay/generic/bool[74]</property>
</output>
<input>
<property>/fdm/jsbsim/gear/unit[2]/damage/break</property>
<greater-than>
<property>/fdm/jsbsim/gear/unit[2]/damage</property>
<value>2</value>
</greater-than>
</input>
</logic>
......
......@@ -192,7 +192,7 @@ XXX K_PU most likely not meant literally! Such a large value would get clipped l
<property>&ABSU;/column-mm</property>
<property>&ABSU;/trim-inop</property>
<property>&ABSU;/canard-pos-norm</property>
<property>&ABSU;/gear-pos-norm</property>
<property>gear/pos-timer-norm</property>
<property>&U;/hydr/ok[0]</property>
<property>&U;/hydr/ok[1]</property>
......@@ -1030,7 +1030,7 @@ XXX K_PU most likely not meant literally! Such a large value would get clipped l
<switch name="&U;/pitch/K_gamma">
<default value="&U;/pitch/tuning/K_gamma"/>
<test logic="AND" value="&U;/pitch/tuning/K_gamma_add">
&ABSU;/gear-pos-norm GT 0.25
gear/pos-timer-norm GT 0.25
</test>
</switch>
......
......@@ -42,7 +42,7 @@
<property>&NPK;/panel/PSU/switch/turbulence</property>
<property>&ABSU;/gear-pos-norm</property>
<property>gear/pos-timer-norm</property>
<property>&ABSU;/SAU/status/mode/pitch-H</property>
......@@ -62,7 +62,7 @@
<default value="&U;/H/tuning/K"/>
<test logic="OR" value="&U;/H/tuning/K_gnd">
&ABSU;/sensor/RV/ok NE 0
&ABSU;/gear-pos-norm GT 0.25
gear/pos-timer-norm GT 0.25
</test>
</switch>
......
......@@ -43,7 +43,7 @@
<property>fcs/canard/pos-norm</property>
<property>fcs/cone/pos-deg</property>
<property>gear/gear-pos-norm</property>
<property>gear/pos-timer-norm</property>
<property>simulation/init-hotstart-avionics</property>
......@@ -431,7 +431,7 @@
<test logic="OR" value="460.0">
fcs/canard/pos-norm GT 0.0
fcs/cone/pos-deg GT 12.5
gear/gear-pos-norm GT 0.01
gear/pos-timer-norm GT 0.01
</test>
</switch>
......
......@@ -33,7 +33,7 @@
<property>systems/elec/panel/light/DC27-battery-only[1]</property>
<!-- Own sensors -->
<property>gear/gear-pos-norm</property>
<property>gear/pos-timer-norm</property>
<property>&U;/sensor/Habs-dot-m_s</property>
......@@ -260,7 +260,7 @@
&U;/panel/button/repeat NE 0
</test>
<test logic="AND" value="1">
gear/gear-pos-norm EQ 1.0
gear/pos-timer-norm EQ 1.0
&U;/sensor/Habs-dot-m_s LT -0.5
&U;/sensor/RV/decision NE 0
</test>
......
This diff is collapsed.
......@@ -17,7 +17,7 @@
<property>systems/SSOS/Hagl-m</property>
<property>systems/SSOS/V-km_h</property>
<property>gear/gear-pos-norm</property>
<property>gear/pos-timer-norm</property>
<!-- SIC Own sensors: barometric and intertial, also the signal from RV. -->
......@@ -101,7 +101,7 @@
systems/SSOS/panel/switch/test EQ 3
</test>
<test value="0">
gear/gear-pos-norm EQ 1.0
gear/pos-timer-norm EQ 1.0
</test>
<test logic="AND" value="1">
systems/SSOS/Hagl-m LT 250.0
......
......@@ -63,6 +63,12 @@
<property>&U;/nitrogen/gear-P-kgf_cm2</property>
<property>gear/unit[0]/actuator-norm</property>
<property>gear/unit[1]/actuator-norm</property>
<property>gear/unit[2]/actuator-norm</property>
<property>gear/unit[3]/actuator-norm</property>
<property>simulation/init</property>
<property>simulation/init-hotstart-hydr</property>
......@@ -652,14 +658,21 @@
<p>&U;/hs[0]/accumulator-l</p>
<p>&U;/hs[1]/accumulator-l</p>
<p>&U;/emergency-brake/accumulator-l</p>
<product>
<p>gear/unit[0]/actuator-norm</p>
<v>6.0</v>
</product>
<product>
<sum>
<p>gear/unit[0]/pos-norm</p>
<p>gear/unit[1]/pos-norm</p>
<p>gear/unit[2]/pos-norm</p>
<p>gear/unit[1]/actuator-norm</p>
<p>gear/unit[2]/actuator-norm</p>
</sum>
<v>8.0</v>
</product>
<product>
<p>gear/unit[3]/actuator-norm</p>
<v>2.0</v>
</product>
</difference>
</function>
</fcs_function>
......
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