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: Random Failures #7821

Open
wants to merge 292 commits into
base: master
Choose a base branch
from

Conversation

Maverickwoe
Copy link
Contributor

@Maverickwoe Maverickwoe commented Feb 23, 2023

Fixes #7571

Summary of Changes

Different means to trigger automatically some failures.
Must reuse the chapters/category of failures to trigger randomly one among the list so that it is compatible with any future failure created.

  • Failure generators
    • Take Off phase : chance per take off
      then a distribution between slow regime, medium regime, high speed regime and initial climb
    • Chance per hour : an average chance of triggering a failure every hour
    • Timer : A trigger that happens at a specific time you set
    • altitude triggered climb/descent
    • Speed triggered accel/decel
    • max number of failures at once
  • Instantiation of Generators
    • Instances of all possible generator to have different settings
    • Ability to set each of the generators to "Not be active" "Happen once" "Arm at take off" "always rearm"
  • Choice of failures
    • To select what kind of individual failures you're interested to have and on which trigger mechanism you want them.
    • Number of failures to trigger at once per generator
  • UI
    • Dedicated page for failure generators including each of their specific settings
    • A link with existing pages or a method to link the generators to the failures
    • Link to failure chapters and a way to set all/none of each chapter
  • Localization
    • English
    • French

Complex compound failures might be out of scope yet as they could be worked on a separate PR as new failures in the list.

Screenshots (if necessary)

Demo: (earlier version, obsolete now)
https://youtu.be/QsiiExZhf7Y

New Failure Generator tab with all 5 generators (altitude climb & descent, speed acceleration)
image

specific setting page for Altitude failure generator:
image

specific setting page for Speed failure generator:
image

specific setting page for failure over time (MTTF) generator
image

specific setting page for timed failure
image

specific setting page for take-off failure generator
image

Window for failure selection
image

References

No necessary reference.

Additional context

Discord username (if different from GitHub): Garoomf#4683

Testing instructions

Test generators creation**

Go to EFB page "Failures" tab "Failure generator"

Select in the drop down menu one option and click on the button next to it "+".
A card shall appear in the list below with a title corresponding to the option you selected
Open the setting page by clicking on the setting button on the right of the card
Test all the rearm settings and verify that the input is taken into account with the new option
Note that the "maximum number of simultaneous failures" will always adjust to be equal or above to the value set in "number of failures"
Test all the settings at the bottom of the card and verify that the input is taken into account with the new option
Close the setting page
Erase the card by using the top right button "TRASH", the card shall disappear
Repeat for all generators options.

Test Failures allocation**

Go to EFB page "Failures" tab "Failure generator"
Select in the drop down menu any option and click on the button next to it "+".
A card shall appear in the list below with a title corresponding to the option you selected
Click on the button looking like an exclamation diamond, a new page shall open.
Select several failures by clicking on any failure button.
The button shall reflect that the failure has been selected.
Click on the "NONE" text of any section that has a selected failure and verify that this failures and any other of this chapter is deselected.
Click on the "ALL" text of any section that has at least one unselected failure and verify that all the failures of this chapter are selected.
Click on the "NONE" text on the top right of the page and verify that all failures are deselected.
Click on the "ALL" text on the top right of the page and verify that all failures are selected.
Close the page by selecting the X on the top right corner
Erase the card by using the top right button "TRASH", the card shall disappear

Test failure generators

Take Off phase
Start a flight on a runway, above 1000feet of altitude.
Clear all failures if any.
Set QNH to the simulated pressure. (through weather options or through EFB's weather report)
Setup only one generator "Take Off" (see section "Test generator creations") with the ELAC 1 failure assigned with a setup of :

  • rearm "repeat"
  • Number of failures : 1
  • Max number of simultaneous failures : 3
  • Chance per takeoff : 100%
  • Min speed 50 knots
  • low-medium speed 50 knots
  • medium-High speed 0 knots
  • chance per low regime 100%
  • chance per medium regime 0%
  • max altitude delta: 0 feet

set of thrust to FLX or TOGA and attempt take off.
Verify that a failure occurs when passing 50 knots (ground speed)

Start a flight on a runway, above 1000feet of altitude.
Clear all failures if any.
Set QNH to the simulated pressure.
Setup the max number of simultaneous failures at 3.
Setup only one generator "Take Off" (see section "Test generator creations") with the ELAC 1 failure assigned with a setup of :

  • select "rearm repeat"
  • Number of failures : 1
  • Max number of simultaneous failures : 3
  • Chance per takeoff : 100%
  • Min speed 0 knots
  • low-medium speed 60 knots
  • medium-High speed 60knots
  • chance per low regime 0%
  • chance per medium regime 100%
  • max altitude delta: 0 feet

set of thrust to FLX or TOGA and attempt take off.
Verify that a failure occurs when passing 60 knots (ground speed)

Start a flight on a runway, above 1000feet of altitude.
Clear all failures if any.
Set QNH to the simulated pressure.
Setup the max number of simultaneous failures at 3.
Setup only one generator "Take Off" (see section "Test generator creations") with the ELAC 1 failure assigned with a setup of :

  • rearm "repeat"
  • Number of failures : 1
  • Max number of simultaneous failures : 3
  • Chance per takeoff : 100%
  • Min speed 0 knots
  • low-medium speed 0 knots
  • medium-High speed 0 knots
  • chance per low regime 0%
  • chance per medium regime 0%
  • max altitude delta: 1000 feet

set of thrust to FLX or TOGA and attempt take off.
Verify that a failure occurs when passing 1000 feet above airport altitude

Chance per hour
Start a flight mid air.
Clear all failures if any.
Setup the max number of simultaneous failures at 3.
Setup only one generator "Per hour" (see section "Test generator creations") with the ELAC 1 failure assigned with a setup of :

  • Rearm "repeat"
  • Number of failures : 1
  • Max number of simultaneous failures : 3
  • 60 failures per hour

Verify that 1 failure approximately happen every minute until it reaches 3 then stays at 3.
Manually disable a failure and verify that it comes back after approximately one minute.
*This test might require several runs to give a proper average as per statistics go. you might be extremely lucky/unlucky when testing.

Timer
Start a flight on a runway.
Clear all failures if any.
Setup the max number of simultaneous failures at 3.
Setup only one generator "Timer" (see section "Test generator creations") with the ELAC 1 failure assigned with a setup of :

  • Rearm "rearm at take off"
  • Number of failures : 1
  • Max number of simultaneous failures : 3
  • min delay : 1 minute
  • max delay: 2 minutes

Keep the parking brake on.
Verify that only one failure occurs between 1 and 2 minutes after set of thrust to FLX or TOGA.
Set thrust to IDLE
Verify that an additional failure occurs between 1 and 2 after set of thrust to FLX or TOGA.
Keep thrust and verify that no other failure appear subsequently

Altitude triggered climb/descent
Start a flight on a runway close to sea level.
Set QNH to the simulated pressure.
Clear all failures if any.
Setup the max number of simultaneous failures at 3.
Setup only one generator "altitude climb" (see section "Test generator creations") with the ELAC 1 failure assigned with a setup of:

  • rearm "take off".
  • Number of failures : 1
  • Max number of simultaneous failures : 3
  • Direction : Up
  • min altitude 2000 feet
  • max altitude 3000 feet

Take off and verify that only one failure is triggered between 2000 and 3000 feet and that no subsequent other appear.
Reduce altitude to 1500 then climb over 2000 and see that no other failure occurs.

Start a flight on a runway close to sea level.
Set QNH to the simulated pressure.
Clear all failures if any.
Setup the max number of simultaneous failures at 3.
Setup only one generator "altitude descent" (see section "Test generator creations") with the ELAC 1 failure assigned with a setup of:

  • rearm "take off".
  • Number of failures : 1
  • Max number of simultaneous failures : 3
  • Direction : Down
  • Min altitude : 2000 feet
  • Max altitude : 3000 feet

Take off and verify that no failure is triggered when passing 3000 feet.
Pass 3200 feet and then descent
Verify that only one failure is triggered somewhere between 3000 and 2000 feet
When passing 1800 feet climb again over 2000 feet and see that no other failure occurs.

Speed triggered accel/decel
Start a flight on a runway close to sea level.
Disable wind in weather.
Clear all failures if any.
Setup the max number of simultaneous failures at 3.
Setup only one generator "speed" (see section "Test generator creations") with the ELAC 1 failure assigned with a setup:

  • rearm "take off".
  • Number of failures : 1
  • Max number of simultaneous failures : 3
  • Direction : Forward
  • Minimum speed of 200 knots
  • Maximum speed of 250 knots

Set speed to FLX or TOGA and verify that only one failure is triggered between 250 and 200 knots (ground speed) and that no subsequent other appear.
Reduce speed to 180 knots then pass again 200knots (ground speed), no additional failure shall occur

Start a flight on a runway close to sea level.
Disable wind in weather.
Clear all failures if any.
Setup the max number of simultaneous failures at 3.
Setup only one generator "speed" (see section "Test generator creations") with the ELAC 1 failure assigned with a setup of

  • rearm "take off".
  • Number of failures : 1
  • Max number of simultaneous failures : 3
  • Minimum speed of 200 knots
  • Maximum speed of 250 knots

Take off and verify that no failure is triggered when passing 250 knots.
Pass 260 feet and then decelerate (idle)
Verify that only one failure is triggered between 250 (ground speed) and 200 knots (ground speed)
When below 180 knots (ground speed) climb again over 200 knots (ground speed) and see that no other failure occurs.

Multiple failures

Setup any failure generator (timer might be easier)
Go in the failure selection menu of this generator and select as many failure combination as you desire > 1
Close failure selection
Go in the settings page of this generator
click on "All" next to the field "number of failures", it shall set to the exact number of failures you chose.
Or manually set a number in this field and verify it stay comprised between the "All" value and 0.
Note that "Max number of simultaneous failures" will increase to match the value set in "number of failures" if necessary.
Trigger the failure condition (see other sections for examples).
Verify in the list of failures on the top right ("failure" tab --> compact view) that all the failures you selected are red and active.

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

fix takeoff tests on speed incorrect
Translation
use same display template than other pages
fix position of tab
replaced reste of arming to dynamic reset
changed default selection of generator
fix pposition of select failure Generator
new addgenerator common to all
Split one file per gene for timed ones
fix wrong usage of splice
added new and erasal of arm and subsettings
removed references to JSX
fix position of rearm option + text
Final visual fixes on take off card
created card for Per Hour
Added capacity to add per hour gen
@2hwk 2hwk moved this from 🟣 QA Team Review: Ready to Test to 🔴 Code Review: In progress in Quality Assurance Apr 25, 2024
@2hwk
Copy link
Member

2hwk commented May 6, 2024

#8466

Affected by the lint changes in this PR

  • The only conflicts that should show up will be formatting changes.
  • Simply dismiss all of the changes from master (accept your own). This will leave you with your branch's changes, and outdated formatting.
  • Then, you can run npm run lint-fix in your terminal, at the root of the repository. This will fix all of the code style issues present in your branch.
  • At this stage, you can commit all of the changes produced by running this command.
  • There may be some warnings/errors left in the output you see in your terminal - these will come from rules that were previously poorly/not enforced, and have to be fixed manually.
  • You can then commit, if necessary, any manual fixes that were required.
  • Your branch should now be up to date after pushing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Quality Assurance
🔴 Code Review: In progress
Development

Successfully merging this pull request may close these issues.

Random Failures