FMGC: Install new speed on pitch system, hook up FADEC properly to engage SRS/RWY, bugfixes
This commit is contained in:
parent
5df1032bd1
commit
0f4dd9a4b9
8 changed files with 217 additions and 80 deletions
|
@ -898,6 +898,9 @@
|
|||
<starter type="bool">0</starter>
|
||||
<starter-switch type="bool">0</starter-switch>
|
||||
<max-athr-thrust type="double">0.94</max-athr-thrust>
|
||||
<!-- Remove these throttles... -->
|
||||
<throttle-lever type="double">0</throttle-lever>
|
||||
<throttle-pos type="double">0</throttle-pos>
|
||||
<throttle-output type="double">0</throttle-output>
|
||||
<throttle-fdm type="double">0</throttle-fdm>
|
||||
<throttle-rev type="double">0</throttle-rev>
|
||||
|
@ -917,6 +920,10 @@
|
|||
<starter type="bool">0</starter>
|
||||
<starter-switch type="bool">0</starter-switch>
|
||||
<max-athr-thrust type="double">0.94</max-athr-thrust>
|
||||
<max-athr-thrust type="double">0.94</max-athr-thrust>
|
||||
<!-- Remove these throttles... -->
|
||||
<throttle-lever type="double">0</throttle-lever>
|
||||
<throttle-pos type="double">0</throttle-pos>
|
||||
<throttle-output type="double">0</throttle-output>
|
||||
<throttle-fdm type="double">0</throttle-fdm>
|
||||
<throttle-rev type="double">0</throttle-rev>
|
||||
|
|
|
@ -361,10 +361,10 @@ var canvas_PFD_base = {
|
|||
fd_roll_cur = fd_roll.getValue();
|
||||
fd_pitch_cur = fd_pitch.getValue();
|
||||
if (fd_roll_cur != nil) {
|
||||
me["FD_roll"].setTranslation((fd_roll_cur) * 2.2, 0);
|
||||
me["FD_roll"].setTranslation(fd_roll_cur * 2.2, 0);
|
||||
}
|
||||
if (fd_pitch_cur != nil) {
|
||||
me["FD_pitch"].setTranslation(0, -(fd_pitch_cur) * 3.8);
|
||||
me["FD_pitch"].setTranslation(0, fd_pitch_cur * -11.825);
|
||||
}
|
||||
|
||||
gear_agl_cur = gear_agl.getValue();
|
||||
|
|
|
@ -192,13 +192,13 @@ var loopFMA = maketimer(0.05, func {
|
|||
engstate2 = pts.Engines.Engine.state[1].getValue();
|
||||
if (((state1 == "TOGA" or state2 == "TOGA") or (flx == 1 and (state1 == "MCT" or state2 == "MCT")) or (flx == 1 and ((state1 == "MAN THR" and systems.FADEC.manThrAboveMct[0]) or (state2 == "MAN THR" and systems.FADEC.manThrAboveMct[1])))) and (engstate1 == 3 or engstate2 == 3)) {
|
||||
# RWY Engagement would go here, but automatic ILS selection is not simulated yet.
|
||||
gear1 = pts.Gear.wow[0].getValue();
|
||||
gear1 = pts.Gear.wow[1].getValue();
|
||||
if (gear1 and FMGCInternal.v2set and Output.vert.getValue() != 7) {
|
||||
ITAF.setVertMode(7);
|
||||
Text.vert.setValue("T/O CLB");
|
||||
ITAF.updateVertText("T/O CLB");
|
||||
}
|
||||
} else {
|
||||
gear1 = pts.Gear.wow[0].getValue();
|
||||
gear1 = pts.Gear.wow[1].getValue();
|
||||
gear2 = pts.Gear.wow[2].getValue();
|
||||
if (Input.lat.getValue() == 5 and (gear1 or gear2)) {
|
||||
ITAF.setLatMode(9);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# Copyright (c) 2021 Josh Davidson (Octal450)
|
||||
|
||||
print("------------------------------------------------");
|
||||
print("Copyright (c) 2016-2020 Josh Davidson (Octal450)");
|
||||
print("Copyright (c) 2016-2021 Josh Davidson (Octal450)");
|
||||
print("------------------------------------------------");
|
||||
|
||||
# Disable specific menubar items
|
||||
|
|
|
@ -12,11 +12,7 @@
|
|||
<property value="104">fadec/limit/max-n1</property>
|
||||
<property value="1">fadec/limit/active-epr</property> <!-- Unused in this engine -->
|
||||
|
||||
<!-- Remap/remove this sh*t -->
|
||||
<property value="0">/controls/engines/engine[0]/throttle-lever</property>
|
||||
<property value="0">/controls/engines/engine[0]/throttle-pos</property>
|
||||
<property value="0">/controls/engines/engine[1]/throttle-lever</property>
|
||||
<property value="0">/controls/engines/engine[1]/throttle-pos</property>
|
||||
<!-- TODO -->
|
||||
<property value="20">fadec/limit/idle</property>
|
||||
|
||||
<channel name="Thrust Limits">
|
||||
|
|
|
@ -304,6 +304,143 @@
|
|||
<output>/it-autoflight/input/mach</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Knots Rate</name>
|
||||
<type>derivative</type>
|
||||
<input>/velocities/airspeed-kt</input>
|
||||
<output>/it-autoflight/internal/kts-rate-raw</output>
|
||||
<filter-time>1.0</filter-time>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Knots Rate Lag</name>
|
||||
<debug>false</debug>
|
||||
<type>exponential</type>
|
||||
<input>
|
||||
<condition>
|
||||
<less-than>
|
||||
<property>/velocities/airspeed-kt</property>
|
||||
<value>80</value>
|
||||
</less-than>
|
||||
</condition>
|
||||
<value>0</value>
|
||||
</input>
|
||||
<input>/it-autoflight/internal/kts-rate-raw</input>
|
||||
<output>/it-autoflight/internal/kts-rate</output>
|
||||
<filter-time>0.08</filter-time>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Flch Knots Rate Command</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/it-autoflight/mode/vert</property>
|
||||
<value>T/O CLB</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<expression>
|
||||
<product>
|
||||
<difference>
|
||||
<sum>
|
||||
<property>/it-autoflight/settings/togaspd</property>
|
||||
<value>10</value>
|
||||
</sum>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
|
||||
</difference>
|
||||
<value>0.08</value>
|
||||
</product>
|
||||
</expression>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/it-autoflight/input/kts-mach</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<expression>
|
||||
<product>
|
||||
<difference>
|
||||
<property>/it-autoflight/input/mach</property>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-mach</property>
|
||||
</difference>
|
||||
<value>80</value>
|
||||
</product>
|
||||
</expression>
|
||||
</input>
|
||||
<input>
|
||||
<expression>
|
||||
<product>
|
||||
<difference>
|
||||
<property>/it-autoflight/input/kts</property>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
|
||||
</difference>
|
||||
<value>0.08</value>
|
||||
</product>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/it-autoflight/internal/flch-kts-error-cmd</output>
|
||||
<min>-1.5</min>
|
||||
<max>1.5</max>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Flch Knots Rate Filter</name>
|
||||
<type>noise-spike</type>
|
||||
<feedback-if-disabled>true</feedback-if-disabled>
|
||||
<initialize-to>output</initialize-to>
|
||||
<input>/it-autoflight/internal/flch-kts-error-cmd</input>
|
||||
<output>/it-autoflight/internal/flch-kts-error</output>
|
||||
<max-rate-of-change>
|
||||
<condition>
|
||||
<and>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>4</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>7</value>
|
||||
</equals>
|
||||
</or>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
<equals>
|
||||
<property>/gear/gear[1]/wow</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/gear/gear[2]/wow</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
</and>
|
||||
</condition>
|
||||
<value>2.5</value>
|
||||
</max-rate-of-change>
|
||||
<max-rate-of-change>100</max-rate-of-change>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Heading Deg</name>
|
||||
<type>gain</type>
|
||||
|
@ -518,7 +655,7 @@
|
|||
<name>VS Abs</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<update-interval-secs type="double">0.02</update-interval-secs>
|
||||
<update-interval-secs>0.02</update-interval-secs>
|
||||
<input>
|
||||
<expression>
|
||||
<abs>
|
||||
|
@ -533,7 +670,7 @@
|
|||
<name>FPA Abs</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<update-interval-secs type="double">0.02</update-interval-secs>
|
||||
<update-interval-secs>0.02</update-interval-secs>
|
||||
<input>
|
||||
<expression>
|
||||
<abs>
|
||||
|
@ -617,7 +754,7 @@
|
|||
<div>
|
||||
<property>/orientation/roll-deg</property>
|
||||
<table>
|
||||
<property>/fdm/jsbsim/velocities/vc-kts</property>
|
||||
<property>/velocities/airspeed-kt</property>
|
||||
<entry><ind>140</ind><dep>1.8</dep></entry>
|
||||
<entry><ind>360</ind><dep>2.8</dep></entry>
|
||||
</table>
|
||||
|
@ -638,7 +775,7 @@
|
|||
<div>
|
||||
<property>/orientation/roll-deg</property>
|
||||
<table>
|
||||
<property>/fdm/jsbsim/velocities/vc-kts</property>
|
||||
<property>/velocities/airspeed-kt</property>
|
||||
<entry><ind>140</ind><dep>1.8</dep></entry>
|
||||
<entry><ind>360</ind><dep>2.8</dep></entry>
|
||||
</table>
|
||||
|
@ -777,9 +914,9 @@
|
|||
<property>/it-autoflight/internal/vert-speed-fpm</property>
|
||||
</difference>
|
||||
<table>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-mach</property>
|
||||
<entry><ind>0.20</ind><dep>0.004</dep></entry>
|
||||
<entry><ind>0.95</ind><dep>0.002</dep></entry>
|
||||
<property>/velocities/airspeed-kt</property>
|
||||
<entry><ind>140</ind><dep>0.001848350</dep></entry>
|
||||
<entry><ind>360</ind><dep>0.000924175</dep></entry>
|
||||
</table>
|
||||
</product>
|
||||
</expression>
|
||||
|
|
|
@ -69,49 +69,36 @@
|
|||
<property>/it-autoflight/internal/flch-active</property>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/it-autoflight/input/kts-mach</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/kts-predicted-15</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/it-autoflight/input/kts-mach</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/mach-predicted-15</property>
|
||||
<scale>750</scale>
|
||||
</input>
|
||||
<reference>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/it-autoflight/input/kts-mach</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/flch-kts</property>
|
||||
</reference>
|
||||
<reference>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/it-autoflight/input/kts-mach</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/flch-mach</property>
|
||||
<scale>750</scale>
|
||||
</reference>
|
||||
<input>/it-autoflight/internal/kts-rate</input>
|
||||
<reference>/it-autoflight/internal/flch-kts-error</reference>
|
||||
<output>/it-autoflight/internal/target-fpm-flch</output>
|
||||
<config>
|
||||
<Kp>-55</Kp>
|
||||
<Ti>2.5</Ti>
|
||||
<Td>0.001</Td>
|
||||
<Kp>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/velocities/airspeed-kt</property>
|
||||
<entry><ind>140</ind><dep>-390</dep></entry>
|
||||
<entry><ind>360</ind><dep>-430</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</Kp>
|
||||
<Ti>1.3</Ti>
|
||||
<Td>0.0</Td>
|
||||
<u_min>
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/gear/gear[1]/wow</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/gear/gear[2]/wow</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
<value>0</value>
|
||||
</u_min>
|
||||
<u_min>
|
||||
<condition>
|
||||
<equals>
|
||||
|
@ -119,34 +106,36 @@
|
|||
<value>2</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<value>120</value>
|
||||
<expression>
|
||||
<max>
|
||||
<value>120</value>
|
||||
<difference>
|
||||
<property>/it-autoflight/internal/vert-speed-fpm</property>
|
||||
<value>2000</value>
|
||||
</difference>
|
||||
</max>
|
||||
</expression>
|
||||
</u_min>
|
||||
<u_min>
|
||||
<expression>
|
||||
<difference>
|
||||
<property>/it-autoflight/internal/vert-speed-fpm</property>
|
||||
<value>2500</value>
|
||||
<value>2000</value>
|
||||
</difference>
|
||||
</expression>
|
||||
</u_min>
|
||||
<u_max>
|
||||
<condition>
|
||||
<and>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/thr-mode</property>
|
||||
<value>2</value>
|
||||
<property>/gear/gear[1]/wow</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/gear/gear[1]/wow</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/gear/gear[2]/wow</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</and>
|
||||
<equals>
|
||||
<property>/gear/gear[2]/wow</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
<value>1000</value>
|
||||
</u_max>
|
||||
|
@ -157,13 +146,21 @@
|
|||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<value>-120</value>
|
||||
<expression>
|
||||
<min>
|
||||
<value>-120</value>
|
||||
<sum>
|
||||
<property>/it-autoflight/internal/vert-speed-fpm</property>
|
||||
<value>2000</value>
|
||||
</sum>
|
||||
</min>
|
||||
</expression>
|
||||
</u_max>
|
||||
<u_max>
|
||||
<expression>
|
||||
<sum>
|
||||
<property>/it-autoflight/internal/vert-speed-fpm</property>
|
||||
<value>2500</value>
|
||||
<value>2000</value>
|
||||
</sum>
|
||||
</expression>
|
||||
</u_max>
|
||||
|
@ -489,7 +486,7 @@
|
|||
</condition>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/fdm/jsbsim/velocities/vc-kts</property>
|
||||
<property>/velocities/airspeed-kt</property>
|
||||
<entry><ind>140</ind><dep>0.0029</dep></entry>
|
||||
<entry><ind>360</ind><dep>0.0009</dep></entry>
|
||||
</table>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<gain>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/fdm/jsbsim/velocities/vc-kts</property>
|
||||
<property>/velocities/airspeed-kt</property>
|
||||
<entry><ind>140</ind><dep>1.8</dep></entry>
|
||||
<entry><ind>360</ind><dep>2.8</dep></entry>
|
||||
</table>
|
||||
|
@ -70,7 +70,7 @@
|
|||
<gain>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/fdm/jsbsim/velocities/vc-kts</property>
|
||||
<property>/velocities/airspeed-kt</property>
|
||||
<entry><ind>140</ind><dep>1.8</dep></entry>
|
||||
<entry><ind>360</ind><dep>2.8</dep></entry>
|
||||
</table>
|
||||
|
|
Loading…
Add table
Reference in a new issue