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(adirs): Improve ADIRS SSM and behaviours #6636

Merged
merged 18 commits into from
Mar 13, 2022

Conversation

lukecologne
Copy link
Member

@lukecologne lukecologne commented Feb 3, 2022

Summary of Changes

This PR:

  • Outputs SSM=FW for all ADR labels when the ADR is off or not aligned
  • Improves the ADR behaviour for low speeds. The following values are now coded as NCD with value=0 when below a threshold:
    • CAS, when below 30kts
    • TAS, when below 60kts
    • Mach, when below 0.1
  • All 3 ADRs now output temperature values, instead of only 1 and 3.
  • Added new data outputs to the ADR:
    • Angle of Attack (coded NCD below 60kts CAS, but the actual value is still output)
  • Added new data outputs to the IR:
    • Drift Angle (DA), which is 0 below 50kts GS
    • Kinematic Flight Path Angle (gamma_k), which is 0 below 50kts GS
    • The Body axis rotation rates: p, q, r
      • Derived from these the Pitch/Roll/Heading rates: Theta_dot, Phi_dot, Psi_dot
    • The Body accelerations: a_x, a_y, a_z

The FPA and DA are now used for the FPV on the PFD. In case of FPA or DA set as FW/NCD, the FPV flag is now shown (when the attitude is still valid and TRK/FPA mode is active, for example when the IR is in ATT mode).
Also, if the CAS goes below 30kts in flight, the SPD flag is shown now, since CAS is then coded NCD.
Finally, if mach is not valid, the MACH flag is not shown on ground, only in flight. This means that if MACH goes below 0.1 in the air, the MACH flight will also be shown, since it is coded NCD in that case.

Screenshots (if necessary)

https://streamable.com/hudxhn

References

For low airspeeds and extreme attitudes, I found these videos, in which you can clearly see the SPD and MACH flag, and also the FPV snapping away below 50kts:
https://www.youtube.com/watch?v=Eap-3siSgLc
https://www.youtube.com/watch?v=rKEKwYTvuZU
https://www.youtube.com/watch?v=AYm1aLu49Pk

Additional context

Discord username (if different from GitHub):

Testing instructions

  • Make sure that the bird and the FPV flag on the PFD in TRK/FPA mode beave as described above and are plausible
  • Make sure that the CAS/TAS/mach values (and invalidity flags) on the ND/PFD behave as described above and are plausible
  • Unfortunately, the other parameters added (AoA, the rotation rates and accelerations) cannot be easily checked without decoding the Arinc429 values and looking at the numeric value, so they probably cannot be tested properly.

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

Copy link
Member

@davidwalschots davidwalschots left a comment

Choose a reason for hiding this comment

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

Minor remark on a test. In general I don't do this, but this time I've created a PR here, which you could merge in if you deem it useful: lukecologne#1

src/systems/systems/src/navigation/adirs.rs Outdated Show resolved Hide resolved
@lukecologne lukecologne force-pushed the adirs-improvements branch 3 times, most recently from a0b45b4 to f71bf65 Compare March 1, 2022 22:24
@lukecologne lukecologne marked this pull request as ready for review March 1, 2022 22:25
Copy link
Member

@davidwalschots davidwalschots left a comment

Choose a reason for hiding this comment

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

I've reviewed the Rust side of things. Looks good!

@ShadowFrost3
Copy link

ShadowFrost3 commented Mar 9, 2022

Quality Assurance Trainee Report

Object of testing: #6636
Tier of Testing:1
Date: 08/03/2022

Testing Process:
Full flight - passed

Make sure that the bird and the FPV flag on the PFD in TRK/FPA mode beave as described above and are plausible - no issues noted in normal operations

Make sure that the CAS/TAS/mach values (and invalidity flags) on the ND/PFD behave as described above and are plausible - checked

Unfortunately, the other parameters added (AoA, the rotation rates and accelerations) cannot be easily checked without decoding the Arinc429 values and looking at the numeric value, so they probably cannot be tested properly. - not checked

Had a couple game crashes just need to verify they are not PR related - tomorrow
Crashed on hotstart runway takeoff roll

Negatives:
Testing Results: Passed with the condition that PR is not causing crashes. I find it unlikely..... but due diligence

Note: This isn't the most thorough test but it is what I could do at the moment. More than this test should be done.

image

@mico975
Copy link
Contributor

mico975 commented Mar 10, 2022

Quality Assurance Tester Report

Discord : mico#3145
Object of testing: #6636
Tier of Testing : 1
Date : 10/03/2022

Testing Process:
Make sure that the bird and the FPV flag on the PFD in TRK/FPA mode beave as described above and are plausible - OK
Make sure that the CAS/TAS/mach values (and invalidity flags) on the ND/PFD behave as described above and are plausible - OK

Negatives:
N/A

Testing Results:
Passed

Conclusions:
LGTM

Media:
image

@lukecologne lukecologne force-pushed the adirs-improvements branch 2 times, most recently from 17b34c2 to 494cd06 Compare March 12, 2022 19:00
@beheh beheh merged commit 9786b9a into flybywiresim:master Mar 13, 2022
@lukecologne lukecologne deleted the adirs-improvements branch March 13, 2022 18:28
ErickSharp pushed a commit that referenced this pull request Apr 3, 2022
* fix(adr): every ADR now outputs temperature data

* fix(adr): correct tests for previous commit

* fix(adr): Correct behavior of labels when ADR off or low speed

* fix(pfd): adjust PFD indications for changed ADR SSMs

* adjust conditions for mach flag display to match video reference

* add remaining unit tests for mach and CAS conditions

* fix(pfd): use actual airspeed value instead of arinc word

* feat(adr): add AoA to ADR outputs

* feat(IR): add drift angle calculation

* refactor: clarifying functions

* remove extraneous and() from drift angle unit test

* feat(adirs): add more IR data labels

* chore: update ADIRS Lvar documentation

* chore(adirs): add unit tests for new IR data

* feat(pfd): move to dedicated FPA/DA IRS vars, add FPV flag

* chore: add changelog entries

* fix: lint errors

Co-authored-by: David Walschots <[email protected]>
@2hwk 2hwk added this to the v0.8.0 milestone Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants