A3XX: FMGC AP bugfixes
This commit is contained in:
parent
44ee50e1cb
commit
d5e4949cbd
4 changed files with 63 additions and 59 deletions
|
@ -9,6 +9,8 @@
|
|||
# IT-AUTOFLIGHT Based Autopilot #
|
||||
#################################
|
||||
|
||||
setprop("/it-autoflight/internal/heading-deg", 0);
|
||||
setprop("/it-autoflight/internal/track-deg", 0);
|
||||
setprop("/it-autoflight/internal/vert-speed-fpm", 0);
|
||||
setprop("/it-autoflight/internal/heading-5-sec-ahead", 0);
|
||||
setprop("/it-autoflight/internal/altitude-5-sec-ahead", 0);
|
||||
|
@ -251,7 +253,7 @@ var lateral = func {
|
|||
alandt1.stop();
|
||||
setprop("/it-autoflight/output/loc-armed", 0);
|
||||
setprop("/it-autoflight/output/appr-armed", 0);
|
||||
var hdg5sec = int(getprop("/it-autoflight/internal/heading-5-sec-ahead") + 0.5);
|
||||
var hdg5sec = math.round(getprop("/it-autoflight/internal/heading-5-sec-ahead"));
|
||||
setprop("/it-autoflight/input/hdg", hdg5sec);
|
||||
setprop("/it-autoflight/output/lat", 0);
|
||||
setprop("/it-autoflight/mode/lat", "HDG");
|
||||
|
@ -288,9 +290,9 @@ var lat_arm = func {
|
|||
}
|
||||
} else if (latset == 3) {
|
||||
if (getprop("/it-autoflight/custom/trk-fpa") == 1) {
|
||||
var hdgnow = int(getprop("/instrumentation/pfd/track-deg") + 0.5);
|
||||
var hdgnow = math.round(getprop("/it-autoflight/internal/track-deg"));
|
||||
} else {
|
||||
var hdgnow = int(getprop("/instrumentation/pfd/heading-deg") + 0.5);
|
||||
var hdgnow = math.round(getprop("/it-autoflight/internal/heading-deg"));
|
||||
}
|
||||
setprop("/it-autoflight/input/hdg", hdgnow);
|
||||
setprop("/it-autoflight/input/lat-arm", 0);
|
||||
|
@ -621,7 +623,7 @@ setlistener("/it-autoflight/input/toga", func {
|
|||
|
||||
var togasel = func {
|
||||
if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/gear/gear[2]/wow") == 0)) {
|
||||
var iasnow = int(getprop("/instrumentation/airspeed-indicator/indicated-speed-kt")+0.5);
|
||||
var iasnow = math.round(getprop("/instrumentation/airspeed-indicator/indicated-speed-kt"));
|
||||
setprop("/it-autoflight/input/spd-kts", iasnow);
|
||||
setprop("/it-autoflight/input/kts-mach", 0);
|
||||
setprop("/it-autoflight/mode/vert", "G/A CLB");
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<value>0</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/instrumentation/pfd/heading-deg</property>
|
||||
<property>/it-autoflight/internal/heading-deg</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
|
@ -33,7 +33,7 @@
|
|||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/instrumentation/pfd/track-deg</property>
|
||||
<property>/it-autoflight/internal/track-deg</property>
|
||||
</input>
|
||||
<output>/it-autoflight/internal/heading-5-sec-ahead</output>
|
||||
<seconds>5.0</seconds>
|
||||
|
@ -385,6 +385,58 @@
|
|||
<input>/instrumentation/airspeed-indicator/indicated-mach</input>
|
||||
<output>/it-autoflight/input/spd-mach</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>HEADING DEG</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<condition>
|
||||
<property>/instrumentation/efis/mfd/true-north</property>
|
||||
</condition>
|
||||
<property>/orientation/heading-deg</property>
|
||||
</input>
|
||||
<input>
|
||||
<property>/orientation/heading-magnetic-deg</property>
|
||||
</input>
|
||||
<reference>0</reference>
|
||||
<output>/it-autoflight/internal/heading-deg</output>
|
||||
<output>/instrumentation/pfd/heading-deg</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>TRACK DEG</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<condition>
|
||||
<and>
|
||||
<property>/instrumentation/efis/mfd/true-north</property>
|
||||
<greater-than>
|
||||
<property>/velocities/groundspeed-kt</property>
|
||||
<value>1</value>
|
||||
</greater-than>
|
||||
</and>
|
||||
</condition>
|
||||
<property>/orientation/track-deg</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<and>
|
||||
<not><property>/instrumentation/efis/mfd/true-north</property></not>
|
||||
<greater-than>
|
||||
<property>/velocities/groundspeed-kt</property>
|
||||
<value>1</value>
|
||||
</greater-than>
|
||||
</and>
|
||||
</condition>
|
||||
<property>/orientation/track-magnetic-deg</property>
|
||||
</input>
|
||||
<input>/instrumentation/pfd/heading-deg</input>
|
||||
<reference>0</reference>
|
||||
<output>/it-autoflight/internal/track-deg</output>
|
||||
<output>/instrumentation/pfd/track-deg</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>HEADING ERROR DEG</name>
|
||||
|
@ -405,7 +457,7 @@
|
|||
</condition>
|
||||
<property>/it-autoflight/input/hdg</property>
|
||||
<offset>
|
||||
<property>/instrumentation/pfd/heading-deg</property>
|
||||
<property>/it-autoflight/internal/heading-deg</property>
|
||||
<scale>-1.0</scale>
|
||||
</offset>
|
||||
</input>
|
||||
|
@ -424,7 +476,7 @@
|
|||
</condition>
|
||||
<property>/it-autoflight/input/hdg</property>
|
||||
<offset>
|
||||
<property>/instrumentation/pfd/track-deg</property>
|
||||
<property>/it-autoflight/internal/track-deg</property>
|
||||
<scale>-1.0</scale>
|
||||
</offset>
|
||||
</input>
|
||||
|
|
|
@ -50,56 +50,6 @@
|
|||
<output>/instrumentation/pfd/mng-alt-diff</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Heading Deg</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<condition>
|
||||
<property>/instrumentation/efis/mfd/true-north</property>
|
||||
</condition>
|
||||
<property>/orientation/heading-deg</property>
|
||||
</input>
|
||||
<input>
|
||||
<property>/orientation/heading-magnetic-deg</property>
|
||||
</input>
|
||||
<reference>0</reference>
|
||||
<output>/instrumentation/pfd/heading-deg</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Track Deg</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<condition>
|
||||
<and>
|
||||
<property>/instrumentation/efis/mfd/true-north</property>
|
||||
<greater-than>
|
||||
<property>/velocities/groundspeed-kt</property>
|
||||
<value>1</value>
|
||||
</greater-than>
|
||||
</and>
|
||||
</condition>
|
||||
<property>/orientation/track-deg</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<and>
|
||||
<not><property>/instrumentation/efis/mfd/true-north</property></not>
|
||||
<greater-than>
|
||||
<property>/velocities/groundspeed-kt</property>
|
||||
<value>1</value>
|
||||
</greater-than>
|
||||
</and>
|
||||
</condition>
|
||||
<property>/orientation/track-magnetic-deg</property>
|
||||
</input>
|
||||
<input>/instrumentation/pfd/heading-deg</input>
|
||||
<reference>0</reference>
|
||||
<output>/instrumentation/pfd/track-deg</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Track heading diff</name>
|
||||
<type>gain</type>
|
||||
|
|
|
@ -1 +1 @@
|
|||
4004
|
||||
4005
|
Reference in a new issue