Skip to content

Commit

Permalink
refactor(w&b): rust refactor of payload management (flybywiresim#7715)
Browse files Browse the repository at this point in the history
* feat(efb/wb): boarding.rs, Payload.tsx and related changes

* refactor: standardise units as kg

* refactor: setting A:PAYLOAD STATION WEIGHT in rs

* refactor: use uom for units instead of f64

* refactor: renamed to payload from boarding

* refactor: restore payload sync in .rs

* chore: fix diff

* refactor: remove pax target id

* fix: per pax weight tests

* fix: delete dead code

* fix: remove unused pax station vars

* fix: engine control hotfix

* fix: backport fixes

* fix: backport more changes

* feat: added gw cg, renamed simvar pax_flags_ to pax_

* feat: init changes for gw on payload page

* feat: switch to GW/GWCG

* fix: remove comments

* fix: changes for GSX

* fix: css font-mono

* feat: more gsx vars

* feat: complete gsx integration in rust

* chore: remove js bitflags

* fix: undo NXUnits change

* Tech Debt
- Seperated logic from tests

* Revert "chore: remove js bitflags"

This reverts commit 814c8fd.

* fix: rust lint

* fix: rust lint

* fix: max gw and tooltips

* fix(efb): remove pseudo fuel calculation from payload for performance

* fix(cdu): wrong zfwcg calculation for payload manager utility

* GSX Implementation
- Added Temp test that checks halfway state of GSX

* refactor: review comments and gsx fixes

* fix: temporary workaround for deboarding cargo

* fix: fix tests

* POC to maintain state of cargo loaded for GSX boarding

* refactor: add trait to transfer number of pax to air cond

* GSX Implementation
- Created helper function to move all pax and cargo
- Fixed bug where GSX cargo removal was working in reverse order
- Further refined GSX tests

* fix: lint-rust.sh

* Merge branch 'master' into flypad-weight-balance-gsx

* refactor/fix(efb): new cg limits, unit conversion, simvar documentation, per pax/pax bag weight in kg

* fix: package.json

* meta: removed 380 changes

* fix(efb): localisation diff and deboarding full bugs

---------

Co-authored-by: Alex McBean <[email protected]>
Co-authored-by: Alex Mcbean <[email protected]>
Co-authored-by: Miquel Juhe <[email protected]>
  • Loading branch information
4 people authored Apr 1, 2023
1 parent 58460c8 commit 9a1e358
Show file tree
Hide file tree
Showing 37 changed files with 3,469 additions and 1,648 deletions.
3 changes: 3 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
1. [MCDU] Implemented TUNE BBB FFF.FF, SPECIF NDB UNAVAIL messages - @tracernz (Mike)
1. [F/CTL] Add ELAC 2 Emergency Powersupply - @lukecologne (lukecologne#1156)
1. [HYD] New aerodynamic model for RAT turbine / Added A320 RAT anti stall valve system - @Crocket63 (crocket)
1. [W/B] Phase 1 of refactoring payload (passenger and cargo) logic into rust systems (2Cas#1022)
1. [EFB] Allow payload page passenger seating to be manipulated via LocalVars - @2hwk (2Cas#1022)
1. [EFB] GW and GWCG display on payload page - @2hwk (2Cas#1022)

## 0.9.0

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/model/*.bin
/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/model/*.gltf
/fbw-a32nx/src/systems/instruments/aceBundles
/fbw-a32nx/src/systems/instruments/buildSrc/custom/*

/fbw-a32nx/src/localization/flypad/downloaded/*.json
/fbw-a32nx/src/localization/msfs/downloaded/*.locPak
Expand Down Expand Up @@ -97,4 +98,5 @@ target/
*.tgz
*.wasm
cmake-build*

localazy.keys.json
33 changes: 33 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 47 additions & 25 deletions fbw-a32nx/docs/a320-simvars.md
Original file line number Diff line number Diff line change
Expand Up @@ -1387,32 +1387,54 @@
- 2
- 3

- A32NX_PAX_TOTAL_ROWS_{rows}
- Number
- Indicates the current number of pax in the selected rows
- {rows}
- 1_6
- 7_13
- 14_21
- 22_29

- A32NX_PAX_TOTAL_ROWS_{rows}_DESIRED
- Number
- Indicates the target number of pax in the selected rows
- {rows}
- 1_6
- 7_13
- 14_21
- 22_29

- PAYLOAD STATION WEIGHT:{stationIndex}
- A32NX_BOARDING_STARTED_BY_USR
- Bool
- Indicates current pax/cargo loading state

- A32NX_PAX_{station}
- Bitwise Field
- Indicates the current pax in the selected rows (max 53 bits)
- {station}
- A
- B
- C
- D

- A32NX_PAX_{station}_DESIRED
- Bitwise Field
- Indicates the target layout of passengers in the station (max 53)
- {station}
- A
- B
- C
- D

- A32NX_PAX
- Bitwise Field
- Indicates the current layout of passengers in the station (max 53)
- {station}
- A
- B
- C
- D

- A32NX_CARGO_{station}_DESIRED
- Number (Kilograms)
- Indicates the targeted weight of the station in kilograms
- {station}
- FWD_BAGGAGE
- AFT_CONTAINER
- AFT_BAGGAGE
- AFT_BULK_LOOSE

- A32NX_CARGO
- Number (Kilograms)
- Indicates the weight of the selected payload station
- {stationIndex}
- 5 | FWD BAGGAGE/CONTAINER
- 6 | AFT CONTAINER
- 7 | AFT BAGGAGE
- 8 | AFT BULK/LOOSE
- Indicates the current weight of the station in kilograms
- {station}
- FWD_BAGGAGE
- AFT_CONTAINER
- AFT_BAGGAGE
- AFT_BULK_LOOSE

- A32NX_MCDU_{side}_ANNUNC_{annunciator}
- Boolean
Expand Down
Loading

0 comments on commit 9a1e358

Please sign in to comment.