Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rmp): RMP navigation tuning #7241

Merged
merged 101 commits into from
Dec 29, 2022

Conversation

juliansebline
Copy link
Contributor

@juliansebline juliansebline commented May 26, 2022

Fixes #4044
Fixes #7457

Summary of Changes

This PR makes:

  1. The RMPs able to tune the navigation instruments
  2. The listening of ident of the different instruments possible
  3. The Voice button serviceable (cancellation of all idents)

Screenshots (if necessary)

References

https://www.smartcockpit.com/docs/A320-Navigation.pdf (PAGE 24)
https://youtu.be/qpL23wnNNEI?t=1770

Real life tests

Additional context

Tune via RMPs:

  • ILS
  • VOR
  • MLS: Cancelled. Will display 808.080
  • ADF

MCDU:

  • Make RADNAV page unable to accept new entries when NAV button is pushed
  • SelectedNavaids page to show RMP if tuned via the RMPs or MAN if tuned manually
  • Manage back to auto-tuning: Cancelled because there's not autotuning for now
  • Inhibit manual/RMP tuning if below 700 RA, APPR engaged, at least one AP/FD engaged

ND:

  • To show M if manually tuned or R if tuned via RMPs
  • No DME distance if RMP tuned

Ident knobs:

  • VOR 1/2
  • MKR
  • ILS: Cancelled because we cannot turn on the ident on NAV3
  • MLS: Cancelled because we MLS is not simulated
  • ADF 1/2
  • Voice button

Discord username (if different from GitHub):

Testing instructions

REQUIREMENTS

  1. Refer to the second comment regarding a file. It will ease the process in SimVarWatcher
  2. Open SimVarWatcher
  3. Load the file you have just created

Good luck and thank you for your time.

TEST N°1: enabling/disabling of knobs and volume

Make sure all buttons/knobs are independent.
Make sure to play with buttons/knobs of both RMPs

It's normal the RMP 2 does not transmit on any channel by default.
It was made to avoid deselect the transmit channel on the RMP 2 to be able to switch between COM1 and 2 on vPilot/Alitude

  1. Check if there's a weak light on all knobs when they are off (basically, similar to comm knobs)
  2. Push each volume knob of the navigation part of both RMPs
    • Check if the tooltips match (increase/decrease the volume, turn on/off the ident)
    • They should light up.
    • In Watcher, all SOUND simvars should be set to 1.
    • Dim all the lights via the overhead panel and check if the knobs are dimmed as well
  3. Rotate each knob. (It's possible no sound will be heard. Not a big deal since custom morse code will come with FMS v2)
    • VOR 1: NAV1 VOLUME simvar should be set to the maximum of the two knobs on RMP1/2.
    • VOR 2: NAV2 VOLUME simvar should be set to the maximum of the two knobs on RMP1/2.
    • MKR: No volume simvar. Just check if it's rotating.
    • ADF 1: Associated ADF VOLUME simvar should be set to the maximum of the two knobs on RMP1/2.
    • ADF 2: Associated ADF VOLUME simvar should be set to the maximum of the two knobs on RMP1/2.
    • ILS: No volume simvar. Just check if it's rotating.
      1. Reason: ILS is tuned via NAV3 but its volume is unsettable (even though it's set to 100 by default)
    • MLS: Same as ILS. (Will be replaced by GLS once the custom model is made)
  4. Push VOICE button (to check inhibition of ident. FCOM compliant: only VORs and ADFs are covered)
    • Check the tooltips (Allow/Inhibit the idents)
    • The push button should lights up.
    • NAV1/2 SOUND (for VORs) and ADF1/2 SOUND simvars should be set to 0.
    • Push VOR and ADF knobs should have no effect. Light them back up.
  5. Push VOICE button once again
    • The push button should be off.
    • NAV1/2 SOUND (for VORs) and ADF SOUND simvars should be set to 1 if at least one knob of each pair is on.
  6. Push back each volume knob by pair (for example VOR1 Right RMP then VOR1 Left RMP)
    • Each knob light should turn off.
    • Associated SOUND simvar should be set to 0 ONLY IF both knobs are turned off.

TEST N°2: Tuning

Information: Left RMP manages VOR1/ADF1. Right RMP manages VOR2/ADF2. Both RMPs can manage ILS ONLY IF both FMGCs are in nav backup mode (i.e respective NAV push buttons pushed)

Therefore VOR1 = NAV1 VOR2 = NAV2

  1. Press the VOR then MLS then ILS then ADF push buttons
    • You should NOT be able to make them work
  2. Push VHF2 on the left RMP (or VHF1 if testing the right one) then push the NAV push button
    • NAV led should lights up
    • RADNAV page on both MCDU should be blank
    • Any entry in the RADNAV page should return "NOT ALLOWED"
  3. On the FMGC, press DATA then L1 then R6
    • RMP should appear at the top center
  4. Push VOR push button on the tested RMP
    • The SEL light should be off
    • The push button led should lights up
    • NAV push button led should still be on
    • The active window should display the frequency set in NAV1 (2 for RMP 2) ACTIVE FREQUENCY simvar
    • The standby window should display the frequency set in NAV1 (2 for RMP 2) STANDBY FREQUENCY simvar
  5. Rotate the rings of standby frequency and the local VOR frequency
    • The min/max values for the outer one are 108/117
    • The inner one goes from 0 to 0 both ways
  6. Push the transfer push button
    • The frequencies should have switched (check the active window and simvars)
    • The frequency window should display "C-" followed by 3 digits making a number between 0 and 359
  7. Rotate the same rings as before
    • The outer ring should have no effect
    • The inner ring should increase/decrease the course between 0 and 359
  8. Push the transfer push button
    • NAV OBS 1/2 simvars should be updated
    • Active frequency should be in active and standby frequency windows
    • A 'R' (for Remote) should be next to each reference of the VOR on the ND (Rotate the Rose knob to VOR)
  9. Push the transfer button again to pass in course mode and go to the next step
  10. Push ILS push button (Same tests as VOR (from 3.) and NAV3 simvars)
    • Course mode should have disappeared, back to frequency mode. No flickering observed.
    • Active frequency simvar settable ONLY IF both RMP in nav backup mode (FCOM compliant)
    • Frequencies min/max 108/111 with the outer knob
    • No DME distance should be displayed on the ND
  11. Push MLS push button
    • Nothing should happen
  12. Push ADF push button (same tests as VOR (from 3.). This time with ADF simvars)
    • No course selection possible
    • Frequencies between 190.0 and 1750.0
    • The outer knob selects the integer digits, the inner one the decimal (0 or 0.5 only).
    • The 'R' should still be visible
  13. Push NAV push button on the tested RMP
    • NAV push button led should goes off
    • On the FMGC, press DATA then L1 then R6: Auto should appear
    • Current nav receiver's led should goes off
    • The RMP should be displaying previously selected VHF
    • RADNAV page no longer blank
    • The 'R' have disappeared from the ND
    • In the Watcher, all ACTIVE frequencies should be set to 0

Repeat for both RMPs

TEST N°3: Inhibit at low altitude

This test to be FCOM compliant.
You should not be able to tune anything via the RMP if below 700 RA, APPR engaged, at least one AP/FD engaged.
In this part, I'm assuming the transfer button does not allow us to switch frequencies. I don't know the real behavior though.

  1. Press NAV then VOR
  2. Activate APPR and one AP
  3. Tune a standby frequency
  4. Fly until passing 700 RA descending
  5. Press the transfer button
    • Nothing should happen

How to download the PR for QA

Every new commit to this PR will cause a new A32NX artifact to be created, built, and uploaded.

  1. Make sure you are signed in to GitHub
  2. Click on the Checks tab on the PR
  3. On the left side, click on the bottom PR tab
  4. Click on the A32NX download link at the bottom of the page

@juliansebline juliansebline changed the title Rmp navigation tuning feat: RMP navigation tuning May 26, 2022
@juliansebline
Copy link
Contributor Author

juliansebline commented May 26, 2022

To merge into the master after #7105 because there will be some conflicts I think.

Some lines are in my first commit AND in #7105 too, I don't know why. Plus, the PR updates the same files.

@juliansebline
Copy link
Contributor Author

juliansebline commented Jun 4, 2022

COPY THIS INTO A FILE WITH EXTENSION ".simvars" then load it into SimVarWatcher.

ADF SOUND:1,Bool,False
ADF SOUND:2,Bool,False
ADF VOLUME:1,percent,False
ADF VOLUME:2,percent,False
ADF ACTIVE FREQUENCY:1,Hz,False
ADF ACTIVE FREQUENCY:2,Hz,False
ADF STANDBY FREQUENCY:1,Hz,False
ADF STANDBY FREQUENCY:2,Hz,False
NAV VOLUME:1,percent,False
NAV VOLUME:2,percent,False
NAV VOLUME:3,percent,False
NAV SOUND:1,Bool,False
NAV SOUND:2,Bool,False
NAV SOUND:3,Bool,False
NAV ACTIVE FREQUENCY:1,Hz,False
NAV ACTIVE FREQUENCY:2,Hz,False
NAV ACTIVE FREQUENCY:3,Hz,False
NAV STANDBY FREQUENCY:1,Hz,False
NAV STANDBY FREQUENCY:2,Hz,False
NAV STANDBY FREQUENCY:3,Hz,False
NAV OBS:1,degrees,False
NAV OBS:2,degrees,False
NAV OBS:3,degrees,False

igor8518 pushed a commit to igor8518/a32nx that referenced this pull request Sep 30, 2022
igor8518 pushed a commit to igor8518/a32nx that referenced this pull request Oct 15, 2022
igor8518 pushed a commit to igor8518/a32nx that referenced this pull request Nov 1, 2022
igor8518 pushed a commit to igor8518/a32nx that referenced this pull request Nov 4, 2022
Saschl pushed a commit to Saschl/a32nx that referenced this pull request Nov 10, 2022
Saschl pushed a commit to Saschl/a32nx that referenced this pull request Nov 10, 2022
igor8518 pushed a commit to igor8518/a32nx that referenced this pull request Nov 13, 2022
Saschl pushed a commit to Saschl/a32nx that referenced this pull request Dec 8, 2022
Saschl pushed a commit that referenced this pull request Dec 12, 2022
Saschl added a commit that referenced this pull request Dec 22, 2022
beheh pushed a commit that referenced this pull request Dec 22, 2022
@mico975
Copy link
Contributor

mico975 commented Dec 29, 2022

Good to go from QA side.

@Saschl Saschl enabled auto-merge (squash) December 29, 2022 12:14
@Saschl Saschl merged commit 07f20ce into flybywiresim:master Dec 29, 2022
Eearslya pushed a commit to Eearslya/a32nx that referenced this pull request Jan 4, 2023
* fix: RMP behavior and lights [issue 344]

* Update src/instruments/src/EWD/elements/PseudoFWC.tsx

Requested changes

Co-authored-by: Benedict Etzel <developer@beheh.de>

* Update src/instruments/src/Common/EWDMessages.tsx

Requested changes: code and VHF3 VOICE format

Co-authored-by: Benedict Etzel <developer@beheh.de>

* Update src/instruments/src/EWD/elements/PseudoFWC.tsx

Requested changes: code VHF3 voice

Co-authored-by: Benedict Etzel <developer@beheh.de>

* Update src/instruments/src/EWD/elements/PseudoFWC.tsx

Requested changes: code VHF3 voice

Co-authored-by: Benedict Etzel <developer@beheh.de>

* Update RadioPanelDisplay.tsx

Requested changes: textDataModeVHF3 to TEXT_DATA_MODE_VHF3

* Fix bug with ANN LT involved

* Added comments about commented out code

* Fix RMPs elec buses

* add of SEL word backlight

* Default init of transmit and volume buttons

* fix SEL light behavior

* fix SEL light behavior flybywiresim#2

* Removal of commented out code

* SEL backlight code

* VOR, ILS, ADF tunable. MLS missing. Logic with NAV button

* Add of files

* ILS standby frequency to active

* Instruments knobs are now pushable

* VORs ident

* Fix due to double comment in the xml

* MKR ident

* ADF ident

* RADNAV page blank once NAV button pushed

* AUTO/MAN/RMP status in Navaids page

* Fix switch between NAV backup and radio tuning

* VOICE button

* fix: inhibit auto-tuning

* Changelog

* Changelog

* NAV 1/2 ADF 1 default volume set to 0

* NAV 3/4 ADF 2 (not existing yet) default volume set to 0

* Fix ILS and default values

* ILS/MLS DME distance not displayed if RMP tuned

* Display of M/R if manual/rmp tuned

* Display of M/R if manual/rmp tuned

* Revert "Display of M/R if manual/rmp tuned"

This reverts commit ec363f6.

* Reset of all nav frequencies when RMP tuning is cancelled

* Removal of MLS + somes fixes for ADF and tuning based on real life

* Change of default course value

* Removal of useless code

* Fix of display flickering when switching between ADF and VOR/ILS

* ILS/MLS volume knobs + fix

* Management greatest volume within pair of knobs

* Fix previous commit

* Fix previous commit

* Revert "Revert commit by mistake"

This reverts commit 556f5ac.

* Removal of useless newlines

* Table separator

* Merge similar simvars as requested

* French tooltips for knobs and voice button

* Use of default tooltips + update homemade ones + english tooltips

* Use of default tooltips + update homemade ones + english tooltips

* Revert "Revert commit pushed my mistake"

This reverts commit d61e0d5.

* Dim light

* ILS tunable only if both RMPs in nav backup mode. FCOM compliant

* Back to frequency mode when switching between receivers

* Fix for vPilot

* Changelog update

Removal of useless changelogs

* Changelog from 0.4.0 to 0.9.0 as requested

From 0.4.0 to 0.8.0 for another one

* Fix COM3 Transmit + it is now possible to transmit on no COM

* Fix knob animation

* Revert "Merge branch 'RMP_fix_behavior_lights'"

This reverts commit b21b690, reversing
changes made to b71ebfb.

* Reorder Changelog

* Fix simvars when switching between CALLS p/b

* Comment

* MLS disabled

* Fix bad merge

* Fix bad merge

* A32NX_RMP_ILS_MLS_TUNED to A32NX_RMP_ILS_TUNED

* Update a320-simvars.md

* Fix for vPilot

* Comment

* Inhibit at low altitude

* Knobs lights

* Revert on Rust files due to bad merge

* Copy changelog from master and add of my line

* Fix ILS tuning

* Comment

* Comment

* Fix knobs lit when cold & dark

Co-authored-by: Benedict Etzel <developer@beheh.de>
Co-authored-by: Michael Corcoran <tracer@outlook.co.nz>
Co-authored-by: Saschl <19493808+Saschl@users.noreply.github.com>
Co-authored-by: Benjamin Dupont <benjozorkfr@gmail.com>
@@ -11,11 +11,11 @@ export enum NavAidMode {

export type RadioNavInfoProps = { index: 1 | 2, side: EfisSide }

const TuningModeIndicator: React.FC<{ index: 1 | 2, frequency: number }> = ({ index, frequency }) => {
const [tuningMode] = useSimVar(`L:A32NX_FMGC_RADIONAV_${index}_TUNING_MODE`, 'enum');
const TuningModeIndicator: React.FC<{ index: 1 | 2 }> = ({ index }) => {
Copy link
Member

@tracernz tracernz Jan 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needed to remain per-side. VOR1 can be manually tuned while VOR2 is auto-tuned for example. At the moment it will incorrectly show M on both sides of the ND even though only 1 side is manually tuned through the FMGC.

SimVar.SetSimVarValue('K:NAV1_RADIO_SET_HZ', 'Hz', 0);
SimVar.SetSimVarValue('K:NAV2_RADIO_SET_HZ', 'Hz', 0);
SimVar.SetSimVarValue('K:NAV3_RADIO_SET_HZ', 'Hz', 0);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic all belongs in the RMP, which actually does the tuning (unless the onside is failed and the offside is tuning it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Exp Available on experimental branch (for testing) QA Tier 1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vpilot (VATSIM) microphone chosen in audio panel issue [RMP] Backup Tuning
8 participants