Major FDM FCTL changes, working FBW System! (expiremental), bugfixes, new reverse thrust system using F1 and F2

This commit is contained in:
Joshua Davidson 2017-04-07 14:09:40 -04:00
parent 5f478ac54d
commit fcae4d1cba
25 changed files with 1610 additions and 457 deletions

View file

@ -30,7 +30,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<z> -25.2091 </z>
</location -->
<location name="AERORP" unit="IN">
<x> 680.00 </x>
<x> 700.00 </x>
<y> 0 </y>
<z> 0.00 </z>
</location>
@ -85,7 +85,7 @@ YAW MOI_________3950000______23089847_______24848934
<z> -41.7398 </z>
</location -->
<location name="CG" unit="IN">
<x> 642.00 </x>
<x> 652.00 </x>
<y> 0 </y>
<z> 0.00 </z>
</location>
@ -568,30 +568,25 @@ YAW MOI_________3950000______23089847_______24848934
<input>/controls/flight/elevator-fbw</input>
<input>/controls/flight/elevator-trim</input>
<clipto>
<min>-1</min>
<max>1</max>
<min>-1</min>
<max>1</max>
</clipto>
</summer>
<aerosurface_scale name="Elevator Control">
<input>fcs/pitch-trim-sum</input>
<gain>0.025</gain>
<gain>0.015</gain>
<range>
<min>-10</min>
<max>10</max>
<min>-20</min>
<max>20</max>
</range>
<output>fcs/elevator-pos-rad</output>
</aerosurface_scale>
<aerosurface_scale name="Elevator position normalized">
<input>fcs/elevator-pos-deg</input>
<domain>
<min>-10</min>
<max>10</max>
</domain>
<aerosurface_scale name="Elevator Position Normalizer">
<input>fcs/pitch-trim-sum</input>
<range>
<min>-1</min>
<max>1</max>
<min>-1</min>
<max>1</max>
</range>
<output>fcs/elevator-pos-norm</output>
</aerosurface_scale>
@ -989,7 +984,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>aero/qbar-psf</property>
<property>metrics/Sw-sqft</property>
<property>fcs/slat-pos-deg</property>
<value> 0.02000 </value>
<value> 0.02500 </value>
</product>
</function>
@ -1009,7 +1004,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>aero/qbar-psf</property>
<property>metrics/Sw-sqft</property>
<property>fcs/elevator-pos-rad</property>
<value>0.15</value>
<value>0.04</value>
</product>
</function>
@ -1167,7 +1162,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/bw-ft</property>
<property>aero/bi2vel</property>
<property>velocities/p-aero-rad_sec</property>
<value>-0.4</value>
<value>-0.95</value>
</product>
</function>
@ -1179,7 +1174,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/bw-ft</property>
<property>aero/bi2vel</property>
<property>velocities/r-aero-rad_sec</property>
<value>0.15</value>
<value>0.005</value>
</product>
</function>
@ -1190,7 +1185,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/Sw-sqft</property>
<property>metrics/bw-ft</property>
<property>fcs/left-aileron-pos-rad</property>
<value>0.1</value>
<value>0.20</value>
</product>
</function>
@ -1201,7 +1196,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/Sw-sqft</property>
<property>metrics/bw-ft</property>
<property>fcs/rudder-pos-rad</property>
<value>0.01</value>
<value>0.003</value>
</product>
</function>
@ -1230,8 +1225,8 @@ YAW MOI_________3950000______23089847_______24848934
<table>
<independentVar lookup="row">velocities/mach</independentVar>
<tableData>
0.0 -1.200
2.0 -0.300
0.0 -1.900
2.0 -0.900
</tableData>
</table>
</product>
@ -1245,7 +1240,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/cbarw-ft</property>
<property>aero/ci2vel</property>
<property>velocities/q-aero-rad_sec</property>
<value>-17</value>
<value>-140</value>
</product>
</function>
@ -1257,7 +1252,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/cbarw-ft</property>
<property>aero/ci2vel</property>
<property>aero/alphadot-rad_sec</property>
<value>-6</value>
<value>-1</value>
</product>
</function>

View file

@ -30,7 +30,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<z> -25.2091 </z>
</location -->
<location name="AERORP" unit="IN">
<x> 680.00 </x>
<x> 700.00 </x>
<y> 0 </y>
<z> 0.00 </z>
</location>
@ -85,7 +85,7 @@ YAW MOI_________3950000______23089847_______24848934
<z> -41.7398 </z>
</location -->
<location name="CG" unit="IN">
<x> 642.00 </x>
<x> 652.00 </x>
<y> 0 </y>
<z> 0.00 </z>
</location>
@ -568,30 +568,25 @@ YAW MOI_________3950000______23089847_______24848934
<input>/controls/flight/elevator-fbw</input>
<input>/controls/flight/elevator-trim</input>
<clipto>
<min>-1</min>
<max>1</max>
<min>-1</min>
<max>1</max>
</clipto>
</summer>
<aerosurface_scale name="Elevator Control">
<input>fcs/pitch-trim-sum</input>
<gain>0.025</gain>
<gain>0.015</gain>
<range>
<min>-10</min>
<max>10</max>
<min>-20</min>
<max>20</max>
</range>
<output>fcs/elevator-pos-rad</output>
</aerosurface_scale>
<aerosurface_scale name="Elevator position normalized">
<input>fcs/elevator-pos-deg</input>
<domain>
<min>-10</min>
<max>10</max>
</domain>
<aerosurface_scale name="Elevator Position Normalizer">
<input>fcs/pitch-trim-sum</input>
<range>
<min>-1</min>
<max>1</max>
<min>-1</min>
<max>1</max>
</range>
<output>fcs/elevator-pos-norm</output>
</aerosurface_scale>
@ -989,7 +984,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>aero/qbar-psf</property>
<property>metrics/Sw-sqft</property>
<property>fcs/slat-pos-deg</property>
<value> 0.02000 </value>
<value> 0.02500 </value>
</product>
</function>
@ -1009,7 +1004,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>aero/qbar-psf</property>
<property>metrics/Sw-sqft</property>
<property>fcs/elevator-pos-rad</property>
<value>0.15</value>
<value>0.04</value>
</product>
</function>
@ -1167,7 +1162,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/bw-ft</property>
<property>aero/bi2vel</property>
<property>velocities/p-aero-rad_sec</property>
<value>-0.4</value>
<value>-0.95</value>
</product>
</function>
@ -1179,7 +1174,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/bw-ft</property>
<property>aero/bi2vel</property>
<property>velocities/r-aero-rad_sec</property>
<value>0.15</value>
<value>0.005</value>
</product>
</function>
@ -1190,7 +1185,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/Sw-sqft</property>
<property>metrics/bw-ft</property>
<property>fcs/left-aileron-pos-rad</property>
<value>0.1</value>
<value>0.20</value>
</product>
</function>
@ -1201,7 +1196,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/Sw-sqft</property>
<property>metrics/bw-ft</property>
<property>fcs/rudder-pos-rad</property>
<value>0.01</value>
<value>0.003</value>
</product>
</function>
@ -1230,8 +1225,8 @@ YAW MOI_________3950000______23089847_______24848934
<table>
<independentVar lookup="row">velocities/mach</independentVar>
<tableData>
0.0 -1.200
2.0 -0.300
0.0 -1.900
2.0 -0.900
</tableData>
</table>
</product>
@ -1245,7 +1240,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/cbarw-ft</property>
<property>aero/ci2vel</property>
<property>velocities/q-aero-rad_sec</property>
<value>-17</value>
<value>-140</value>
</product>
</function>
@ -1257,7 +1252,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/cbarw-ft</property>
<property>aero/ci2vel</property>
<property>aero/alphadot-rad_sec</property>
<value>-6</value>
<value>-1</value>
</product>
</function>

View file

@ -223,9 +223,9 @@
<config>
<altitude-dial-mode>0</altitude-dial-mode>
<roll>
<umin>-0.30</umin>
<umax>0.30</umax>
<kp>0.05</kp>
<umin>-0.40</umin>
<umax>0.40</umax>
<kp>0.08</kp>
<kp-vloc>0.09</kp-vloc>
<ti>10.0</ti>
<td>0.00001</td>
@ -234,24 +234,24 @@
<pitch>
<umin>-0.40</umin>
<umax>0.40</umax>
<kp>-0.04</kp>
<kp>-0.09</kp>
<ti>10.0</ti>
<td>0.0001</td>
<kp-cws>-0.07</kp-cws>
<kp-cws>-0.09</kp-cws>
</pitch>
<cmd>
<roll-kp>-1.9</roll-kp>
<roll-scale>1.4</roll-scale>
<roll-scale>1.5</roll-scale>
<vorloc>-4.0</vorloc>
<alt>0.025</alt>
<vs>0.07</vs>
<vs>0.10</vs>
<fpa>0.30</fpa>
<flch>-4.0</flch>
<gs>0.10</gs>
</cmd>
<autoland>
<kp-roll>0.10</kp-roll>
<kp-pitch>0.01</kp-pitch>
<kp-pitch>0.03</kp-pitch>
<kp-rudder>-0.3</kp-rudder>
</autoland>
</config>
@ -274,17 +274,6 @@
<pitch-deg>0</pitch-deg>
</it-fbw>
<engines n="0">
<engine n="0">
<egt-actual type="float">0</egt-actual>
<state type="int">0</state>
</engine>
<engine n="1">
<egt-actual type="float">0</egt-actual>
<state type="int">0</state>
</engine>
</engines>
<apu>
<rpm type="float">0</rpm>
<egt type="float">0</egt>
@ -367,11 +356,15 @@
<serviceable type="bool">true</serviceable>
</apu>
<engine n="0">
<egt-actual type="float">0</egt-actual>
<state type="int">0</state>
<on-fire type="bool">0</on-fire>
<reverser-pos-norm type="double">0</reverser-pos-norm>
<running type="bool">0</running>
</engine>
<engine n="1">
<egt-actual type="float">0</egt-actual>
<state type="int">0</state>
<on-fire type="bool">0</on-fire>
<reverser-pos-norm type="double">0</reverser-pos-norm>
<running type="bool">0</running>
@ -509,13 +502,32 @@
<input>
<keyboard>
<key n="127">
<name>Delete</name>
<desc>Toggle thrust reversers</desc>
<name>DEL</name>
<desc>REV MSG</desc>
<binding>
<command>nasal</command>
<script>
A320.engine1.reverse_thrust();
A320.engine2.reverse_thrust();
gui.popupTip("Use F2 to activate reverse thrust, and F1 to deactivate reverse thrust.");
</script>
</binding>
</key>
<key n="257">
<name>F1</name>
<desc>Disengage/Decrease reversers</desc>
<binding>
<command>nasal</command>
<script>
systems.un_rev_thrust();
</script>
</binding>
</key>
<key n="258">
<name>F2</name>
<desc>Engage/Increase reversers</desc>
<binding>
<command>nasal</command>
<script>
systems.do_rev_thrust();
</script>
</binding>
</key>

View file

@ -30,7 +30,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<z> -25.2091 </z>
</location -->
<location name="AERORP" unit="IN">
<x> 680.00 </x>
<x> 700.00 </x>
<y> 0 </y>
<z> 0.00 </z>
</location>
@ -85,7 +85,7 @@ YAW MOI_________3950000______23089847_______24848934
<z> -41.7398 </z>
</location -->
<location name="CG" unit="IN">
<x> 642.00 </x>
<x> 652.00 </x>
<y> 0 </y>
<z> 0.00 </z>
</location>
@ -581,30 +581,25 @@ YAW MOI_________3950000______23089847_______24848934
<input>/controls/flight/elevator-fbw</input>
<input>/controls/flight/elevator-trim</input>
<clipto>
<min>-1</min>
<max>1</max>
<min>-1</min>
<max>1</max>
</clipto>
</summer>
<aerosurface_scale name="Elevator Control">
<input>fcs/pitch-trim-sum</input>
<gain>0.025</gain>
<gain>0.015</gain>
<range>
<min>-10</min>
<max>10</max>
<min>-20</min>
<max>20</max>
</range>
<output>fcs/elevator-pos-rad</output>
</aerosurface_scale>
<aerosurface_scale name="Elevator position normalized">
<input>fcs/elevator-pos-deg</input>
<domain>
<min>-10</min>
<max>10</max>
</domain>
<aerosurface_scale name="Elevator Position Normalizer">
<input>fcs/pitch-trim-sum</input>
<range>
<min>-1</min>
<max>1</max>
<min>-1</min>
<max>1</max>
</range>
<output>fcs/elevator-pos-norm</output>
</aerosurface_scale>
@ -1002,7 +997,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>aero/qbar-psf</property>
<property>metrics/Sw-sqft</property>
<property>fcs/slat-pos-deg</property>
<value> 0.02000 </value>
<value> 0.02500 </value>
</product>
</function>
@ -1022,7 +1017,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>aero/qbar-psf</property>
<property>metrics/Sw-sqft</property>
<property>fcs/elevator-pos-rad</property>
<value>0.15</value>
<value>0.04</value>
</product>
</function>
@ -1180,7 +1175,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/bw-ft</property>
<property>aero/bi2vel</property>
<property>velocities/p-aero-rad_sec</property>
<value>-0.4</value>
<value>-0.95</value>
</product>
</function>
@ -1192,7 +1187,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/bw-ft</property>
<property>aero/bi2vel</property>
<property>velocities/r-aero-rad_sec</property>
<value>0.15</value>
<value>0.005</value>
</product>
</function>
@ -1203,7 +1198,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/Sw-sqft</property>
<property>metrics/bw-ft</property>
<property>fcs/left-aileron-pos-rad</property>
<value>0.1</value>
<value>0.20</value>
</product>
</function>
@ -1214,7 +1209,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/Sw-sqft</property>
<property>metrics/bw-ft</property>
<property>fcs/rudder-pos-rad</property>
<value>0.01</value>
<value>0.003</value>
</product>
</function>
@ -1243,8 +1238,8 @@ YAW MOI_________3950000______23089847_______24848934
<table>
<independentVar lookup="row">velocities/mach</independentVar>
<tableData>
0.0 -1.200
2.0 -0.300
0.0 -1.900
2.0 -0.900
</tableData>
</table>
</product>
@ -1258,7 +1253,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/cbarw-ft</property>
<property>aero/ci2vel</property>
<property>velocities/q-aero-rad_sec</property>
<value>-17</value>
<value>-140</value>
</product>
</function>
@ -1270,7 +1265,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/cbarw-ft</property>
<property>aero/ci2vel</property>
<property>aero/alphadot-rad_sec</property>
<value>-6</value>
<value>-1</value>
</product>
</function>

View file

@ -30,7 +30,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<z> -25.2091 </z>
</location -->
<location name="AERORP" unit="IN">
<x> 680.00 </x>
<x> 700.00 </x>
<y> 0 </y>
<z> 0.00 </z>
</location>
@ -85,7 +85,7 @@ YAW MOI_________3950000______23089847_______24848934
<z> -41.7398 </z>
</location -->
<location name="CG" unit="IN">
<x> 642.00 </x>
<x> 652.00 </x>
<y> 0 </y>
<z> 0.00 </z>
</location>
@ -581,30 +581,25 @@ YAW MOI_________3950000______23089847_______24848934
<input>/controls/flight/elevator-fbw</input>
<input>/controls/flight/elevator-trim</input>
<clipto>
<min>-1</min>
<max>1</max>
<min>-1</min>
<max>1</max>
</clipto>
</summer>
<aerosurface_scale name="Elevator Control">
<input>fcs/pitch-trim-sum</input>
<gain>0.025</gain>
<gain>0.015</gain>
<range>
<min>-10</min>
<max>10</max>
<min>-20</min>
<max>20</max>
</range>
<output>fcs/elevator-pos-rad</output>
</aerosurface_scale>
<aerosurface_scale name="Elevator position normalized">
<input>fcs/elevator-pos-deg</input>
<domain>
<min>-10</min>
<max>10</max>
</domain>
<aerosurface_scale name="Elevator Position Normalizer">
<input>fcs/pitch-trim-sum</input>
<range>
<min>-1</min>
<max>1</max>
<min>-1</min>
<max>1</max>
</range>
<output>fcs/elevator-pos-norm</output>
</aerosurface_scale>
@ -1002,7 +997,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>aero/qbar-psf</property>
<property>metrics/Sw-sqft</property>
<property>fcs/slat-pos-deg</property>
<value> 0.02000 </value>
<value> 0.02500 </value>
</product>
</function>
@ -1022,7 +1017,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>aero/qbar-psf</property>
<property>metrics/Sw-sqft</property>
<property>fcs/elevator-pos-rad</property>
<value>0.15</value>
<value>0.04</value>
</product>
</function>
@ -1180,7 +1175,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/bw-ft</property>
<property>aero/bi2vel</property>
<property>velocities/p-aero-rad_sec</property>
<value>-0.4</value>
<value>-0.95</value>
</product>
</function>
@ -1192,7 +1187,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/bw-ft</property>
<property>aero/bi2vel</property>
<property>velocities/r-aero-rad_sec</property>
<value>0.15</value>
<value>0.005</value>
</product>
</function>
@ -1203,7 +1198,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/Sw-sqft</property>
<property>metrics/bw-ft</property>
<property>fcs/left-aileron-pos-rad</property>
<value>0.1</value>
<value>0.20</value>
</product>
</function>
@ -1214,7 +1209,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/Sw-sqft</property>
<property>metrics/bw-ft</property>
<property>fcs/rudder-pos-rad</property>
<value>0.01</value>
<value>0.003</value>
</product>
</function>
@ -1243,8 +1238,8 @@ YAW MOI_________3950000______23089847_______24848934
<table>
<independentVar lookup="row">velocities/mach</independentVar>
<tableData>
0.0 -1.200
2.0 -0.300
0.0 -1.900
2.0 -0.900
</tableData>
</table>
</product>
@ -1258,7 +1253,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/cbarw-ft</property>
<property>aero/ci2vel</property>
<property>velocities/q-aero-rad_sec</property>
<value>-17</value>
<value>-140</value>
</product>
</function>
@ -1270,7 +1265,7 @@ YAW MOI_________3950000______23089847_______24848934
<property>metrics/cbarw-ft</property>
<property>aero/ci2vel</property>
<property>aero/alphadot-rad_sec</property>
<value>-6</value>
<value>-1</value>
</product>
</function>

View file

@ -7,6 +7,7 @@ var welcome_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/welcome/dialog", "Air
var ps_load_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/psload/dialog", "Aircraft/A320Family/AircraftConfig/psload.xml");
var ps_loaded_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/psloaded/dialog", "Aircraft/A320Family/AircraftConfig/psloaded.xml");
var init_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/init/dialog", "Aircraft/A320Family/AircraftConfig/ac_init.xml");
var fbw_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/fbw/dialog", "Aircraft/A320Family/AircraftConfig/fbw.xml");
init_dlg.open();
setlistener("/sim/signals/fdm-initialized", func {

85
AircraftConfig/fbw.xml Normal file
View file

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- A3XX Aircraft Config Dialog -->
<PropertyList>
<name>aircraft-config-fbw</name>
<layout>vbox</layout>
<group>
<layout>hbox</layout>
<text>
<halign>left</halign>
<label>FBW Settings</label>
</text>
<button>
<halign>right</halign>
<pref-width>20</pref-width>
<pref-height>20</pref-height>
<legend>X</legend>
<key>Esc</key>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<button>
<halign>center</halign>
<legend>Use NORMAL Law</legend>
<pref-width>140</pref-width>
<binding>
<command>nasal</command>
<script>
setprop("/it-fbw/law", "NORMAL");
gui.popupTip("Fly By Wire switched to NORMAL law!");
</script>
</binding>
</button>
<button>
<halign>center</halign>
<legend>Use ALTERNATE Law</legend>
<pref-width>140</pref-width>
<binding>
<command>nasal</command>
<script>
setprop("/it-fbw/law", "ALTERNATE");
gui.popupTip("Fly By Wire switched to ALTERNATE law!");
</script>
</binding>
</button>
<button>
<halign>center</halign>
<legend>Use DIRECT Law</legend>
<pref-width>140</pref-width>
<binding>
<command>nasal</command>
<script>
setprop("/it-fbw/law", "DIRECT");
gui.popupTip("Fly By Wire switched to DIRECT law!");
</script>
</binding>
</button>
<button>
<halign>center</halign>
<legend>Use BACKUP Law</legend>
<pref-width>140</pref-width>
<binding>
<command>nasal</command>
<script>
setprop("/it-fbw/law", "BACKUP");
gui.popupTip("Fly By Wire switched to MECHANICAL BACKUP law!");
</script>
</binding>
</button>
</group>
</PropertyList>

View file

@ -249,6 +249,18 @@
<live>true</live>
</checkbox>
<button>
<legend>FBW Settings</legend>
<halign>center</halign>
<padding>5</padding>
<binding>
<command>nasal</command>
<script>
acconfig.fbw_dlg.open();
</script>
</binding>
</button>
</group>
</group>

View file

@ -1865,7 +1865,7 @@
<type>rotate</type>
<object-name>trim_wheel</object-name>
<property>/controls/flight/elevator-trim</property>
<factor>-70</factor>
<factor>-700</factor>
<center>
<x-m>-0.2373</x-m>
<y-m>0</y-m>
@ -2073,7 +2073,13 @@
<name>Engine 1 throttle lever</name>
<type>rotate</type>
<object-name>thr_l</object-name>
<property>controls/engines/engine[0]/throttle</property>
<condition>
<equals>
<property>/controls/engines/engine[0]/reverser</property>
<value>0</value>
</equals>
</condition>
<property>controls/engines/engine[0]/throttle-pos</property>
<interpolation>
<entry><ind>0.00000</ind><dep>10</dep></entry>
<entry><ind>0.59999</ind><dep>33</dep></entry>
@ -2099,6 +2105,32 @@
<z-m>-0.3811</z-m>
</center>
</animation>
<animation>
<name>Engine 1 throttle lever rev</name>
<type>rotate</type>
<object-name>thr_l</object-name>
<condition>
<equals>
<property>/controls/engines/engine[0]/reverser</property>
<value>1</value>
</equals>
</condition>
<property>controls/engines/engine[0]/throttle-pos</property>
<interpolation>
<entry><ind>0.00</ind><dep> 0</dep></entry>
<entry><ind>0.25</ind><dep>-10</dep></entry>
</interpolation>
<axis>
<x>0</x>
<y>-1</y>
<z>0</z>
</axis>
<center>
<x-m>-0.2373</x-m>
<y-m>0</y-m>
<z-m>-0.3811</z-m>
</center>
</animation>
<animation>
<name>Engine 2 throttle lever pick</name>
<type>pick</type>
@ -2130,7 +2162,13 @@
<name>Engine 2 throttle lever</name>
<type>rotate</type>
<object-name>thr_r</object-name>
<property>controls/engines/engine[1]/throttle</property>
<condition>
<equals>
<property>/controls/engines/engine[0]/reverser</property>
<value>0</value>
</equals>
</condition>
<property>controls/engines/engine[1]/throttle-pos</property>
<interpolation>
<entry><ind>0.00000</ind><dep>10</dep></entry>
<entry><ind>0.59999</ind><dep>33</dep></entry>
@ -2156,42 +2194,68 @@
<z-m>-0.3811</z-m>
</center>
</animation>
<animation>
<name>Reverse Thrust left lever</name>
<type>rotate</type>
<object-name>rev_l</object-name>
<property>controls/engines/engine/reverser</property>
<factor>60</factor>
<axis>
<x>0</x>
<y>1</y>
<z>0</z>
</axis>
<center>
<x-m>-0.16</x-m>
<y-m>0</y-m>
<z-m>-0.29</z-m>
</center>
</animation>
<animation>
<name>Reverse Thrust right lever</name>
<type>rotate</type>
<object-name>rev_r</object-name>
<property>controls/engines/engine[1]/reverser</property>
<factor>60</factor>
<axis>
<x>0</x>
<y>1</y>
<z>0</z>
</axis>
<center>
<x-m>-0.16</x-m>
<y-m>0</y-m>
<z-m>-0.29</z-m>
</center>
</animation>
<animation>
<name>Engine 2 throttle lever rev</name>
<type>rotate</type>
<object-name>thr_r</object-name>
<condition>
<equals>
<property>/controls/engines/engine[0]/reverser</property>
<value>1</value>
</equals>
</condition>
<property>controls/engines/engine[1]/throttle-pos</property>
<interpolation>
<entry><ind>0.00</ind><dep> 0</dep></entry>
<entry><ind>0.25</ind><dep>-10</dep></entry>
</interpolation>
<axis>
<x>0</x>
<y>-1</y>
<z>0</z>
</axis>
<center>
<x-m>-0.2373</x-m>
<y-m>0</y-m>
<z-m>-0.3811</z-m>
</center>
</animation>
<animation>
<name>Reverse Thrust left lever</name>
<type>rotate</type>
<object-name>rev_l</object-name>
<property>controls/engines/engine/reverser</property>
<factor>60</factor>
<axis>
<x>0</x>
<y>1</y>
<z>0</z>
</axis>
<center>
<x-m>-0.16</x-m>
<y-m>0</y-m>
<z-m>-0.29</z-m>
</center>
</animation>
<animation>
<name>Reverse Thrust right lever</name>
<type>rotate</type>
<object-name>rev_r</object-name>
<property>controls/engines/engine[1]/reverser</property>
<factor>60</factor>
<axis>
<x>0</x>
<y>1</y>
<z>0</z>
</axis>
<center>
<x-m>-0.16</x-m>
<y-m>0</y-m>
<z-m>-0.29</z-m>
</center>
</animation>
<!-- Engine Cut-off Switches -->

View file

@ -9,7 +9,7 @@
<name>Left elevator</name>
<type>rotate</type>
<object-name>ElevatorL</object-name>
<property>/controls/flight/elevator</property>
<property>/controls/flight/elevator-fbw</property>
<interpolation>
<entry><ind>-1.0</ind><dep>-15.0</dep></entry>
<entry><ind>0.0</ind><dep>0.0</dep></entry>
@ -28,7 +28,7 @@
<name>Right elevator</name>
<type>rotate</type>
<object-name>ElevatorR</object-name>
<property>/controls/flight/elevator</property>
<property>/controls/flight/elevator-fbw</property>
<interpolation>
<entry><ind>-1.0</ind><dep>-15.0</dep></entry>
<entry><ind>0.0</ind><dep>0.0</dep></entry>

View file

@ -9,7 +9,7 @@
<name>Left elevator</name>
<type>rotate</type>
<object-name>ElevatorL</object-name>
<property>/controls/flight/elevator</property>
<property>/controls/flight/elevator-fbw</property>
<interpolation>
<entry><ind>-1.0</ind><dep>-15.0</dep></entry>
<entry><ind>0.0</ind><dep>0.0</dep></entry>
@ -28,7 +28,7 @@
<name>Right elevator</name>
<type>rotate</type>
<object-name>ElevatorR</object-name>
<property>/controls/flight/elevator</property>
<property>/controls/flight/elevator-fbw</property>
<interpolation>
<entry><ind>-1.0</ind><dep>-15.0</dep></entry>
<entry><ind>0.0</ind><dep>0.0</dep></entry>

View file

@ -9,7 +9,7 @@
<name>Left elevator</name>
<type>rotate</type>
<object-name>ElevatorL</object-name>
<property>/controls/flight/elevator</property>
<property>/controls/flight/elevator-fbw</property>
<interpolation>
<entry><ind>-1.0</ind><dep>-15.0</dep></entry>
<entry><ind>0.0</ind><dep>0.0</dep></entry>
@ -28,7 +28,7 @@
<name>Right elevator</name>
<type>rotate</type>
<object-name>ElevatorR</object-name>
<property>/controls/flight/elevator</property>
<property>/controls/flight/elevator-fbw</property>
<interpolation>
<entry><ind>-1.0</ind><dep>-15.0</dep></entry>
<entry><ind>0.0</ind><dep>0.0</dep></entry>

View file

@ -9,7 +9,7 @@
<name>Left elevator</name>
<type>rotate</type>
<object-name>ElevatorL</object-name>
<property>/controls/flight/elevator</property>
<property>/controls/flight/elevator-fbw</property>
<interpolation>
<entry><ind>-1.0</ind><dep>-15.0</dep></entry>
<entry><ind>0.0</ind><dep>0.0</dep></entry>
@ -28,7 +28,7 @@
<name>Right elevator</name>
<type>rotate</type>
<object-name>ElevatorR</object-name>
<property>/controls/flight/elevator</property>
<property>/controls/flight/elevator-fbw</property>
<interpolation>
<entry><ind>-1.0</ind><dep>-15.0</dep></entry>
<entry><ind>0.0</ind><dep>0.0</dep></entry>

View file

@ -961,7 +961,7 @@
<repeatable type="bool">false</repeatable>
<binding>
<command>property-toggle</command>
<property>/controls/electrical/switches/acc-ess-feed</property>
<property>/controls/electrical/switches/ac-ess-feed</property>
</binding>
</action>
</animation>
@ -989,7 +989,7 @@
<condition>
<or>
<equals>
<property>/controls/electrical/switches/acc-ess-feed</property>
<property>/controls/electrical/switches/ac-ess-feed</property>
<value>0</value>
</equals>
<equals>
@ -2065,7 +2065,12 @@
<command>property-toggle</command>
<property>controls/switches/no-smoking-sign</property>
</binding>
<bindings>
<command>nasal</command>
<script>
A320.dingdong();
</script>
</bindings>
</action>
</animation>
<animation>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 MiB

After

Width:  |  Height:  |  Size: 3.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 KiB

After

Width:  |  Height:  |  Size: 151 KiB

File diff suppressed because it is too large Load diff

View file

@ -19,13 +19,14 @@ var elec_init = func {
setprop("/controls/electrical/switches/gen-apu", 0);
setprop("/controls/electrical/switches/gen-ext", 0);
setprop("/controls/electrical/switches/apu-ext-crosstie", 1);
setprop("/controls/electrical/switches/acc-ess-feed", 1);
setprop("/controls/electrical/switches/ac-ess-feed", 1);
setprop("/controls/electrical/switches/battery1", 0);
setprop("/controls/electrical/switches/battery2", 0);
setprop("/systems/electrical/battery1-volts", 25.9);
setprop("/systems/electrical/battery2-volts", 25.9);
setprop("/systems/electrical/bus/dc1", 0);
setprop("/systems/electrical/bus/dc2", 0);
setprop("/systems/electrical/bus/dc-ess", 0);
setprop("/systems/electrical/bus/ac1", 0);
setprop("/systems/electrical/bus/ac2", 0);
setprop("/systems/electrical/bus/ac-ess", 0);
@ -74,7 +75,7 @@ var master_elec = func {
var gen_apu_sw = getprop("/controls/electrical/switches/gen-apu");
var gen_ext_sw = getprop("/controls/electrical/switches/gen-ext");
var apu_ext_crosstie_sw = getprop("/controls/electrical/switches/apu-ext-crosstie");
var acc_ess_feed_sw = getprop("/controls/electrical/switches/acc-ess-feed");
var ac_ess_feed_sw = getprop("/controls/electrical/switches/ac-ess-feed");
var battery1_sw = getprop("/controls/electrical/switches/battery1");
var battery2_sw = getprop("/controls/electrical/switches/battery2");
var rpmapu = getprop("/systems/apu/rpm");
@ -88,6 +89,7 @@ var master_elec = func {
var ac_ess = getprop("/systems/electrical/bus/ac-ess");
var dc1 = getprop("/systems/electrical/bus/dc1");
var dc2 = getprop("/systems/electrical/bus/dc2");
var dc_ess = getprop("/systems/electrical/bus/dc-ess");
# Left cross tie yes?
@ -117,24 +119,31 @@ var master_elec = func {
setprop("/systems/electrical/bus/ac1", 115);
setprop("/systems/electrical/bus/ac-ess", 115);
setprop("/systems/electrical/bus/dc1", 28);
setprop("/systems/electrical/bus/dc-ess", 28);
} else if (rpmapu >= 99 and gen_apu_sw) {
setprop("/systems/electrical/bus/ac1", 115);
setprop("/systems/electrical/bus/ac-ess", 115);
setprop("/systems/electrical/bus/dc1", 28);
setprop("/systems/electrical/bus/dc-ess", 28);
} else if (stateL == 3 and gen1_sw) {
setprop("/systems/electrical/bus/ac1", 115);
setprop("/systems/electrical/bus/ac-ess", 115);
setprop("/systems/electrical/bus/dc1", 28);
setprop("/systems/electrical/bus/dc-ess", 28);
} else if (apu_ext_crosstie_sw == 1 and xtieL) {
setprop("/systems/electrical/bus/ac1", 115);
setprop("/systems/electrical/bus/ac-ess", 115);
setprop("/systems/electrical/bus/dc1", 28);
setprop("/systems/electrical/bus/dc-ess", 28);
} else {
setprop("/systems/electrical/bus/ac1", 0);
if (getprop("/systems/electrical/bus/ac2") == 0) {
setprop("/systems/electrical/bus/ac-ess", 0);
}
setprop("/systems/electrical/bus/dc1", 0);
if (getprop("/systems/electrical/bus/dc2") == 0) {
setprop("/systems/electrical/bus/dc-ess", 0);
}
}
# Right AC/DC bus yes?
@ -142,24 +151,31 @@ var master_elec = func {
setprop("/systems/electrical/bus/ac2", 115);
setprop("/systems/electrical/bus/ac-ess", 115);
setprop("/systems/electrical/bus/dc2", 28);
setprop("/systems/electrical/bus/dc-ess", 28);
} else if (rpmapu >= 99 and gen_apu_sw) {
setprop("/systems/electrical/bus/ac2", 115);
setprop("/systems/electrical/bus/ac-ess", 115);
setprop("/systems/electrical/bus/dc2", 28);
setprop("/systems/electrical/bus/dc-ess", 28);
} else if (stateR == 3 and gen2_sw) {
setprop("/systems/electrical/bus/ac2", 115);
setprop("/systems/electrical/bus/ac-ess", 115);
setprop("/systems/electrical/bus/dc2", 28);
setprop("/systems/electrical/bus/dc-ess", 28);
} else if (apu_ext_crosstie_sw == 1 and xtieR) {
setprop("/systems/electrical/bus/ac2", 115);
setprop("/systems/electrical/bus/ac-ess", 115);
setprop("/systems/electrical/bus/dc2", 28);
setprop("/systems/electrical/bus/dc-ess", 28);
} else {
setprop("/systems/electrical/bus/ac2", 0);
if (getprop("/systems/electrical/bus/ac1") == 0) {
setprop("/systems/electrical/bus/ac-ess", 0);
}
setprop("/systems/electrical/bus/dc2", 0);
if (getprop("/systems/electrical/bus/dc1") == 0) {
setprop("/systems/electrical/bus/dc-ess", 0);
}
}
if (ac_ess >= 100) {

View file

@ -24,11 +24,13 @@ var apu_egt_max = 513;
var spinup_time = 15;
var start_time = 10;
var egt_lightup_time = 3;
var egt_lightdn_time = 7;
var egt_lightdn_time = 11;
var shutdown_time = 20;
var egt_shutdown_time = 20;
setprop("/systems/apu/rpm", 0);
setprop("/systems/apu/egt", 42);
setprop("/controls/engines/engine[0]/reverser", 0);
setprop("/controls/engines/engine[1]/reverser", 0);
##############################
# Trigger Startups and Stops #
@ -183,6 +185,62 @@ setlistener("/controls/APU/bleed", func {
}
});
#########################
# Reverse Thrust System #
#########################
var do_rev_thrust = func {
if ((getprop("/controls/engines/engine[0]/reverser") == "1") and (getprop("/controls/engines/engine[1]/reverser") == "1") and (getprop("/gear/gear[1]/wow") == 1) and (getprop("/gear/gear[2]/wow") == 1)) {
var pos1 = getprop("/controls/engines/engine[0]/throttle-pos");
var pos2 = getprop("/controls/engines/engine[1]/throttle-pos");
if (pos1 < 0.25) {
setprop("/controls/engines/engine[0]/throttle-pos", pos1 + 0.05);
}
if (pos2 < 0.25) {
setprop("/controls/engines/engine[1]/throttle-pos", pos2 + 0.05);
}
}
var state1 = getprop("/systems/thrust/state1");
var state2 = getprop("/systems/thrust/state2");
if ((state1 == "IDLE") and (state2 == "IDLE") and (getprop("/controls/engines/engine[0]/reverser") == "0") and (getprop("/controls/engines/engine[1]/reverser") == "0") and (getprop("/gear/gear[1]/wow") == 1) and (getprop("/gear/gear[2]/wow") == 1)) {
interpolate("/engines/engine[0]/reverser-pos-norm", 1, 1.4);
interpolate("/engines/engine[1]/reverser-pos-norm", 1, 1.4);
setprop("/controls/engines/engine[0]/reverser", 1);
setprop("/controls/engines/engine[1]/reverser", 1);
setprop("/controls/engines/engine[0]/throttle-pos", 0);
setprop("/controls/engines/engine[1]/throttle-pos", 0);
setprop("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 3.14);
setprop("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 3.14);
}
}
var un_rev_thrust = func {
if ((getprop("/controls/engines/engine[0]/reverser") == "1") and (getprop("/controls/engines/engine[1]/reverser") == "1")) {
interpolate("/engines/engine[0]/reverser-pos-norm", 0, 1.0);
interpolate("/engines/engine[1]/reverser-pos-norm", 0, 1.0);
var pos1 = getprop("/controls/engines/engine[0]/throttle-pos");
var pos2 = getprop("/controls/engines/engine[1]/throttle-pos");
if (pos1 > 0.0) {
setprop("/controls/engines/engine[0]/throttle-pos", pos1 - 0.05);
} else {
un_rev_thrust_b();
}
if (pos2 > 0.0) {
setprop("/controls/engines/engine[1]/throttle-pos", pos2 - 0.05);
} else {
un_rev_thrust_b();
}
}
}
var un_rev_thrust_b = func {
setprop("/controls/engines/engine[0]/throttle-pos", 0);
setprop("/controls/engines/engine[1]/throttle-pos", 0);
setprop("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 0);
setprop("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 0);
setprop("/controls/engines/engine[0]/reverser", 0);
setprop("/controls/engines/engine[1]/reverser", 0);
}
# Timers
var eng_one_auto_startt = maketimer(0.5, eng_one_auto_start);
var eng_one_n2_checkt = maketimer(0.5, eng_one_n2_check);

View file

@ -1,5 +1,5 @@
# A320 FBW System by Joshua Davidson (it0uchpods/411)
# V0.8
# V0.9
var roll_input = func {
@ -8,59 +8,59 @@ var roll_input = func {
if (ail >= 0.05 and ail < 0.15) {
var rfbw = getprop("/it-fbw/roll-deg");
setprop("/it-fbw/roll-deg", rfbw + "0.01");
setprop("/it-fbw/roll-deg", rfbw + "0.005");
} else if (ail >= 0.15 and ail < 0.3) {
var rfbw = getprop("/it-fbw/roll-deg");
setprop("/it-fbw/roll-deg", rfbw + "0.05");
setprop("/it-fbw/roll-deg", rfbw + "0.01");
} else if (ail >= 0.3 and ail < 0.5) {
var rfbw = getprop("/it-fbw/roll-deg");
setprop("/it-fbw/roll-deg", rfbw + "0.1");
setprop("/it-fbw/roll-deg", rfbw + "0.05");
} else if (ail >= 0.5 and ail < 0.7) {
var rfbw = getprop("/it-fbw/roll-deg");
setprop("/it-fbw/roll-deg", rfbw + "0.2");
setprop("/it-fbw/roll-deg", rfbw + "0.1");
} else if (ail >= 0.7 and ail <= 1) {
var rfbw = getprop("/it-fbw/roll-deg");
setprop("/it-fbw/roll-deg", rfbw + "0.3");
setprop("/it-fbw/roll-deg", rfbw + "0.2");
}
if (ail <= -0.05 and ail > -0.15) {
var rfbw = getprop("/it-fbw/roll-deg");
setprop("/it-fbw/roll-deg", rfbw - "0.01");
setprop("/it-fbw/roll-deg", rfbw - "0.005");
} else if (ail <= -0.15 and ail > -0.3) {
var rfbw = getprop("/it-fbw/roll-deg");
setprop("/it-fbw/roll-deg", rfbw - "0.05");
setprop("/it-fbw/roll-deg", rfbw - "0.01");
} else if (ail <= -0.3 and ail > -0.5) {
var rfbw = getprop("/it-fbw/roll-deg");
setprop("/it-fbw/roll-deg", rfbw - "0.1");
setprop("/it-fbw/roll-deg", rfbw - "0.05");
} else if (ail <= -0.5 and ail > -0.7) {
var rfbw = getprop("/it-fbw/roll-deg");
setprop("/it-fbw/roll-deg", rfbw - "0.2");
setprop("/it-fbw/roll-deg", rfbw - "0.1");
} else if (ail <= -0.7 and ail >= -1) {
var rfbw = getprop("/it-fbw/roll-deg");
setprop("/it-fbw/roll-deg", rfbw - "0.3");
setprop("/it-fbw/roll-deg", rfbw - "0.2");
}
}
if (getprop("/it-fbw/roll-deg") >= 30) {
if (getprop("/it-fbw/roll-deg") >= 33) {
if (getprop("/it-fbw/law") == "NORMAL") {
if (ail > 0.4) {
if (getprop("/it-fbw/roll-deg") >= 65) {
setprop("/it-fbw/roll-deg", "65");
if (getprop("/it-fbw/roll-deg") >= 67) {
setprop("/it-fbw/roll-deg", "67");
}
} else {
setprop("/it-fbw/roll-deg", "30");
setprop("/it-fbw/roll-deg", "33");
}
}
}
if (getprop("/it-fbw/roll-deg") <= -30) {
if (getprop("/it-fbw/roll-deg") <= -33) {
if (getprop("/it-fbw/law") == "NORMAL") {
if (ail < -0.4) {
if (getprop("/it-fbw/roll-deg") <= -65) {
setprop("/it-fbw/roll-deg", "-65");
if (getprop("/it-fbw/roll-deg") <= -67) {
setprop("/it-fbw/roll-deg", "-67");
}
} else {
setprop("/it-fbw/roll-deg", "-30");
setprop("/it-fbw/roll-deg", "-33");
}
}
}
@ -74,8 +74,9 @@ var roll_input = func {
var pitch_input = func {
var elev = getprop("/controls/flight/elevator");
if (getprop("/it-autoflight/output/ap1") == 0 and getprop("/it-autoflight/output/ap2") == 0 and ((getprop("/it-fbw/law") == "NORMAL") or (getprop("/it-fbw/law") == "ALTERNATE"))) {
var elev = getprop("/controls/flight/elevator");
if (elev >= 0.05 and elev < 0.15) {
var pfbw = getprop("/it-fbw/pitch-deg");
@ -91,7 +92,7 @@ var pitch_input = func {
setprop("/it-fbw/pitch-deg", pfbw - "0.1");
} else if (elev >= 0.7 and elev <= 1) {
var pfbw = getprop("/it-fbw/pitch-deg");
setprop("/it-fbw/pitch-deg", pfbw - "0.15");
setprop("/it-fbw/pitch-deg", pfbw - "0.2");
}
if (elev <= -0.05 and elev > -0.15) {
@ -108,7 +109,26 @@ var pitch_input = func {
setprop("/it-fbw/pitch-deg", pfbw + "0.1");
} else if (elev <= -0.7 and elev >= -1) {
var pfbw = getprop("/it-fbw/pitch-deg");
setprop("/it-fbw/pitch-deg", pfbw + "0.15");
setprop("/it-fbw/pitch-deg", pfbw + "0.2");
}
if ((getprop("/controls/flight/flap-lever") >= 3) and (getprop("/controls/engines/engine[0]/throttle") < 0.65) and (getprop("/controls/engines/engine[1]/throttle") < 0.65) and (getprop("/position/gear-agl-ft") <= 50)) {
if (elev > -0.05 and elev < 0.05) {
var pfbw = getprop("/it-fbw/pitch-deg");
setprop("/it-fbw/pitch-deg", pfbw - "0.003");
}
var gear1 = setlistener("/gear/gear[1]/wow", func {
if (getprop("/gear/gear[1]/wow") == 1 and getprop("/gear/gear[2]/wow") == 1) {
removelistener(gear1);
setprop("/controls/flight/elevator-trim", -0.1);
}
});
var gear2 = setlistener("/gear/gear[2]/wow", func {
if (getprop("/gear/gear[1]/wow") == 1 and getprop("/gear/gear[2]/wow") == 1) {
removelistener(gear2);
setprop("/controls/flight/elevator-trim", -0.1);
}
});
}
}
@ -129,7 +149,6 @@ var pitch_input = func {
}
}
var elev = getprop("/controls/flight/elevator");
if (getprop("/gear/gear[0]/wow") == 1) {
if (elev > -0.1 and elev < 0.1) {
setprop("/it-fbw/pitch-deg", getprop("/orientation/pitch-deg"));
@ -164,8 +183,8 @@ setlistener("/it-fbw/law", func {
});
setlistener("/sim/signals/fdm-initialized", func {
setprop("/it-fbw/law", "DIRECT"); # Will be changed to NORMAL when electric system powers up, as soon as I get the FBW/FDM stable
setprop("/it-fbw/law", "NORMAL");
roll_input();
pitch_input();
# print("AIRBUS FBW ... OK!") # Don't advertise until it's working! ;)
print("AIRBUS FBW ... OK!");
});

View file

@ -1,6 +1,7 @@
# A320 Throttle Control System by Joshua Davidson (it0uchpods/411)
# Set A/THR modes to Custom IT-AUTOTHRUST, and other thrust modes like MCT, TOGA and eventually TO FLEX.
# V1.8
# Also handles FADEC
# V1.9
setlistener("/sim/signals/fdm-initialized", func {
setprop("/systems/thrust/state1", "IDLE");
@ -8,11 +9,11 @@ setlistener("/sim/signals/fdm-initialized", func {
setprop("/systems/thrust/lvrclb", "0");
setprop("/systems/thrust/clbreduc-ft", "1500");
lvrclb();
print("Thrust System ... Done!")
print("FADEC ... Done!")
});
setlistener("/controls/engines/engine[0]/throttle", func {
var thrr = getprop("/controls/engines/engine[0]/throttle");
setlistener("/controls/engines/engine[0]/throttle-pos", func {
var thrr = getprop("/controls/engines/engine[0]/throttle-pos");
if (thrr < 0.05) {
setprop("/systems/thrust/state1", "IDLE");
atoff_request();
@ -36,8 +37,8 @@ setlistener("/controls/engines/engine[0]/throttle", func {
}
});
setlistener("/controls/engines/engine[1]/throttle", func {
var thrr = getprop("/controls/engines/engine[1]/throttle");
setlistener("/controls/engines/engine[1]/throttle-pos", func {
var thrr = getprop("/controls/engines/engine[1]/throttle-pos");
if (thrr < 0.05) {
setprop("/systems/thrust/state2", "IDLE");
atoff_request();
@ -69,8 +70,6 @@ var atoff_request = func {
setprop("/it-autoflight/input/athr", 0);
setprop("/systems/thrust/at1", 0);
setprop("/systems/thrust/at2", 0);
setprop("/systems/thrust/at3", 0);
setprop("/systems/thrust/at4", 0);
}
}
@ -92,4 +91,4 @@ var lvrclb = func {
}
}
settimer(lvrclb, 0.5);
}
}

View file

@ -165,5 +165,39 @@
</input>
<output>/instrumentation/vertical-speed-indicator/indicated-speed-fpm-pfd</output>
</filter>
<filter>
<name>Throttle L</name>
<type>gain</type>
<gain>1</gain>
<enable>
<condition>
<equals>
<property>/controls/engines/engine[0]/reverser</property>
<value>0</value>
</equals>
</condition>
</enable>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>/controls/engines/engine[0]/throttle</input>
<output>/controls/engines/engine[0]/throttle-pos</output>
</filter>
<filter>
<name>Throttle R</name>
<type>gain</type>
<gain>1</gain>
<enable>
<condition>
<equals>
<property>/controls/engines/engine[1]/reverser</property>
<value>0</value>
</equals>
</condition>
</enable>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>/controls/engines/engine[1]/throttle</input>
<output>/controls/engines/engine[1]/throttle-pos</output>
</filter>
</PropertyList>

View file

@ -204,7 +204,7 @@
<product>
<table>
<product><property>/engines/engine[0]/n1</property><value>0.01</value> </product>
<entry><ind>0.85</ind> <dep>0.00</dep></entry>
<entry><ind>0.80</ind> <dep>0.00</dep></entry>
<entry><ind>1.08</ind> <dep>0.70</dep></entry>
</table>
</product>
@ -223,7 +223,7 @@
<product>
<table>
<product><property>/engines/engine[1]/n1</property><value>0.01</value> </product>
<entry><ind>0.85</ind> <dep>0.00</dep></entry>
<entry><ind>0.80</ind> <dep>0.00</dep></entry>
<entry><ind>1.08</ind> <dep>0.70</dep></entry>
</table>
</product>
@ -346,9 +346,8 @@
<product>
<table>
<product><property>/engines/engine[0]/n1</property><value>0.01</value> </product>
<entry><ind>0.90</ind> <dep>0.80</dep></entry>
<entry><ind>1.01</ind> <dep>0.90</dep></entry>
<entry><ind>1.08</ind> <dep>0.96</dep></entry>
<entry><ind>0.85</ind> <dep>0.80</dep></entry>
<entry><ind>1.08</ind> <dep>1.28</dep></entry>
</table>
</product>
</expression>
@ -366,9 +365,8 @@
<product>
<table>
<product><property>/engines/engine[1]/n1</property><value>0.01</value> </product>
<entry><ind>0.90</ind> <dep>0.80</dep></entry>
<entry><ind>1.01</ind> <dep>0.90</dep></entry>
<entry><ind>1.08</ind> <dep>0.96</dep></entry>
<entry><ind>0.85</ind> <dep>0.80</dep></entry>
<entry><ind>1.08</ind> <dep>1.28</dep></entry>
</table>
</product>
</expression>

View file

@ -22,6 +22,14 @@
<property>/it-autoflight/output/ap2</property>
<value>0</value>
</equals>
<equals>
<property>/gear/gear[1]/wow</property>
<value>0</value>
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>0</value>
</equals>
<or>
<equals>
<property>/it-fbw/law</property>
@ -45,24 +53,14 @@
<property>/controls/flight/aileron-fbw-cmd</property>
</output>
<config>
<Kp>
<property>/it-autoflight/config/roll/kp</property>
</Kp>
<beta>1.0</beta>
<alpha>0.1</alpha>
<gamma>0.0</gamma>
<Ti>
<property>/it-autoflight/config/roll/ti</property>
</Ti>
<Td>
<property>/it-autoflight/config/roll/td</property>
</Td>
<u_min>
<property>/it-autoflight/config/roll/umin</property>
</u_min>
<u_max>
<property>/it-autoflight/config/roll/umax</property>
</u_max>
<Kp>0.12</Kp>
<beta>1</beta>
<alpha>0.1</alpha>
<gamma>0</gamma>
<Ti>10</Ti>
<Td>0.00001</Td>
<u_min>-1</u_min>
<u_max>1</u_max>
</config>
</pid-controller>
@ -82,10 +80,14 @@
<property>/it-autoflight/output/ap2</property>
<value>0</value>
</equals>
<greater-than>
<property>/position/gear-agl-ft</property>
<value>1</value>
</greater-than>
<equals>
<property>/gear/gear[1]/wow</property>
<value>0</value>
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>0</value>
</equals>
<or>
<equals>
<property>/it-fbw/law</property>
@ -111,10 +113,14 @@
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</equals>
<less-than-equals>
<property>/position/gear-agl-ft</property>
<equals>
<property>/gear/gear[1]/wow</property>
<value>1</value>
</less-than-equals>
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>1</value>
</equals>
<equals>
<property>/it-fbw/law</property>
<value>DIRECT</value>
@ -155,6 +161,14 @@
<property>/it-autoflight/output/ap2</property>
<value>0</value>
</equals>
<equals>
<property>/gear/gear[1]/wow</property>
<value>0</value>
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>0</value>
</equals>
<or>
<equals>
<property>/it-fbw/law</property>
@ -178,24 +192,14 @@
<property>/controls/flight/elevator-fbw-cmd</property>
</output>
<config>
<Kp>
<property>/it-autoflight/config/pitch/kp</property>
</Kp>
<beta>1.0</beta>
<alpha>0.1</alpha>
<gamma>0.0</gamma>
<Ti>
<property>/it-autoflight/config/pitch/ti</property>
</Ti>
<Td>
<property>/it-autoflight/config/pitch/td</property>
</Td>
<u_min>
<property>/it-autoflight/config/pitch/umin</property>
</u_min>
<u_max>
<property>/it-autoflight/config/pitch/umax</property>
</u_max>
<Kp>-0.20</Kp>
<beta>1</beta>
<alpha>0.1</alpha>
<gamma>0</gamma>
<Ti>10</Ti>
<Td>0.00001</Td>
<u_min>-1</u_min>
<u_max>1</u_max>
</config>
</pid-controller>
@ -215,10 +219,14 @@
<property>/it-autoflight/output/ap2</property>
<value>0</value>
</equals>
<greater-than>
<property>/position/gear-agl-ft</property>
<value>1</value>
</greater-than>
<equals>
<property>/gear/gear[1]/wow</property>
<value>0</value>
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>0</value>
</equals>
<or>
<equals>
<property>/it-fbw/law</property>
@ -244,10 +252,14 @@
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</equals>
<less-than-equals>
<property>/position/gear-agl-ft</property>
<equals>
<property>/gear/gear[1]/wow</property>
<value>1</value>
</less-than-equals>
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>1</value>
</equals>
<equals>
<property>/it-fbw/law</property>
<value>DIRECT</value>

View file

@ -13,7 +13,7 @@
<input>
<expression>
<table>
<property>/controls/engines/engine[0]/throttle</property>
<property>/controls/engines/engine[0]/throttle-pos</property>
<entry><ind>0.00</ind><dep>0.00</dep></entry>
<entry><ind>0.60</ind><dep>0.83</dep></entry>
<entry><ind>0.65</ind><dep>0.83</dep></entry>
@ -34,7 +34,7 @@
<input>
<expression>
<table>
<property>/controls/engines/engine[1]/throttle</property>
<property>/controls/engines/engine[1]/throttle-pos</property>
<entry><ind>0.00</ind><dep>0.00</dep></entry>
<entry><ind>0.60</ind><dep>0.83</dep></entry>
<entry><ind>0.65</ind><dep>0.83</dep></entry>