-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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(fws): rebuild flight warning system in Rust #4872
base: master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
95ef097
to
918f6d3
Compare
|
||
/// This struct represents the in-memory representation of the signals used by a Flight Warning | ||
/// Computer to determine it's activations. | ||
pub struct A320FWCParameterTable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: I would be curious to know if we can somehow use Rust's procedural macros to greatly reduce the amount of typing needed here. As procedural macros are far more complex than regular macros, you might consider looking into this after this PR is completed.
768ea69
to
243158b
Compare
11faf6c
to
5c69dc6
Compare
ce79f18
to
03ac15a
Compare
Quality Assurance Trainee Report Discord : Alepouna#9824 Testing Process:
Negatives:
Testing Results: Notes:
|
Hello, I'd be interested in working on ROPS/ROW, would this be covered under this PR? Seems futile to me to attempt to implement ROPS/ROW in TS when the FWS has been moved to Rust/will be moved to rust. |
@MM-coder Barely, this PR is really just about prioritizing warnings and making them trigger the right sounds in the aircraft. I suspect the majority of the ROW/ROPS logic is elsewhere, e.g. the GPS/map checks and actual length calculations. |
Understood thank you. I've since checked the AMM, it's calculated in the FAC. Implementation wise, would a new system preferably be written in rust or TS? Is the current project ethos moving towards Rust? |
Yes, we're generally writing systems in Rust nowadays. TS really just for UI or accessing data that's otherwise not available to Rust APIs. Feel free to join our Discord to ask for further guidance, e.g. in #dev-support! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not qualified to read Rust
but I can fix this :D
Seems interesting, can't wait to have this deployed! 🥳
@@ -3675,6 +3719,12 @@ In the variables below, {number} should be replaced with one item in the set: { | |||
- {number} | |||
- 0 | |||
- 1 | |||
|
|||
- A32NX_TCAS_AURAL_ADVISORY_OUTPUT | |||
- boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- boolean | |
- Bool |
Fixes #2460
Fixes #4482
Fixes #6503
Fixes #6585
Fixes #6692
Summary of Changes
This PR is the first step on the way to our new flight warning system, written nearly entirely in Rust and using an extremely accurate simulation of the underlying data acquisition and warning logic. The new system is made up two simulated Flight Warning Computers replacing some foundational logic pieces that were previously written in Javascript. The vast majority of warnings on the EWD still have exactly the same conditions as previously and have not been touched, but will be eventually moved over to the new flight warning computers one by one.
The new Flight Warning Computers are also hooked into the electrical and failure system, so the alerts that are now powered by the FWS truly won't work when both FWCs are unpowered or have failed.
Features
A32NX_FWS_FWC_X_ABC
&A32NX_FWS_ABC
instead ofA32NX_FWC_ABC
)Screenshots (if necessary)
Alerts
Altitude Alert (video)
Intermediate Callouts (video)
Failures
References
Additional context
Discord username (if different from GitHub):
Reviewer Guide
A bulk of the FWC "logic" is implemented in the files in
a320_systems/flight_warning/runtime/warnings
. This may seem scary because it's so much code, but you don't have to review every single warning: the general pattern is uniform across all of them (struct with logic nodes, an update function with a signals parameter and pointers to other sheets, a trait to return warning/audio activation if necessary).Testing instructions
This PR contains very few immediately obvious changes, but puts a massive system in place that takes care of all the altitude audio callouts and provides critical data for the warning part of the EWD (ECAM Warnings) to work. Test should be focused on making sure that the ECAM warnings and memos look as usual, and that flight phase appropriate memos or special lines (like TO INHIBIT and LDG INHIBIT) don't appear at unexpected times.
Detailed testing instructions
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.