A3XX: Brand New FBW system

This commit is contained in:
Joshua Davidson 2017-06-26 00:34:18 -04:00
parent 16ddae762c
commit a42757641e
15 changed files with 1308 additions and 1206 deletions

View file

@ -557,7 +557,6 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="pushback" />
<system file="fuel" />
<system file="glass-effect1" />
<system file="it-fbw" />
<system file="fmgc" />
<system file="fcs" />

View file

@ -557,7 +557,6 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="pushback" />
<system file="fuel" />
<system file="glass-effect1" />
<system file="it-fbw" />
<system file="fmgc" />
<system file="fcs" />

View file

@ -557,7 +557,6 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="pushback" />
<system file="fuel" />
<system file="glass-effect1" />
<system file="it-fbw" />
<system file="fmgc" />
<system file="fcs" />

View file

@ -557,7 +557,6 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="pushback" />
<system file="fuel" />
<system file="glass-effect1" />
<system file="it-fbw" />
<system file="fmgc" />
<system file="fcs" />

View file

@ -583,7 +583,6 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="pushback" />
<system file="fuel" />
<system file="glass-effect1" />
<system file="it-fbw" />
<system file="fmgc" />
<system file="fcs" />

View file

@ -557,7 +557,6 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="pushback" />
<system file="fuel" />
<system file="glass-effect1" />
<system file="it-fbw" />
<system file="fmgc" />
<system file="fcs" />

View file

@ -104,7 +104,7 @@
<path>Aircraft/A320Family/Systems/hydraulics.xml</path>
</autopilot>
<autopilot n="2">
<path>Aircraft/A320Family/Systems/it-fbw-b.xml</path>
<path>Aircraft/A320Family/Systems/it-fbw.xml</path>
</autopilot>
<autopilot n="3">
<path>Aircraft/A320Family/Systems/fmgc-b.xml</path>

View file

@ -557,7 +557,6 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="pushback" />
<system file="fuel" />
<system file="glass-effect1" />
<system file="it-fbw" />
<system file="fmgc" />
<system file="fcs" />

View file

@ -557,7 +557,6 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="pushback" />
<system file="fuel" />
<system file="glass-effect1" />
<system file="it-fbw" />
<system file="fmgc" />
<system file="fcs" />

View file

@ -557,7 +557,6 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="pushback" />
<system file="fuel" />
<system file="glass-effect1" />
<system file="it-fbw" />
<system file="fmgc" />
<system file="fcs" />

View file

@ -557,7 +557,6 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="pushback" />
<system file="fuel" />
<system file="glass-effect1" />
<system file="it-fbw" />
<system file="fmgc" />
<system file="fcs" />

View file

@ -30,6 +30,9 @@ var fctlInit = func {
setprop("/systems/fctl/fac2", 0);
}
setprop("/it-fbw/roll-back", 0);
setprop("/it-fbw/spd-hold", 0);
###################
# Update Function #
###################
@ -96,47 +99,16 @@ var update_loop = func {
var ail = getprop("/controls/flight/aileron");
if (getprop("/it-fbw/law") == 0) {
if (ail > 0.4 or ail < -0.4) {
setprop("/it-fbw/roll-lim-max", "67");
setprop("/it-fbw/roll-lim-min", "-67");
} else if (ail < 0.05 and ail > -0.05) {
setprop("/it-fbw/roll-lim-max", "33");
setprop("/it-fbw/roll-lim-min", "-33");
} else {
if (getprop("/it-fbw/roll-deg") > 33) {
setprop("/it-fbw/roll-deg", "33");
} else if (getprop("/it-fbw/roll-deg") < -33) {
setprop("/it-fbw/roll-deg", "-33");
}
if (ail > 0.4 or ail < -0.4) {
setprop("/it-fbw/roll-lim", "67");
if (getprop("/it-fbw/roll-back") == 0 and (getprop("/orientation/roll-deg") > 33.5 or getprop("/orientation/roll-deg") < -33.5)) {
setprop("/it-fbw/roll-back", 1);
}
} else if (getprop("/it-fbw/law") == 1) {
setprop("/it-fbw/roll-lim-max", "160");
setprop("/it-fbw/roll-lim-min", "-160");
} else {
setprop("/it-fbw/roll-lim-max", "33");
setprop("/it-fbw/roll-lim-min", "-33");
}
var elev = getprop("/controls/flight/elevator");
if (getprop("/it-fbw/law") == 0) {
if (getprop("/position/gear-agl-ft") <= 2) {
setprop("/it-fbw/pitch-lim-max", "15");
setprop("/it-fbw/pitch-lim-min", "-5");
} else if (getprop("/controls/flight/flap-lever") == 4) {
setprop("/it-fbw/pitch-lim-max", "25");
setprop("/it-fbw/pitch-lim-min", "-15");
} else {
setprop("/it-fbw/pitch-lim-max", "30");
setprop("/it-fbw/pitch-lim-min", "-15");
} else if (ail < 0.05 and ail > -0.05) {
setprop("/it-fbw/roll-lim", "33");
if (getprop("/it-fbw/roll-back") == 1 and getprop("/orientation/roll-deg") <= 33.5 and getprop("/orientation/roll-deg") >= -33.5) {
setprop("/it-fbw/roll-back", 0);
}
} else if (getprop("/it-fbw/law") == 1) {
setprop("/it-fbw/pitch-lim-max", "160");
setprop("/it-fbw/pitch-lim-min", "-160");
} else {
setprop("/it-fbw/pitch-lim-max", "15");
setprop("/it-fbw/pitch-lim-min", "-15");
}
if (getprop("/it-fbw/override") == 0) {

View file

@ -159,7 +159,7 @@
<type>noise-spike</type>
<input>/controls/flight/aileron-left-cmd</input>
<output>/controls/flight/aileron-left</output>
<max-rate-of-change>3.5</max-rate-of-change>
<max-rate-of-change>2.5</max-rate-of-change>
</filter>
<!-- Aileron R -->
@ -276,7 +276,7 @@
<type>noise-spike</type>
<input>/controls/flight/aileron-right-cmd</input>
<output>/controls/flight/aileron-right</output>
<max-rate-of-change>3.5</max-rate-of-change>
<max-rate-of-change>2.5</max-rate-of-change>
</filter>
<!-- =============================================================== -->
@ -1441,15 +1441,25 @@
<expression>
<product>
<sum>
<property>/controls/flight/aileron-left</property>
<property>/controls/flight/aileron-right</property>
<product>
<property>/controls/flight/spoiler-l-sum</property>
<value>-1.0</value>
<sum>
<property>/controls/flight/aileron-left</property>
<property>/controls/flight/aileron-right</property>
</sum>
<value>1.75</value>
</product>
<product>
<sum>
<product>
<property>/controls/flight/spoiler-l-sum</property>
<value>-1.0</value>
</product>
<property>/controls/flight/spoiler-r-sum</property>
</sum>
<value>0.25</value>
</product>
<property>/controls/flight/spoiler-r-sum</property>
</sum>
<value>0.3571</value>
<value>0.444444</value>
</product>
</expression>
</input>
@ -1523,7 +1533,7 @@
<type>noise-spike</type>
<input>/controls/flight/elevator-left-cmd</input>
<output>/controls/flight/elevator-left</output>
<max-rate-of-change>3.5</max-rate-of-change>
<max-rate-of-change>2.5</max-rate-of-change>
</filter>
<filter>
@ -1587,7 +1597,7 @@
<type>noise-spike</type>
<input>/controls/flight/elevator-right-cmd</input>
<output>/controls/flight/elevator-right</output>
<max-rate-of-change>3.5</max-rate-of-change>
<max-rate-of-change>2.5</max-rate-of-change>
</filter>
<filter>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff