A3XX: FMGC ILS improvements
This commit is contained in:
parent
50035ad9ae
commit
4e26c2a787
6 changed files with 36 additions and 40 deletions
|
@ -119,7 +119,7 @@
|
||||||
<path>Aircraft/IDG-A32X/Systems/it-fbw.xml</path>
|
<path>Aircraft/IDG-A32X/Systems/it-fbw.xml</path>
|
||||||
</autopilot>
|
</autopilot>
|
||||||
<autopilot n="3">
|
<autopilot n="3">
|
||||||
<path>Aircraft/IDG-A32X/Systems/fmgc-b.xml</path>
|
<path>Aircraft/IDG-A32X/Systems/fmgc-drivers.xml</path>
|
||||||
</autopilot>
|
</autopilot>
|
||||||
<autopilot n="4">
|
<autopilot n="4">
|
||||||
<path>Aircraft/IDG-A32X/Systems/fmgc-roll-yaw.xml</path>
|
<path>Aircraft/IDG-A32X/Systems/fmgc-roll-yaw.xml</path>
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
<path>Aircraft/IDG-A32X/Systems/fmgc-pitch.xml</path>
|
<path>Aircraft/IDG-A32X/Systems/fmgc-pitch.xml</path>
|
||||||
</autopilot>
|
</autopilot>
|
||||||
<autopilot n="6">
|
<autopilot n="6">
|
||||||
<path>Aircraft/IDG-A32X/Systems/custom-autothrust.xml</path>
|
<path>Aircraft/IDG-A32X/Systems/fmgc-thrust.xml</path>
|
||||||
</autopilot>
|
</autopilot>
|
||||||
<autopilot n="7">
|
<autopilot n="7">
|
||||||
<path>Aircraft/IDG-A32X/Systems/libraries.xml</path>
|
<path>Aircraft/IDG-A32X/Systems/libraries.xml</path>
|
||||||
|
@ -1211,7 +1211,6 @@
|
||||||
<libraries>
|
<libraries>
|
||||||
<file>Aircraft/IDG-A32X/Nasal/libraries.nas</file>
|
<file>Aircraft/IDG-A32X/Nasal/libraries.nas</file>
|
||||||
<file>Aircraft/IDG-A32X/Nasal/buttons.nas</file>
|
<file>Aircraft/IDG-A32X/Nasal/buttons.nas</file>
|
||||||
<file>Aircraft/IDG-A32X/Nasal/PFD_FMA.nas</file>
|
|
||||||
<file>Aircraft/IDG-A32X/Nasal/gpws.nas</file>
|
<file>Aircraft/IDG-A32X/Nasal/gpws.nas</file>
|
||||||
<file>Aircraft/IDG-A32X/Nasal/efis.nas</file>
|
<file>Aircraft/IDG-A32X/Nasal/efis.nas</file>
|
||||||
<file>Aircraft/IDG-A32X/Nasal/ECAM.nas</file>
|
<file>Aircraft/IDG-A32X/Nasal/ECAM.nas</file>
|
||||||
|
@ -1239,6 +1238,7 @@
|
||||||
<fmgc>
|
<fmgc>
|
||||||
<file>Aircraft/IDG-A32X/Nasal/FMGC.nas</file>
|
<file>Aircraft/IDG-A32X/Nasal/FMGC.nas</file>
|
||||||
<file>Aircraft/IDG-A32X/Nasal/FMGC-b.nas</file>
|
<file>Aircraft/IDG-A32X/Nasal/FMGC-b.nas</file>
|
||||||
|
<file>Aircraft/IDG-A32X/Nasal/FMGC-c.nas</file>
|
||||||
</fmgc>
|
</fmgc>
|
||||||
<mcdu1>
|
<mcdu1>
|
||||||
<file>Aircraft/IDG-A32X/Nasal/MCDU1/MCDU.nas</file>
|
<file>Aircraft/IDG-A32X/Nasal/MCDU1/MCDU.nas</file>
|
||||||
|
|
|
@ -16,7 +16,6 @@ setprop("/it-autoflight/internal/altitude-5-sec-ahead", 0);
|
||||||
setlistener("/sim/signals/fdm-initialized", func {
|
setlistener("/sim/signals/fdm-initialized", func {
|
||||||
var trueSpeedKts = getprop("/instrumentation/airspeed-indicator/true-speed-kt");
|
var trueSpeedKts = getprop("/instrumentation/airspeed-indicator/true-speed-kt");
|
||||||
var locdefl = getprop("/instrumentation/nav[0]/heading-needle-deflection-norm");
|
var locdefl = getprop("/instrumentation/nav[0]/heading-needle-deflection-norm");
|
||||||
var locdefl_b = getprop("/instrumentation/nav[1]/heading-needle-deflection-norm");
|
|
||||||
var signal = getprop("/instrumentation/nav[0]/gs-needle-deflection-norm");
|
var signal = getprop("/instrumentation/nav[0]/gs-needle-deflection-norm");
|
||||||
var VS = getprop("/velocities/vertical-speed-fps");
|
var VS = getprop("/velocities/vertical-speed-fps");
|
||||||
var TAS = getprop("/velocities/uBody-fps");
|
var TAS = getprop("/velocities/uBody-fps");
|
||||||
|
@ -235,13 +234,13 @@ var lateral = func {
|
||||||
gui.popupTip("Please make sure you have a route set, and that it is Activated!");
|
gui.popupTip("Please make sure you have a route set, and that it is Activated!");
|
||||||
}
|
}
|
||||||
} else if (latset == 2) {
|
} else if (latset == 2) {
|
||||||
if (getprop("/it-autoflight/output/lat") == 2) {
|
if (getprop("/instrumentation/nav[0]/in-range") == 1) {
|
||||||
# Do nothing because VOR/LOC is active
|
if (getprop("/it-autoflight/output/lat") != 2) {
|
||||||
|
setprop("/it-autoflight/output/loc-armed", 1);
|
||||||
|
setprop("/it-autoflight/mode/arm", "LOC");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
setprop("/instrumentation/nav[0]/signal-quality-norm", 0);
|
setprop("/instrumentation/nav[0]/signal-quality-norm", 0);
|
||||||
setprop("/instrumentation/nav[1]/signal-quality-norm", 0);
|
|
||||||
setprop("/it-autoflight/output/loc-armed", 1);
|
|
||||||
setprop("/it-autoflight/mode/arm", "LOC");
|
|
||||||
}
|
}
|
||||||
} else if (latset == 3) {
|
} else if (latset == 3) {
|
||||||
alandt.stop();
|
alandt.stop();
|
||||||
|
@ -338,19 +337,17 @@ var vertical = func {
|
||||||
}
|
}
|
||||||
thrustmode();
|
thrustmode();
|
||||||
} else if (vertset == 2) {
|
} else if (vertset == 2) {
|
||||||
if (getprop("/it-autoflight/output/lat") == 2) {
|
if (getprop("/instrumentation/nav[0]/in-range") == 1) {
|
||||||
# Do nothing because VOR/LOC is active
|
if (getprop("/it-autoflight/output/lat") != 2) {
|
||||||
|
setprop("/it-autoflight/output/loc-armed", 1);
|
||||||
|
}
|
||||||
|
if (getprop("/it-autoflight/output/vert") != 2 and getprop("/it-autoflight/output/vert") != 6) {
|
||||||
|
setprop("/it-autoflight/output/appr-armed", 1);
|
||||||
|
setprop("/it-autoflight/mode/arm", "ILS");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
setprop("/instrumentation/nav[0]/signal-quality-norm", 0);
|
setprop("/instrumentation/nav[0]/signal-quality-norm", 0);
|
||||||
setprop("/instrumentation/nav[1]/signal-quality-norm", 0);
|
|
||||||
setprop("/it-autoflight/output/loc-armed", 1);
|
|
||||||
}
|
|
||||||
if ((getprop("/it-autoflight/output/vert") == 2) or (getprop("/it-autoflight/output/vert") == 6)) {
|
|
||||||
# Do nothing because G/S or LAND or FLARE is active
|
|
||||||
} else {
|
|
||||||
setprop("/instrumentation/nav[0]/gs-rate-of-climb", 0);
|
setprop("/instrumentation/nav[0]/gs-rate-of-climb", 0);
|
||||||
setprop("/it-autoflight/output/appr-armed", 1);
|
|
||||||
setprop("/it-autoflight/mode/arm", "ILS");
|
|
||||||
}
|
}
|
||||||
} else if (vertset == 3) {
|
} else if (vertset == 3) {
|
||||||
alandt.stop();
|
alandt.stop();
|
||||||
|
@ -788,23 +785,22 @@ var check_arms = func {
|
||||||
}
|
}
|
||||||
|
|
||||||
var update_arms = func {
|
var update_arms = func {
|
||||||
if (getprop("/it-autoflight/output/loc-armed")) {
|
if (getprop("/instrumentation/nav[0]/in-range") == 1) {
|
||||||
locdefl = getprop("/instrumentation/nav[0]/heading-needle-deflection-norm");
|
if (getprop("/it-autoflight/output/loc-armed")) {
|
||||||
locdefl_b = getprop("/instrumentation/nav[1]/heading-needle-deflection-norm");
|
locdefl = abs(getprop("/instrumentation/nav[0]/heading-needle-deflection-norm"));
|
||||||
if ((locdefl < 0.9233) and (getprop("/instrumentation/nav[0]/signal-quality-norm") > 0.99) and (getprop("/FMGC/internal/loc-source") == "NAV0")) {
|
if (locdefl < 0.95 and locdefl != 0 and getprop("/instrumentation/nav[0]/signal-quality-norm") > 0.99) {
|
||||||
make_loc_active();
|
make_loc_active();
|
||||||
} else if ((locdefl_b < 0.9233) and (getprop("/instrumentation/nav[2]/signal-quality-norm") > 0.99) and (getprop("/FMGC/internal/loc-source") == "VOR0")) {
|
} else {
|
||||||
make_loc_active();
|
return 0;
|
||||||
} else {
|
}
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
}
|
if (getprop("/it-autoflight/output/appr-armed")) {
|
||||||
if (getprop("/it-autoflight/output/appr-armed")) {
|
signal = getprop("/instrumentation/nav[0]/gs-needle-deflection-norm");
|
||||||
signal = getprop("/instrumentation/nav[0]/gs-needle-deflection-norm");
|
if (((signal < 0 and signal >= -0.20) or (signal > 0 and signal <= 0.20)) and getprop("/it-autoflight/output/lat") == 2) {
|
||||||
if (((signal < 0 and signal >= -0.30) or (signal > 0 and signal <= 0.30)) and (getprop("/FMGC/internal/loc-source") == "NAV0") and (getprop("/it-autoflight/output/lat") == 2)) {
|
make_appr_active();
|
||||||
make_appr_active();
|
} else {
|
||||||
} else {
|
return 0;
|
||||||
return 0;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Airbus PFD FMA
|
# A3XX FMGC/Autoflight
|
||||||
# Joshua Davidson (it0uchpods)
|
# Joshua Davidson (it0uchpods) and Jonathan Redpath (legoboyvdlp)
|
||||||
|
|
||||||
#########################################
|
#########################################
|
||||||
# Copyright (c) it0uchpods Design Group #
|
# Copyright (c) it0uchpods Design Group #
|
||||||
|
@ -237,9 +237,9 @@ setlistener("/it-autoflight/mode/lat", func {
|
||||||
var locupdate = maketimer(0.5, func {
|
var locupdate = maketimer(0.5, func {
|
||||||
var lat = getprop("/it-autoflight/mode/lat");
|
var lat = getprop("/it-autoflight/mode/lat");
|
||||||
var newlat = getprop("/modes/pfd/fma/roll-mode");
|
var newlat = getprop("/modes/pfd/fma/roll-mode");
|
||||||
var nav_defl = getprop("/it-autoflight/internal/nav-heading-error-deg");
|
var nav_defl = getprop("/instrumentation/nav[0]/heading-needle-deflection-norm");
|
||||||
if (lat == "LOC") {
|
if (lat == "LOC") {
|
||||||
if (nav_defl > -1 and nav_defl < 1) {
|
if (nav_defl > -0.15 and nav_defl < 0.15) {
|
||||||
locupdate.stop();
|
locupdate.stop();
|
||||||
if (newlat != "LOC") {
|
if (newlat != "LOC") {
|
||||||
setprop("/modes/pfd/fma/roll-mode", "LOC");
|
setprop("/modes/pfd/fma/roll-mode", "LOC");
|
|
@ -1 +1 @@
|
||||||
3063
|
3064
|
Reference in a new issue