This commit is contained in:
Jonathan Redpath 2019-01-29 18:21:17 +00:00
commit 134f6bfaf3
7 changed files with 139 additions and 107 deletions

View file

@ -54,7 +54,7 @@
<text> <text>
<halign>left</halign> <halign>left</halign>
<label>Model shader must be at least 1 for lightmaps to work.</label> <label>Model shader must be at least 2 for lightmaps to work.</label>
</text> </text>
<hrule/> <hrule/>

View file

@ -29,7 +29,7 @@ var new = func(layer) {
#m.addVisibilityListener(); #m.addVisibilityListener();
var driver = opt_member(m.layer.options, 'route_driver'); var driver = opt_member(m.layer.options, 'route_driver');
if(driver == nil){ if(driver == nil){
driver = RouteDriver.new(); driver = A3XXRouteDriver.new();
} }
var driver_listeners = driver.getListeners(); var driver_listeners = driver.getListeners();
foreach(var listener; driver_listeners){ foreach(var listener; driver_listeners){

View file

@ -281,10 +281,14 @@ var thrust_loop = maketimer(0.04, func {
setprop("/systems/thrust/alpha-floor", 1); setprop("/systems/thrust/alpha-floor", 1);
setprop("/systems/thrust/toga-lk", 0); setprop("/systems/thrust/toga-lk", 0);
setprop("/it-autoflight/input/athr", 1); setprop("/it-autoflight/input/athr", 1);
setprop("/controls/engines/engine[0]/throttle-fdm", 0.99);
setprop("/controls/engines/engine[1]/throttle-fdm", 0.99);
} else if (getprop("/systems/thrust/alpha-floor") == 1 and alpha < togaLock) { } else if (getprop("/systems/thrust/alpha-floor") == 1 and alpha < togaLock) {
setprop("/systems/thrust/alpha-floor", 0); setprop("/systems/thrust/alpha-floor", 0);
setprop("/it-autoflight/input/athr", 1); setprop("/it-autoflight/input/athr", 1);
setprop("/systems/thrust/toga-lk", 1); setprop("/systems/thrust/toga-lk", 1);
setprop("/controls/engines/engine[0]/throttle-fdm", 0.99);
setprop("/controls/engines/engine[1]/throttle-fdm", 0.99);
} }
} else { } else {
setprop("/systems/thrust/alpha-floor", 0); setprop("/systems/thrust/alpha-floor", 0);

View file

@ -305,11 +305,11 @@
<independentVar lookup="row">attitude/roll-rad</independentVar> <independentVar lookup="row">attitude/roll-rad</independentVar>
<independentVar lookup="column">fbw/roll/a-i</independentVar> <independentVar lookup="column">fbw/roll/a-i</independentVar>
<tableData> <tableData>
-1.0 -0.1 0.0 0.1 1.0 -1.0 0.0 1.0
-1.169370 0.261799 0.000000 0.000000 0.000000 0.000000 -1.169370 0.261799 0.000000 0.000000
-1.082100 0.000000 0.000000 0.000000 0.000000 0.000000 -1.082100 0.000000 0.000000 0.000000
1.082100 0.000000 0.000000 0.000000 0.000000 0.000000 1.082100 0.000000 0.000000 0.000000
1.169370 0.000000 0.000000 0.000000 0.000000 -0.261799 1.169370 0.000000 0.000000 -0.261799
</tableData> </tableData>
</table> </table>
<table> <table>
@ -464,11 +464,6 @@
<output>fbw/roll/pid</output> <output>fbw/roll/pid</output>
</pid> </pid>
<pure_gain name="fbw/roll/rudder-inv">
<input>fbw/fmgc/yaw-cmd</input>
<gain>-0.5</gain>
</pure_gain>
<switch name="fbw/roll/gear-law-switch"> <switch name="fbw/roll/gear-law-switch">
<default value="0"/> <default value="0"/>
<test logic="OR" value="1"> <test logic="OR" value="1">
@ -478,6 +473,24 @@
</test> </test>
</switch> </switch>
<fcs_function name="fbw/roll/rollout-cmd">
<function>
<product>
<table>
<independentVar lookup="row">/orientation/roll-deg</independentVar>
<tableData>
-30 -30
-1 0
0 0
1 0
30 30
</tableData>
</table>
<value>-0.1</value>
</product>
</function>
</fcs_function>
<switch name="fbw/aileron-output"> <switch name="fbw/aileron-output">
<default value="0"/> <default value="0"/>
<test logic="AND" value="fbw/roll/pid"> <test logic="AND" value="fbw/roll/pid">
@ -488,7 +501,7 @@
fbw/fmgc/enabled eq 0 fbw/fmgc/enabled eq 0
fbw/roll/gear-law-switch eq 1 fbw/roll/gear-law-switch eq 1
</test> </test>
<test logic="AND" value="fbw/roll/rudder-inv"> <test logic="AND" value="fbw/roll/rollout-cmd">
fbw/fmgc/enabled eq 1 fbw/fmgc/enabled eq 1
position/wow eq 1 position/wow eq 1
/it-fbw/law eq 0 /it-fbw/law eq 0
@ -946,6 +959,11 @@
<test logic="AND" value="0.1"> <test logic="AND" value="0.1">
fbw/fmgc/enabled eq 1 fbw/fmgc/enabled eq 1
position/wow eq 1 position/wow eq 1
gear/unit[0]/WOW eq 0
</test>
<test logic="AND" value="0.05">
fbw/fmgc/enabled eq 1
position/wow eq 1
</test> </test>
<test logic="AND" value="0"> <test logic="AND" value="0">
/it-fbw/law eq 3 /it-fbw/law eq 3
@ -972,7 +990,7 @@
attitude/roll-rad lt 0.628319 attitude/roll-rad lt 0.628319
attitude/roll-rad gt -0.628319 attitude/roll-rad gt -0.628319
fbw/pitch/pid-switched ge 0.01 fbw/pitch/pid-switched ge 0.01
forces/load-factor lt -0.5 fbw/pitch/g-instrumented ge 0.5
/it-fbw/protections/overspeed ne 1 /it-fbw/protections/overspeed ne 1
/controls/flight/elevator-trim le 0.32 /controls/flight/elevator-trim le 0.32
position/wow eq 0 position/wow eq 0
@ -983,7 +1001,7 @@
attitude/roll-rad lt 0.628319 attitude/roll-rad lt 0.628319
attitude/roll-rad gt -0.628319 attitude/roll-rad gt -0.628319
fbw/pitch/pid-switched le -0.01 fbw/pitch/pid-switched le -0.01
forces/load-factor lt -0.5 fbw/pitch/g-instrumented ge 0.5
/it-fbw/protections/overspeed ne 1 /it-fbw/protections/overspeed ne 1
/controls/flight/elevator-trim ge -1.0 /controls/flight/elevator-trim ge -1.0
position/wow eq 0 position/wow eq 0
@ -1043,6 +1061,76 @@
<channel name="FBW: Yaw"> <channel name="FBW: Yaw">
<fcs_function name="fbw/yaw/max-deg-fac">
<function>
<table>
<independentVar lookup="row">velocities/vc-kts</independentVar>
<tableData>
160.00 25.000
162.15 23.649
165.02 22.226
168.64 21.015
172.25 19.734
176.59 18.595
181.67 17.525
186.75 16.385
191.83 15.316
197.65 14.318
205.65 13.247
212.93 12.318
219.48 11.462
227.48 10.533
236.96 9.7450
246.43 8.8863
255.18 8.0990
266.12 7.4525
277.06 6.7704
288.00 6.0884
299.67 5.5124
311.35 5.0075
323.03 4.5736
335.44 4.2104
347.13 3.9186
358.81 3.6979
370.50 3.5482
380.00 3.4000
</tableData>
</table>
</function>
</fcs_function>
<switch name="fbw/yaw/max-deg-switch">
<default value="25"/>
<test logic="AND" value="fbw/yaw/max-deg-fac">
/systems/fctl/fac1 eq 1
/systems/fctl/fac2 eq 1
/gear/gear[1]/wow eq 0
/gear/gear[2]/wow eq 0
</test>
<test logic="AND" value="fbw/yaw/max-deg-fac">
/controls/flight/slats eq 0
/gear/gear[1]/wow eq 0
/gear/gear[2]/wow eq 0
</test>
</switch>
<aerosurface_scale name="fbw/yaw/max-deg-scale">
<input>fbw/yaw/max-deg-switch</input>
<domain>
<min>-25</min>
<max>25</max>
</domain>
<range>
<min>-1</min>
<max>1</max>
</range>
</aerosurface_scale>
<pure_gain name="fbw/yaw/max-deg-scale-neg">
<input>fbw/yaw/max-deg-scale</input>
<gain>-1.0</gain>
</pure_gain>
<fcs_function name="fbw/yaw/rudder-nul"> <fcs_function name="fbw/yaw/rudder-nul">
<function> <function>
<table> <table>
@ -1059,6 +1147,18 @@
</function> </function>
</fcs_function> </fcs_function>
<fcs_function name="fbw/yaw/rudder-nul-scheduled">
<function>
<quotient>
<product>
<property>fbw/yaw/rudder-nul</property>
<property>fbw/yaw/max-deg-switch</property>
</product>
<value>25.0</value>
</quotient>
</function>
</fcs_function>
<switch name="fbw/yaw/autoland-switch"> <switch name="fbw/yaw/autoland-switch">
<default value="0"/> <default value="0"/>
<test logic="AND" value="1"> <test logic="AND" value="1">
@ -1139,7 +1239,7 @@
</switch> </switch>
<switch name="fbw/rudder-output"> <switch name="fbw/rudder-output">
<default value="fbw/yaw/rudder-nul"/> <default value="fbw/yaw/rudder-nul-scheduled"/>
<test logic="AND" value="fbw/yaw/output-sum"> <test logic="AND" value="fbw/yaw/output-sum">
fbw/yaw/law-switch eq 1 fbw/yaw/law-switch eq 1
fbw/yaw/rudder-nul eq 0 fbw/yaw/rudder-nul eq 0
@ -1484,76 +1584,6 @@
<channel name="Rudder"> <channel name="Rudder">
<fcs_function name="hydraulics/rudder/max-deg-fac">
<function>
<table>
<independentVar lookup="row">/velocities/airspeed-kt</independentVar>
<tableData>
160.00 25.000
162.15 23.649
165.02 22.226
168.64 21.015
172.25 19.734
176.59 18.595
181.67 17.525
186.75 16.385
191.83 15.316
197.65 14.318
205.65 13.247
212.93 12.318
219.48 11.462
227.48 10.533
236.96 9.7450
246.43 8.8863
255.18 8.0990
266.12 7.4525
277.06 6.7704
288.00 6.0884
299.67 5.5124
311.35 5.0075
323.03 4.5736
335.44 4.2104
347.13 3.9186
358.81 3.6979
370.50 3.5482
380.00 3.4000
</tableData>
</table>
</function>
</fcs_function>
<switch name="hydraulics/rudder/max-deg-switch">
<default value="25"/>
<test logic="AND" value="hydraulics/rudder/max-deg-fac">
/systems/fctl/fac1 eq 1
/systems/fctl/fac2 eq 1
/gear/gear[1]/wow eq 0
/gear/gear[2]/wow eq 0
</test>
<test logic="AND" value="hydraulics/rudder/max-deg-fac">
/controls/flight/slats eq 0
/gear/gear[1]/wow eq 0
/gear/gear[2]/wow eq 0
</test>
</switch>
<aerosurface_scale name="hydraulics/rudder/max-deg-scale">
<input>hydraulics/rudder/max-deg-switch</input>
<domain>
<min>-25</min>
<max>25</max>
</domain>
<range>
<min>-1</min>
<max>1</max>
</range>
</aerosurface_scale>
<pure_gain name="hydraulics/rudder/max-deg-scale-neg">
<input>hydraulics/rudder/max-deg-scale</input>
<gain>-1.0</gain>
</pure_gain>
<switch name="hydraulics/rudder/pressure-switch-or"> <switch name="hydraulics/rudder/pressure-switch-or">
<default value="0"/> <default value="0"/>
<test logic="OR" value="1"> <test logic="OR" value="1">
@ -1599,8 +1629,8 @@
/systems/failures/rudder eq 0 /systems/failures/rudder eq 0
</test> </test>
<clipto> <clipto>
<min>hydraulics/rudder/max-deg-scale-neg</min> <min>fbw/yaw/max-deg-scale-neg</min>
<max>hydraulics/rudder/max-deg-scale</max> <max>fbw/yaw/max-deg-scale</max>
</clipto> </clipto>
</switch> </switch>

View file

@ -183,8 +183,8 @@
<expression> <expression>
<table> <table>
<property>/fdm/jsbsim/atmosphere/density-altitude</property> <property>/fdm/jsbsim/atmosphere/density-altitude</property>
<entry><ind> 0</ind><dep>0.681</dep></entry> <entry><ind> 0</ind><dep>0.6738</dep></entry>
<entry><ind>42000</ind><dep>0.757</dep></entry> <entry><ind>42000</ind><dep>0.7570</dep></entry>
</table> </table>
</expression> </expression>
</input> </input>
@ -217,8 +217,8 @@
<difference> <difference>
<table> <table>
<property>/fdm/jsbsim/atmosphere/density-altitude</property> <property>/fdm/jsbsim/atmosphere/density-altitude</property>
<entry><ind> 0</ind><dep>0.9824</dep></entry> <entry><ind> 0</ind><dep>0.9867</dep></entry>
<entry><ind>43000</ind><dep>0.8581</dep></entry> <entry><ind>43000</ind><dep>0.8584</dep></entry>
</table> </table>
<table> <table>
<property>/fdm/jsbsim/velocities/mach</property> <property>/fdm/jsbsim/velocities/mach</property>
@ -262,8 +262,8 @@
<property>/engines/engine[0]/n1-actual</property> <property>/engines/engine[0]/n1-actual</property>
<value>3.5</value> <value>3.5</value>
</pow> </pow>
<entry><ind> 18.0</ind><dep>0.00</dep></entry> <entry><ind> 24743.1</ind><dep>0.00</dep></entry>
<entry><ind> 22.4</ind><dep>0.03</dep></entry> <entry><ind> 53194.6</ind><dep>0.03</dep></entry>
<entry><ind>11394381.0</ind><dep>1.00</dep></entry> <entry><ind>11394381.0</ind><dep>1.00</dep></entry>
</table> </table>
</expression> </expression>
@ -317,7 +317,7 @@
</table> </table>
<value>3.5</value> <value>3.5</value>
</pow> </pow>
<entry><ind> 22.4</ind><dep>0.03</dep></entry> <entry><ind> 53194.6</ind><dep>0.03</dep></entry>
<entry><ind>11394381.0</ind><dep>1.00</dep></entry> <entry><ind>11394381.0</ind><dep>1.00</dep></entry>
</table> </table>
</expression> </expression>
@ -334,7 +334,7 @@
</table> </table>
<value>3.5</value> <value>3.5</value>
</pow> </pow>
<entry><ind> 22.4</ind><dep>0.03</dep></entry> <entry><ind> 53194.6</ind><dep>0.03</dep></entry>
<entry><ind>11394381.0</ind><dep>1.00</dep></entry> <entry><ind>11394381.0</ind><dep>1.00</dep></entry>
</table> </table>
</expression> </expression>
@ -369,8 +369,8 @@
<property>/engines/engine[1]/n1-actual</property> <property>/engines/engine[1]/n1-actual</property>
<value>3.5</value> <value>3.5</value>
</pow> </pow>
<entry><ind> 18.0</ind><dep>0.00</dep></entry> <entry><ind> 24743.1</ind><dep>0.00</dep></entry>
<entry><ind> 22.4</ind><dep>0.03</dep></entry> <entry><ind> 53194.6</ind><dep>0.03</dep></entry>
<entry><ind>11394381.0</ind><dep>1.00</dep></entry> <entry><ind>11394381.0</ind><dep>1.00</dep></entry>
</table> </table>
</expression> </expression>
@ -424,7 +424,7 @@
</table> </table>
<value>3.5</value> <value>3.5</value>
</pow> </pow>
<entry><ind> 22.4</ind><dep>0.03</dep></entry> <entry><ind> 53194.6</ind><dep>0.03</dep></entry>
<entry><ind>11394381.0</ind><dep>1.00</dep></entry> <entry><ind>11394381.0</ind><dep>1.00</dep></entry>
</table> </table>
</expression> </expression>
@ -441,7 +441,7 @@
</table> </table>
<value>3.5</value> <value>3.5</value>
</pow> </pow>
<entry><ind> 22.4</ind><dep>0.03</dep></entry> <entry><ind> 53194.6</ind><dep>0.03</dep></entry>
<entry><ind>11394381.0</ind><dep>1.00</dep></entry> <entry><ind>11394381.0</ind><dep>1.00</dep></entry>
</table> </table>
</expression> </expression>
@ -1348,7 +1348,7 @@
</table> </table>
<value>3.5</value> <value>3.5</value>
</pow> </pow>
<entry><ind> 22.4</ind><dep>0.03</dep></entry> <entry><ind> 53194.6</ind><dep>0.03</dep></entry>
<entry><ind>11394381.0</ind><dep>1.00</dep></entry> <entry><ind>11394381.0</ind><dep>1.00</dep></entry>
</table> </table>
</expression> </expression>
@ -1392,7 +1392,7 @@
</table> </table>
<value>3.5</value> <value>3.5</value>
</pow> </pow>
<entry><ind> 22.4</ind><dep>0.03</dep></entry> <entry><ind> 53194.6</ind><dep>0.03</dep></entry>
<entry><ind>11394381.0</ind><dep>1.00</dep></entry> <entry><ind>11394381.0</ind><dep>1.00</dep></entry>
</table> </table>
</expression> </expression>
@ -1436,7 +1436,7 @@
</table> </table>
<value>3.5</value> <value>3.5</value>
</pow> </pow>
<entry><ind> 22.4</ind><dep>0.03</dep></entry> <entry><ind> 53194.6</ind><dep>0.03</dep></entry>
<entry><ind>11394381.0</ind><dep>1.00</dep></entry> <entry><ind>11394381.0</ind><dep>1.00</dep></entry>
</table> </table>
</expression> </expression>
@ -1480,7 +1480,7 @@
</table> </table>
<value>3.5</value> <value>3.5</value>
</pow> </pow>
<entry><ind> 22.4</ind><dep>0.03</dep></entry> <entry><ind> 53194.6</ind><dep>0.03</dep></entry>
<entry><ind>11394381.0</ind><dep>1.00</dep></entry> <entry><ind>11394381.0</ind><dep>1.00</dep></entry>
</table> </table>
</expression> </expression>

View file

@ -261,8 +261,6 @@
<name>IT-CONTROLLER: RUDDER CMD</name> <name>IT-CONTROLLER: RUDDER CMD</name>
<debug>false</debug> <debug>false</debug>
<type>noise-spike</type> <type>noise-spike</type>
<feedback-if-disabled>true</feedback-if-disabled>
<initialize-to>output</initialize-to>
<input> <input>
<condition> <condition>
<and> <and>

View file

@ -1 +1 @@
4741 4748