Control: extreme rework and modernization of flybywire law, still missing pitch overspeed and c* components
This commit is contained in:
parent
32887a1ad6
commit
57d1beee28
10 changed files with 404 additions and 526 deletions
|
@ -226,30 +226,27 @@
|
|||
<path></path>
|
||||
</electrical>
|
||||
<autopilot n="0">
|
||||
<path>Aircraft/A320-family/Systems/fbw-pitch.xml</path>
|
||||
</autopilot>
|
||||
<autopilot n="1">
|
||||
<path>Aircraft/A320-family/Systems/fmgc-drivers.xml</path>
|
||||
</autopilot>
|
||||
<autopilot n="2">
|
||||
<autopilot n="1">
|
||||
<path>Aircraft/A320-family/Systems/fmgc-roll-yaw.xml</path>
|
||||
</autopilot>
|
||||
<autopilot n="3">
|
||||
<autopilot n="2">
|
||||
<path>Aircraft/A320-family/Systems/fmgc-pitch.xml</path>
|
||||
</autopilot>
|
||||
<autopilot n="4">
|
||||
<autopilot n="3">
|
||||
<path>Aircraft/A320-family/Systems/fmgc-thrust.xml</path>
|
||||
</autopilot>
|
||||
<autopilot n="5">
|
||||
<autopilot n="4">
|
||||
<path>Aircraft/A320-family/Systems/libraries.xml</path>
|
||||
</autopilot>
|
||||
<autopilot n="6">
|
||||
<autopilot n="5">
|
||||
<path>Aircraft/A320-family/Systems/upper-ecam.xml</path>
|
||||
</autopilot>
|
||||
<autopilot n="7">
|
||||
<autopilot n="6">
|
||||
<path>Aircraft/A320-family/Systems/lower-ecam.xml</path>
|
||||
</autopilot>
|
||||
<autopilot n="8">
|
||||
<autopilot n="7">
|
||||
<path>Aircraft/A320-family/Systems/pfd.xml</path>
|
||||
</autopilot>
|
||||
<property-rule n="101">
|
||||
|
@ -955,9 +952,7 @@
|
|||
<flight>
|
||||
<aileron n="1" type="double">0</aileron>
|
||||
<aileron-drives-tiller type="bool">0</aileron-drives-tiller>
|
||||
<aileron-input type="double">0</aileron-input>
|
||||
<elevator n="1" type="double">0</elevator>
|
||||
<elevator-input type="double">0</elevator-input>
|
||||
<rudder n="1" type="double">0</rudder>
|
||||
<speedbrake-arm type="bool">0</speedbrake-arm>
|
||||
<slats type="double">0</slats>
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
</text>
|
||||
<button>
|
||||
<halign>right</halign>
|
||||
<legend>Abort</legend>
|
||||
<legend>Cancel</legend>
|
||||
<pref-width>60</pref-width>
|
||||
<key>Esc</key>
|
||||
<pref-height>20</pref-height>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>acconfig.abortPanelStates();</script>
|
||||
|
|
|
@ -1986,8 +1986,8 @@ var input = {
|
|||
autopilotFPA: "/it-autoflight/input/fpa",
|
||||
autopilotVS: "/it-autoflight/input/vs",
|
||||
|
||||
aileronPFD: "/controls/flight/aileron-input-fast",
|
||||
elevatorPFD: "/controls/flight/elevator-input-fast",
|
||||
aileronPFD: "/fdm/jsbsim/fbw/roll/a-i-pfd",
|
||||
elevatorPFD: "/fdm/jsbsim/fbw/pitch/e-i-pfd",
|
||||
flapsInput: "/controls/flight/flaps-input",
|
||||
|
||||
thrustLvrClb: "/fdm/jsbsim/fadec/lvrclb",
|
||||
|
@ -2184,4 +2184,4 @@ setlistener("/modes/pfd/fma/pitch-mode", func(pitch) {
|
|||
} else {
|
||||
autoland_pitch_land.setBoolValue(0);
|
||||
}
|
||||
},0,0);
|
||||
},0,0);
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
# Airbus A3XX FBW/Flight Control Computer System
|
||||
# Joshua Davidson (Octal450)
|
||||
|
||||
# Copyright (c) 2021 Josh Davidson (Octal450)
|
||||
|
||||
var mmoIAS = 0;
|
||||
|
@ -44,8 +42,6 @@ var FBW = {
|
|||
activeLaw: props.globals.getNode("/it-fbw/law"),
|
||||
activeYawLaw: props.globals.getNode("/it-fbw/yaw-law"),
|
||||
override: props.globals.getNode("/it-fbw/override"),
|
||||
rollBack: props.globals.getNode("/it-fbw/roll-back"),
|
||||
rollLim: props.globals.getNode("/it-fbw/roll-lim"),
|
||||
yawdamper: props.globals.getNode("/systems/fctl/yawdamper-active"),
|
||||
Computers: {
|
||||
elac1: props.globals.getNode("/systems/fctl/elac1"),
|
||||
|
@ -91,7 +87,6 @@ var FBW = {
|
|||
fac2: props.globals.getNode("/systems/fctl/lights/fac2-fault"),
|
||||
},
|
||||
Protections: {
|
||||
overspeedRoll: props.globals.getNode("/it-fbw/protections/overspeed-roll-back"),
|
||||
overspeed: props.globals.getNode("/it-fbw/protections/overspeed"),
|
||||
},
|
||||
Sidestick: {
|
||||
|
@ -269,37 +264,6 @@ var update_loop = func {
|
|||
}
|
||||
|
||||
var fbw_loop = func {
|
||||
ail = pts.Controls.Flight.aileron.getValue();
|
||||
roll = pts.Orientation.roll.getValue();
|
||||
rollback = FBW.rollBack.getValue();
|
||||
|
||||
if (ail > 0.4 and roll >= -33.5) {
|
||||
FBW.rollLim.setValue("67");
|
||||
if (rollback == 1 and roll <= 33.5 and roll >= -33.5) {
|
||||
FBW.rollBack.setValue(0);
|
||||
} elsif (rollback == 0 and (roll > 33.5 or roll < -33.5)) {
|
||||
FBW.rollBack.setValue(1);
|
||||
}
|
||||
} else if (ail < -0.4 and roll <= 33.5) {
|
||||
FBW.rollLim.setValue("67");
|
||||
if (rollback == 1 and roll <= 33.5 and roll >= -33.5) {
|
||||
FBW.rollBack.setValue(0);
|
||||
} elsif (rollback == 0 and (roll > 33.5 or roll < -33.5)) {
|
||||
FBW.rollBack.setValue(1);
|
||||
}
|
||||
} else if (ail < 0.04 and ail > -0.04) {
|
||||
FBW.rollLim.setValue("33");
|
||||
if (rollback == 1 and roll <= 33.5 and roll >= -33.5) {
|
||||
FBW.rollBack.setValue(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (ail > 0.04 or ail < -0.04) {
|
||||
FBW.Protections.overspeedRoll.setValue(0);
|
||||
} else if (ail < 0.04 and ail > -0.04) {
|
||||
FBW.Protections.overspeedRoll.setValue(1);
|
||||
}
|
||||
|
||||
if (!FBW.override.getBoolValue()) {
|
||||
var active = FBW.activeLaw.getValue();
|
||||
var degrade = FBW.degradeLaw.getValue();
|
||||
|
|
|
@ -596,7 +596,7 @@
|
|||
<property>metrics/Sw-sqft</property>
|
||||
<property>metrics/bw-ft</property>
|
||||
<toradians><property>hydraulics/aileron-l/final-deg</property></toradians>
|
||||
<value>0.031</value>
|
||||
<value>0.035</value>
|
||||
</product>
|
||||
</function>
|
||||
|
||||
|
@ -607,7 +607,7 @@
|
|||
<property>metrics/Sw-sqft</property>
|
||||
<property>metrics/bw-ft</property>
|
||||
<toradians><property>hydraulics/aileron-r/final-deg</property></toradians>
|
||||
<value>-0.031</value>
|
||||
<value>-0.035</value>
|
||||
</product>
|
||||
</function>
|
||||
|
||||
|
|
|
@ -651,6 +651,7 @@
|
|||
<test value="1"> <!-- MAN -->
|
||||
fadec/control-1/throttle-pos gt /systems/acconfig/options/fadec/idle-t
|
||||
</test>
|
||||
<output>fbw/detent-1-feedback</output>
|
||||
</switch>
|
||||
|
||||
<fcs_function name="fadec/control-1/lever/idle-climb">
|
||||
|
@ -898,6 +899,7 @@
|
|||
<test value="1"> <!-- MAN -->
|
||||
fadec/control-2/throttle-pos gt /systems/acconfig/options/fadec/idle-t
|
||||
</test>
|
||||
<output>fbw/detent-2-feedback</output>
|
||||
</switch>
|
||||
|
||||
<fcs_function name="fadec/control-2/lever/idle-climb">
|
||||
|
|
|
@ -7,6 +7,21 @@
|
|||
|
||||
<channel name="Animations">
|
||||
|
||||
<lag_filter name="fbw/aileron-sidestick">
|
||||
<input>fbw/sidestick/roll-input-cmd</input>
|
||||
<c1>20</c1>
|
||||
</lag_filter>
|
||||
|
||||
<lag_filter name="fbw/elevator-sidestick">
|
||||
<input>fbw/sidestick/pitch-input-cmd</input>
|
||||
<c1>20</c1>
|
||||
</lag_filter>
|
||||
|
||||
<lag_filter name="fbw/rudder-pedal">
|
||||
<input>fbw/sidestick/yaw-input-cmd</input>
|
||||
<c1>20</c1>
|
||||
</lag_filter>
|
||||
|
||||
<lag_filter name="spoilers/main-lever">
|
||||
<input>spoilers/lever-cmd</input>
|
||||
<c1>20</c1>
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1082,6 +1082,7 @@
|
|||
<test value="1"> <!-- MAN -->
|
||||
fadec/control-1/throttle-pos gt /systems/acconfig/options/fadec/idle-t
|
||||
</test>
|
||||
<output>fbw/detent-1-feedback</output>
|
||||
</switch>
|
||||
|
||||
<fcs_function name="fadec/control-1/lever/idle-climb">
|
||||
|
@ -1357,6 +1358,7 @@
|
|||
<test value="1"> <!-- MAN -->
|
||||
fadec/control-2/throttle-pos gt /systems/acconfig/options/fadec/idle-t
|
||||
</test>
|
||||
<output>fbw/detent-2-feedback</output>
|
||||
</switch>
|
||||
|
||||
<fcs_function name="fadec/control-2/lever/idle-climb">
|
||||
|
|
|
@ -354,7 +354,7 @@
|
|||
<filter>
|
||||
<name>Pitch PFD</name>
|
||||
<type>gain</type>
|
||||
<gain>1</gain>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<expression>
|
||||
<table>
|
||||
|
@ -381,7 +381,7 @@
|
|||
<filter>
|
||||
<name>Ground Horizon</name>
|
||||
<type>gain</type>
|
||||
<gain>1</gain>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<condition>
|
||||
<and>
|
||||
|
@ -403,7 +403,7 @@
|
|||
<entry><ind>150</ind><dep> 17.35</dep></entry>
|
||||
</table>
|
||||
<table>
|
||||
<property>/orientation/pitch-deg</property>
|
||||
<property>/instrumentation/pfd/pitch-deg-non-linear</property>
|
||||
<entry><ind> 0.00</ind><dep> 0.00</dep></entry>
|
||||
<entry><ind>17.35</ind><dep>-17.35</dep></entry>
|
||||
</table>
|
||||
|
@ -431,7 +431,7 @@
|
|||
<entry><ind>150</ind><dep> 17.35</dep></entry>
|
||||
</table>
|
||||
<table>
|
||||
<property>/orientation/pitch-deg</property>
|
||||
<property>/instrumentation/pfd/pitch-deg-non-linear</property>
|
||||
<entry><ind>-17.35</ind><dep> 17.35</dep></entry>
|
||||
<entry><ind> 0.00</ind><dep> 0.00</dep></entry>
|
||||
<entry><ind> 17.35</ind><dep>-17.35</dep></entry>
|
||||
|
@ -447,8 +447,8 @@
|
|||
<filter>
|
||||
<name>Horizon Heading Pitch</name>
|
||||
<type>gain</type>
|
||||
<gain>1</gain>
|
||||
<input>/orientation/pitch-deg</input>
|
||||
<gain>1.0</gain>
|
||||
<input>/instrumentation/pfd/pitch-deg-non-linear</input>
|
||||
<output>/instrumentation/pfd/horizon-pitch</output>
|
||||
<min>-17.35</min>
|
||||
<max>17.35</max>
|
||||
|
@ -457,7 +457,7 @@
|
|||
<filter>
|
||||
<name>Vertical Speed Needle</name>
|
||||
<type>gain</type>
|
||||
<gain>1</gain>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<expression>
|
||||
<table>
|
||||
|
@ -488,7 +488,7 @@
|
|||
<filter>
|
||||
<name>Vertical Speed Digit Translate</name>
|
||||
<type>gain</type>
|
||||
<gain>1</gain>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<expression>
|
||||
<table>
|
||||
|
@ -538,7 +538,7 @@
|
|||
<name>IESI Slip/Skid Indicator</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1</gain>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<expression>
|
||||
<table>
|
||||
|
@ -558,7 +558,7 @@
|
|||
<name>IESI Pitch</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1</gain>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<expression>
|
||||
<table>
|
||||
|
|
Loading…
Reference in a new issue