Skip to content

Commit 0b052f2

Browse files
committed
fix(fm): ils auto-selection robustness (#8080)
* fix(fm): improve ils selection robustness * fix(fm): fix criteria for rendering selected navaid
1 parent 815d33a commit 0b052f2

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

.github/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
1. [LIGHTS] Fixed trim decal emissive and floods - @FinalLightNL (FinalLight#2113)
1818
1. [EFB] Fixed Simbridge failing to connect if remote setting is enabled then disabled - @DevonDF (Devon#9451)
1919
1. [SIM] fix(sim): only shown nav radio tip once @tracernz (Mike)
20+
1. [FMS] Improved robustness of ILS selection - @tracernz (Mike)
2021

2122
## 0.10.0
2223

fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_SelectedNavaids.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class CDUSelectedNavaids {
5353
const selectedNavaids = mcdu.getSelectedNavaids();
5454

5555
for (const [i, navaid] of selectedNavaids.entries()) {
56-
if (navaid.frequency === null) {
56+
if (navaid.frequency < 1) {
5757
continue;
5858
}
5959

fbw-a32nx/src/systems/fmgc/src/navigation/LandingSystemSelectionManager.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,15 @@ export class LandingSystemSelectionManager {
7070
await this.selectDepartureIls();
7171
} else if (phase >= FmgcFlightPhase.Descent) {
7272
await this.selectApproachIls();
73-
} else if (this.pposValid) {
73+
} else if (this.pposValid && phase >= FmgcFlightPhase.Cruise) {
7474
const destination = this.fpm.getDestination(FlightPlans.Active);
7575
if (destination && distanceTo(this.ppos, destination.infos.coordinates) <= LandingSystemSelectionManager.DESTINATION_TUNING_DISTANCE) {
7676
await this.selectApproachIls();
77+
} else if (this._selectedIls !== null) {
78+
this.resetSelectedIls();
7779
}
80+
} else if (this._selectedIls !== null) {
81+
this.resetSelectedIls();
7882
}
7983
} catch (e) {
8084
console.error('Failed to select ILS', e);
@@ -117,8 +121,8 @@ export class LandingSystemSelectionManager {
117121
const airport = this.fpm.getDestination(FlightPlans.Active);
118122
const approach = this.fpm.getApproach(FlightPlans.Active);
119123

120-
if (this.isTunableApproach(approach?.approachType) && this.setIlsFromApproach(airport, approach, true)) {
121-
return true;
124+
if (this.isTunableApproach(approach?.approachType)) {
125+
return this.setIlsFromApproach(airport, approach, true);
122126
}
123127

124128
// if we got here there wasn't a suitable ILS

fbw-a32nx/src/systems/fmgc/src/navigation/NavaidTuner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ export class NavaidTuner {
386386
for (const [i, mmr] of this.mmrTuningStatus.entries()) {
387387
const autoFacility = this.landingSystemSelectionManager.selectedIls ?? undefined;
388388
const autoCourse = this.landingSystemSelectionManager.selectedLocCourse;
389-
if (!mmr.manual && mmr.facility?.icao !== autoFacility?.icao && autoCourse !== null) {
389+
if (!mmr.manual && mmr.facility?.icao !== autoFacility?.icao && (autoCourse !== null || autoFacility === undefined)) {
390390
mmr.databaseCourse = autoCourse;
391391
mmr.databaseBackcourse = this.landingSystemSelectionManager.selectedApprBackcourse;
392392
mmr.course = mmr.databaseCourse;

0 commit comments

Comments
 (0)