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

refactor: Fadec rewrite using Cpp framework #8547

Merged
merged 80 commits into from
Apr 11, 2024

Conversation

frankkopp
Copy link
Member

@frankkopp frankkopp commented Mar 2, 2024

Summary of Changes

Migration of the current fadec code for the A32NX and A380X to the cpp framework with cleanup and additional commenting for better understanding and maintainability.

No change in logic and also not further modularized into shared and specific parts as most of the A380X fadec code still uses the A32NX polynomials and tables. As this will surely change any further sharing of code should be done after when it is clear which parts of the code are really sharable.

Performance has improved a little as reading and writing of data from/to the sim has been optimized.

Discord username (if different from GitHub): cdr_maverick

Testing instructions

Full regression tests on the A32NX with full flights from c&d, runway and the air.
Also fuel handling (fueling, saving and loading of fuel per ATC ID) needs to be tested.

Same for the A380X but to a lesser extend as the fadec code is not unfinished yet anyway.
As on the fuel page in the A380X the order of the tanks changed please also test and look at this.

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

@frankkopp frankkopp self-assigned this Mar 2, 2024
@frankkopp frankkopp force-pushed the fadec-rewrite branch 2 times, most recently from 2f3ada0 to 70596e3 Compare March 6, 2024 10:32
@frankkopp frankkopp force-pushed the fadec-rewrite branch 2 times, most recently from 407bf25 to b5eb550 Compare March 19, 2024 22:21
@frankkopp frankkopp added the Not Ready For Review Still draft but needs a GitHub build label Mar 19, 2024
@frankkopp frankkopp marked this pull request as ready for review March 19, 2024 22:21
@frankkopp frankkopp added Needs Code Review and removed Not Ready For Review Still draft but needs a GitHub build labels Mar 22, 2024
@frankkopp frankkopp force-pushed the fadec-rewrite branch 2 times, most recently from 27ae135 to b81ecad Compare March 22, 2024 12:16
@frankkopp frankkopp force-pushed the fadec-rewrite branch 3 times, most recently from d53c9b4 to e1c57e5 Compare April 2, 2024 12:23
@frankkopp frankkopp merged commit 85d0414 into flybywiresim:master Apr 11, 2024
7 checks passed
@frankkopp frankkopp deleted the fadec-rewrite branch April 11, 2024 09:36
frankkopp added a commit to frankkopp/aircraft that referenced this pull request Apr 12, 2024
frankkopp added a commit that referenced this pull request Apr 12, 2024
)

* Revert "fix(fadec): flex temp unit conversion (#8617)"

This reverts commit 8f3494b.

* Revert "refactor: Fadec rewrite using Cpp framework (#8547)"

This reverts commit 85d0414.
@frankkopp frankkopp restored the fadec-rewrite branch April 12, 2024 12:40
BlueberryKing pushed a commit that referenced this pull request Apr 12, 2024
* Initial scaffolding for new fadec

* Added SIMULATION RATE to base data

* Added SIM ON GROUND to base data

* Initial scaffolding for new EngineControl

* Initial scaffolding for both aircraft

* Remove build code for old fadec

* migrated the common.h code to Fadec.h

* removed simulation time params

* inlined var init

* Code cleanup and documentation

* Renaming of context var

* Added ThrustLimit_A380X class and helper methods in Fadec.h

* Improved insertThousandsSeparator helper

* Merge fix

* Commenting ThrustLimits_A380X.h

* Commenting SimDataStructs.h

* Adding Polynomials_A380X.hpp

* Adding Table1502_A380X.hpp

* Adding Table1502_A380X.hpp

* Adding some commenting to framework classes

* Adding FuelConfiguration class

* Added TODO

* Import fix

* code style fix

* Renamed Class

* changed class access and fixed migrated code

* Added FadecSimData class and implemented initialization of EngineControl

* Added EngineControl_A380X.cpp update()

* Adding some commenting to framework class

* Implemented additional update functions

* Implemented all required functions

* Checked initialize

* Checked update

* Bug fix setting feed tanks

* Fix unit for EGT

* Refactored var access

* Added profiler

* Added more profiler

* Refactored writing and added gauge profiler

* added "using DataDefinitionVector"

* Prepared A32NX fadec migration (wip)

* Improved Pause detection (removed unnecessary read)

* Additional profiler when PROFILING is set

* Added usage commenting to SimpleProfiler

* Added default flag to set data on Sim Object

* Added a flag to turn on/off warning of dirty data read.

* Minor docu fix in AircraftVariable.h

* Prepared A32NX fadec migration (wip)

* Fixed reading of initial pause var

* Added fuel config and data definitions

* Added ThrustLimits_A32NX.hpp

* Added Polynomials_A32NX.hpp

* Added Tables1502_A32NX.hpp

* Fixed to_string_with_zero_padding by making static

* Added initializeEngineControlData

* Added comment

* Added Gph (Gallons per hour) to UNITS

* Added profiler metadata output

* Migration done - debugging wip

* Commenting FuelConfiguration_A32NX.h

* Commenting and cleanup

* Commenting, cleanup and removed a recursion

* Commenting

* Added EngineRatios class

* Migration done - debugging wip

* Fixed engine startup - code working so far

* Moved read only Aircraft Variables to DataDefinition for 50% performance increase for data update

* Further cleanup

* Undo change in logic for fuel used

* Migration A380X done - debugging & testing

* Cleanup and commenting

* Fixed fuel issue on A380X

* Cleanup and commenting

* Removed previous fadec code

* Cleanup and commenting

* Reversed tank order of flyPad Fuel Page

* Cleanup and commenting

* Fix LVar resetting

* Review changes

* Added CHANGELOG.md entry
BlueberryKing added a commit that referenced this pull request Jun 14, 2024
* Remove `MagVar` class

* Fix no disco for waypoint insertion before destination

* Fix being able to clear PPOS

* fix: cleanup docker images for more space

* Remove deleted import

* Improve airway entry perf by filtering at db level

* Fix typo in constraint parsing

* Port AIRPORT key functionality

* Remove unnecessary navdata workaround

* Remove accidental CSS changes

* Use 0 as default origin altitude

* Rename to more meaningful name

* Only transmit fixinfos of active flightplan

* Treat "at" speed constraints as "atOrBelow"

* Fix inaccurate comments

* Use more appropriate name

* Keep using `Avionics.Utils.bearingDistanceToCoordinates` for now

* Fix typo

* Remove unused code

* Fix DIR to waypoint bug

* Move DIR to logic out of page rendering code

* Remove debugging code

* Fix AIRPORT button

* Fix VNAV not resetting after landing

* Port forced turn indications

* Fix turn area exceedance message logic

* Fix toggle overfly function in non active flightplan

* Keep database format for altitude constraints

* Remove unnecessary speed constraint abstraction layer

* Remove unused constraint properties on TF leg

* Remove unclear comment

* Filter out approach to missing runways

* Change to simpler FROM/TO deletion stopgap logic

* Keep upstream leg when stringing arrival to upstream

* Fix typo in FROM/TO validation

* Fix ILS frequency display after first arrival selection

* Allow selection of arrival without runway

* String XI to XF

* Remove XI if leg added after it

* Fix typecheck

* Fix airport/runway altitude shown in flight plan

* Delete alternate flight plan after NEW DEST

* Ensure DIR to leg is not in missed approach

* Use TF leg after truncating duplicate waypoint

* Fix performance data rounding

* Only change out of GA phase with new destination

* Make approach transition names unique

* fix: clock build

* fix: weather request manual entry

* Ignore null legs in distance calculation

* Identify procedures by id over ident

* fix: clock build pt 2

* Adjust flypad imports

* sync and serialization fixes

* fix: efb build

* Fix first departure leg runway check

* Fix linting issues

* Don't override runway idents

* Fix leftover procedure identification inconsistencies

* Export `getAlongTrackDistanceTo`

* Fix some more linting issues

* Port basic atsu flightplan synchronisation code

* Fix lint even harder

* Fix departure page layout

* Fix alternate destination being copied to active

* Do not try to string MANUAL legs

* Fix single waypoint SID imports again

* feat: fms-v2 msfs sync (#8508)

* add intial sync with all todos and hacks

* serialize dest and origin airports

* fix: guard origin and destination airport in serialization

* fix: waypoint insertion, add extra module for sync

* remove unncecessary change

* use more granular sync events

* some cleanup

* feat: sync flight plan from game

* fix some errors

* more log

* fix: export FlightPlanRpcServer

* fix: mapping

* fix: delay init until ingame

* use native fms2 sync

* fix: missing airport and runway in sync

* Revert "fix: missing airport and runway in sync"

This reverts commit 0d87e5a.

* Revert "use native fms2 sync"

This reverts commit b9f2f1f.

* fix: sync confusion

* small improvement

* enable basic load from sim

* fix: rpcclient creation

* only use rpc client for initial load

* fix: datastore subscription

* fix: enroute waypoint insertion

* fix: approach mapping, off by one error and runway selection

* remove flightPlanTest

* fix: typing errors

* fix: destination runways without secondary designator

* fix: lint

* fix(sync): use sensible defaults if mapping fails

* fix: init issue after fixing other init issue

* Fix wrong FD leg ident

* Improve arrival and departure pages

* Handle explicit NO SID, NO STAR, etc. selection

* Refactor MPR selection

* Fix missing disco after leg deletion in alternate

* Remove arrival procedures after changing alternate

* Dump entire alternate plan when changing altn dest

* feat: load MSFS flightplan in "SAVE" mode too

* Remove commented code

* Remove FacilityCache console logging

* Highlight entire row for selected approach

* Allow repeated constraints in F-PLN page

* Remove duplicate code

* Fix deletion of leg after CI at segment boundary

* Implement basic support for XI IF XF leg combination

* Disable SEC fpln functionality for now

* Disable fms-v2 tests until they are fixed

* improve error handling and runway designatorChars

* make loading and saving more resilient

* Disable inoperative buttons

* Remove debugger statement

* Fix WAYPOINT page entry

* Fix missing error message after waypoint insertion

* fix: potential bogus comparison

* Rebuild arrival after setting all alternate procedures

* Handle missing geometry leg again

* Reset managed speed constraint after GA

* Increase VM leg size

* Make MRP side dependent

* Remove dead code

* Fix AIRPORT button getting stuck

* Fix references to dead functions

* Fix typo

* Remove TODO for clarity

* Sync cruise step deletion

* Re-add licence identifier

* Move `WaypointConstraintType`

* fix: do not transmit empty vectors if not needed

* Encode MRP in ARINC429

* Update comment

* Remove unused arguments

* Fix wrong TO waypoint for runways

* Fix EFB build again

* fix: efb ts config

* fix: revert optimization until better solution found

* fix: new allocation optimisation for efis vector sync

* refactor: undefined -> null

* Add null check

* Remove JS FMCDataManager

* fix: hotfix for departure page issue with selecting new dep runway

* fix: only set atc crz flight level when defined, remove console logs

* Change runway ident format

* fix: fpln sync after recent changes

* Remove SID when changing runway

* Remove arrival when changing approach

* fix: text alignment for constraints (font still needs work)

* ci: Rename workflows from 'PR' to more descriptive names  (#8614)

* Update and rename pr.yml to pr-build.yml

* Update PULL_REQUEST_TEMPLATE.md

* Update and rename pr-target.yml to pr-semantics.yml

* Update pr-build.yml

* feat(flight_model): Add drag from landing lights (#8554)

* add landing light drag

* Doc and naming

* typo

* Auto stash before checking out "origin/master"

* Updated drag values

* changelog

* Update cruise.FLT

---------

Co-authored-by: 2hwk <15316958+2hwk@users.noreply.github.com>
Co-authored-by: donstim <70166617+donstim@users.noreply.github.com>

* refactor: Fadec rewrite using Cpp framework (#8547)

* Initial scaffolding for new fadec

* Added SIMULATION RATE to base data

* Added SIM ON GROUND to base data

* Initial scaffolding for new EngineControl

* Initial scaffolding for both aircraft

* Remove build code for old fadec

* migrated the common.h code to Fadec.h

* removed simulation time params

* inlined var init

* Code cleanup and documentation

* Renaming of context var

* Added ThrustLimit_A380X class and helper methods in Fadec.h

* Improved insertThousandsSeparator helper

* Merge fix

* Commenting ThrustLimits_A380X.h

* Commenting SimDataStructs.h

* Adding Polynomials_A380X.hpp

* Adding Table1502_A380X.hpp

* Adding Table1502_A380X.hpp

* Adding some commenting to framework classes

* Adding FuelConfiguration class

* Added TODO

* Import fix

* code style fix

* Renamed Class

* changed class access and fixed migrated code

* Added FadecSimData class and implemented initialization of EngineControl

* Added EngineControl_A380X.cpp update()

* Adding some commenting to framework class

* Implemented additional update functions

* Implemented all required functions

* Checked initialize

* Checked update

* Bug fix setting feed tanks

* Fix unit for EGT

* Refactored var access

* Added profiler

* Added more profiler

* Refactored writing and added gauge profiler

* added "using DataDefinitionVector"

* Prepared A32NX fadec migration (wip)

* Improved Pause detection (removed unnecessary read)

* Additional profiler when PROFILING is set

* Added usage commenting to SimpleProfiler

* Added default flag to set data on Sim Object

* Added a flag to turn on/off warning of dirty data read.

* Minor docu fix in AircraftVariable.h

* Prepared A32NX fadec migration (wip)

* Fixed reading of initial pause var

* Added fuel config and data definitions

* Added ThrustLimits_A32NX.hpp

* Added Polynomials_A32NX.hpp

* Added Tables1502_A32NX.hpp

* Fixed to_string_with_zero_padding by making static

* Added initializeEngineControlData

* Added comment

* Added Gph (Gallons per hour) to UNITS

* Added profiler metadata output

* Migration done - debugging wip

* Commenting FuelConfiguration_A32NX.h

* Commenting and cleanup

* Commenting, cleanup and removed a recursion

* Commenting

* Added EngineRatios class

* Migration done - debugging wip

* Fixed engine startup - code working so far

* Moved read only Aircraft Variables to DataDefinition for 50% performance increase for data update

* Further cleanup

* Undo change in logic for fuel used

* Migration A380X done - debugging & testing

* Cleanup and commenting

* Fixed fuel issue on A380X

* Cleanup and commenting

* Removed previous fadec code

* Cleanup and commenting

* Reversed tank order of flyPad Fuel Page

* Cleanup and commenting

* Fix LVar resetting

* Review changes

* Added CHANGELOG.md entry

* fix(fadec): flex temp unit conversion (#8617)

fix: flex temp unit conversion

* Show NOT ALLOWED upon procedure reselection

* Merge legs after certain disco deletions

* Fix circling approach not showing up

* fix: Fixed bug in checklist to not display previous checklists as completed (#8615)

Fixed bug in checklist to not display previous checklists as completed.

* Fix ND not updating after TMPY deletion

* Fix disco deletion

* Show NOT ALLOWED upon procedure reselection

* Merge legs after certain disco deletions

* Fix circling approach not showing up

* Fix ND not updating after TMPY deletion

* Fix disco deletion

* fix: don't throw null true bearing when parsing discont

* fix: check for null vs truthiness

* fix: use strict !==

* Fix FREQ not shown after deduplicating airway fixes

* Port tropopause uplink

* Show NOT ALLOWED when attempting to clr ZFW/ZFWCG

* Remove unused import

* HIde circling approaches

* Show CLB or DES prompt when necessary

* Show NO TRANS when explicitly selected

* Show ENTRY for pilot constructed points on PROG page

* Filter STARs when only runway selected

* Revert "Show NO TRANS when explicitly selected"

This reverts commit f6a8905.

* Fix NO SID, NO STAR selection not working

* Improve automatic NONE selection

* Improve automatic NONE trans selection

* Handle missing airways during uplink

* feat(fms): fm legs

* fix(fms): to wpt details for fm leg

* Fix trans lvl being reset when changing runway

* Fix runway formatting on PERF page

* feat(utils): add angle normalise functions

* fix(fms): fix vor station declination

fixes fix info radials

* fix: handle "at or below" constraint

* chore: update fms-v2 workflow

* fix: 380 fadec build

* fix(fms): cf leg interpretation

* fix(fms): idf sids => also sids starting with cf leg

* feat(fms): fa leg v0.0.1

* fix: eslint ref

* style: run lint after merge

* chore: fix lint

* chore: fix lint

* Treat missed approach legs as climb constraints

* Fix missed approach track not being shown

* Allow SID without runway

* fix(fms): navaid selection fallback

* Fix missed approach path going dashed on landing

* Allow leg insertion at flight plan end

* Fix FM leg distance computation

* Prevent leg insertion after MANUAL

* Fix distance to destination on XM leg

* Improve uplink error handling

* Show ILS frequency for runway with LOC approach

* Always show solid flight plan line in preflight phase

* Fix cruise step deletion

* Don't show EFIS approach message for runway-only

* Keep holds when stringing

* Fix crash when changing departure runway

* Do not send constraints to PFD in GA phase

* Check for active plan on active leg symbol

* Delete constraint until MAP when going around

* Mark AF as computed after computation

* Fix turn direction indicator in alternate plan

* Fix PROG page crash when entering from/to after takeoff

* Don't show ENTER DEST DATA without from/to

* fix: costindex -> cruiseFlightLevel

* fix(fms): nav db info

* Fix sequencing of overshot legs

* Replace `GetAirportByIdent` calls

* Fix missed approach display logic in non PLAN mode

* Fix DIR TO waypoint in hold

* Treat HX legs equally

* Fix premature deceleration to hold speed

* Fix crash with bad navdata

* fix: mark FA leg as computed

* Improve arrival selection error handling

* Delete TMPY on error during procedure selection

* Handle missing alternate during uplink gracefully

---------

Co-authored-by: BBK <22713769+BlueberryKing@users.noreply.github.com>
Co-authored-by: Saschl <19493808+Saschl@users.noreply.github.com>
Co-authored-by: Saschl <sascharudolf46@gmail.com>
Co-authored-by: Sascha Rudolf <sascha.rudolf@sap.com>
Co-authored-by: Andreas Guther <andreas@guther.family>
Co-authored-by: 2hwk <reasonstouninstall@tutanota.com>
Co-authored-by: 2hwk <15316958+2hwk@users.noreply.github.com>
Co-authored-by: Aurora Takemi <98479040+alepouna@users.noreply.github.com>
Co-authored-by: Croc <38904654+crocket63@users.noreply.github.com>
Co-authored-by: donstim <70166617+donstim@users.noreply.github.com>
Co-authored-by: Frank Kopp <frank@familie-kopp.de>
Co-authored-by: Michael Corcoran <tracer@outlook.co.nz>
flogross89 added a commit that referenced this pull request Jul 1, 2024
* Deduplicate waypoints when inserting into flightplan

* Fix origin being active leg initially

* Add IF for procedures starting with FX

* Implement FROM/TO leg deletion

* fix: fms-v2 fmgc variable ref (#8376)

fix(fms-v2): don't require explicit Fmgc namespace reference when calling fmgc's DataManager

* Always compute IF at runway/airport

* Only restring to enroute if arrival changed

* Fix arrival not being rebuilt for transition change

* Reset enroute transition when arrival changes

* Show ILS frequency on Arrivals page

* Set active leg when arrival changes while flying it

* Deduplicate after airway entry

* Create disco but no tmpy on waypoint entry

* Fix missing approach vias with Navigraph data

* Remove `MagVar` class

* Fix no disco for waypoint insertion before destination

* Fix being able to clear PPOS

* fix: cleanup docker images for more space

* Remove deleted import

* Improve airway entry perf by filtering at db level

* Fix typo in constraint parsing

* Port AIRPORT key functionality

* Remove unnecessary navdata workaround

* Remove accidental CSS changes

* Use 0 as default origin altitude

* Rename to more meaningful name

* Only transmit fixinfos of active flightplan

* Treat "at" speed constraints as "atOrBelow"

* Fix inaccurate comments

* Use more appropriate name

* Keep using `Avionics.Utils.bearingDistanceToCoordinates` for now

* Fix typo

* Remove unused code

* Fix DIR to waypoint bug

* Move DIR to logic out of page rendering code

* Remove debugging code

* Fix AIRPORT button

* Fix VNAV not resetting after landing

* Port forced turn indications

* Fix turn area exceedance message logic

* Fix toggle overfly function in non active flightplan

* Keep database format for altitude constraints

* Remove unnecessary speed constraint abstraction layer

* Remove unused constraint properties on TF leg

* Remove unclear comment

* Filter out approach to missing runways

* Change to simpler FROM/TO deletion stopgap logic

* Keep upstream leg when stringing arrival to upstream

* Fix typo in FROM/TO validation

* Fix ILS frequency display after first arrival selection

* Allow selection of arrival without runway

* String XI to XF

* Remove XI if leg added after it

* Fix typecheck

* Fix airport/runway altitude shown in flight plan

* Delete alternate flight plan after NEW DEST

* Ensure DIR to leg is not in missed approach

* Use TF leg after truncating duplicate waypoint

* Fix performance data rounding

* Only change out of GA phase with new destination

* Make approach transition names unique

* fix: clock build

* fix: weather request manual entry

* Ignore null legs in distance calculation

* Identify procedures by id over ident

* fix: clock build pt 2

* Adjust flypad imports

* sync and serialization fixes

* fix: efb build

* Fix first departure leg runway check

* Fix linting issues

* Don't override runway idents

* Fix leftover procedure identification inconsistencies

* Export `getAlongTrackDistanceTo`

* Fix some more linting issues

* Port basic atsu flightplan synchronisation code

* Fix lint even harder

* Fix departure page layout

* Fix alternate destination being copied to active

* Do not try to string MANUAL legs

* Fix single waypoint SID imports again

* feat: fms-v2 msfs sync (#8508)

* add intial sync with all todos and hacks

* serialize dest and origin airports

* fix: guard origin and destination airport in serialization

* fix: waypoint insertion, add extra module for sync

* remove unncecessary change

* use more granular sync events

* some cleanup

* feat: sync flight plan from game

* fix some errors

* more log

* fix: export FlightPlanRpcServer

* fix: mapping

* fix: delay init until ingame

* use native fms2 sync

* fix: missing airport and runway in sync

* Revert "fix: missing airport and runway in sync"

This reverts commit 0d87e5a.

* Revert "use native fms2 sync"

This reverts commit b9f2f1f.

* fix: sync confusion

* small improvement

* enable basic load from sim

* fix: rpcclient creation

* only use rpc client for initial load

* fix: datastore subscription

* fix: enroute waypoint insertion

* fix: approach mapping, off by one error and runway selection

* remove flightPlanTest

* fix: typing errors

* fix: destination runways without secondary designator

* fix: lint

* fix(sync): use sensible defaults if mapping fails

* fix: init issue after fixing other init issue

* Fix wrong FD leg ident

* Improve arrival and departure pages

* Handle explicit NO SID, NO STAR, etc. selection

* Refactor MPR selection

* Fix missing disco after leg deletion in alternate

* Remove arrival procedures after changing alternate

* Dump entire alternate plan when changing altn dest

* feat: load MSFS flightplan in "SAVE" mode too

* Remove commented code

* Remove FacilityCache console logging

* Highlight entire row for selected approach

* Allow repeated constraints in F-PLN page

* Remove duplicate code

* Fix deletion of leg after CI at segment boundary

* Implement basic support for XI IF XF leg combination

* Disable SEC fpln functionality for now

* Disable fms-v2 tests until they are fixed

* improve error handling and runway designatorChars

* make loading and saving more resilient

* Disable inoperative buttons

* Remove debugger statement

* Fix WAYPOINT page entry

* Fix missing error message after waypoint insertion

* fix: potential bogus comparison

* Rebuild arrival after setting all alternate procedures

* Handle missing geometry leg again

* Reset managed speed constraint after GA

* Increase VM leg size

* Make MRP side dependent

* Remove dead code

* Fix AIRPORT button getting stuck

* Fix references to dead functions

* Fix typo

* Remove TODO for clarity

* Sync cruise step deletion

* Re-add licence identifier

* Move `WaypointConstraintType`

* fix: do not transmit empty vectors if not needed

* Encode MRP in ARINC429

* Update comment

* Remove unused arguments

* Fix wrong TO waypoint for runways

* Fix EFB build again

* fix: efb ts config

* fix: revert optimization until better solution found

* fix: new allocation optimisation for efis vector sync

* refactor: undefined -> null

* Add null check

* Remove JS FMCDataManager

* fix: hotfix for departure page issue with selecting new dep runway

* fix: only set atc crz flight level when defined, remove console logs

* Change runway ident format

* fix: fpln sync after recent changes

* Remove SID when changing runway

* Remove arrival when changing approach

* fix: text alignment for constraints (font still needs work)

* ci: Rename workflows from 'PR' to more descriptive names  (#8614)

* Update and rename pr.yml to pr-build.yml

* Update PULL_REQUEST_TEMPLATE.md

* Update and rename pr-target.yml to pr-semantics.yml

* Update pr-build.yml

* feat(flight_model): Add drag from landing lights (#8554)

* add landing light drag

* Doc and naming

* typo

* Auto stash before checking out "origin/master"

* Updated drag values

* changelog

* Update cruise.FLT

---------

Co-authored-by: 2hwk <15316958+2hwk@users.noreply.github.com>
Co-authored-by: donstim <70166617+donstim@users.noreply.github.com>

* refactor: Fadec rewrite using Cpp framework (#8547)

* Initial scaffolding for new fadec

* Added SIMULATION RATE to base data

* Added SIM ON GROUND to base data

* Initial scaffolding for new EngineControl

* Initial scaffolding for both aircraft

* Remove build code for old fadec

* migrated the common.h code to Fadec.h

* removed simulation time params

* inlined var init

* Code cleanup and documentation

* Renaming of context var

* Added ThrustLimit_A380X class and helper methods in Fadec.h

* Improved insertThousandsSeparator helper

* Merge fix

* Commenting ThrustLimits_A380X.h

* Commenting SimDataStructs.h

* Adding Polynomials_A380X.hpp

* Adding Table1502_A380X.hpp

* Adding Table1502_A380X.hpp

* Adding some commenting to framework classes

* Adding FuelConfiguration class

* Added TODO

* Import fix

* code style fix

* Renamed Class

* changed class access and fixed migrated code

* Added FadecSimData class and implemented initialization of EngineControl

* Added EngineControl_A380X.cpp update()

* Adding some commenting to framework class

* Implemented additional update functions

* Implemented all required functions

* Checked initialize

* Checked update

* Bug fix setting feed tanks

* Fix unit for EGT

* Refactored var access

* Added profiler

* Added more profiler

* Refactored writing and added gauge profiler

* added "using DataDefinitionVector"

* Prepared A32NX fadec migration (wip)

* Improved Pause detection (removed unnecessary read)

* Additional profiler when PROFILING is set

* Added usage commenting to SimpleProfiler

* Added default flag to set data on Sim Object

* Added a flag to turn on/off warning of dirty data read.

* Minor docu fix in AircraftVariable.h

* Prepared A32NX fadec migration (wip)

* Fixed reading of initial pause var

* Added fuel config and data definitions

* Added ThrustLimits_A32NX.hpp

* Added Polynomials_A32NX.hpp

* Added Tables1502_A32NX.hpp

* Fixed to_string_with_zero_padding by making static

* Added initializeEngineControlData

* Added comment

* Added Gph (Gallons per hour) to UNITS

* Added profiler metadata output

* Migration done - debugging wip

* Commenting FuelConfiguration_A32NX.h

* Commenting and cleanup

* Commenting, cleanup and removed a recursion

* Commenting

* Added EngineRatios class

* Migration done - debugging wip

* Fixed engine startup - code working so far

* Moved read only Aircraft Variables to DataDefinition for 50% performance increase for data update

* Further cleanup

* Undo change in logic for fuel used

* Migration A380X done - debugging & testing

* Cleanup and commenting

* Fixed fuel issue on A380X

* Cleanup and commenting

* Removed previous fadec code

* Cleanup and commenting

* Reversed tank order of flyPad Fuel Page

* Cleanup and commenting

* Fix LVar resetting

* Review changes

* Added CHANGELOG.md entry

* fix(fadec): flex temp unit conversion (#8617)

fix: flex temp unit conversion

* Show NOT ALLOWED upon procedure reselection

* Merge legs after certain disco deletions

* Fix circling approach not showing up

* fix: Fixed bug in checklist to not display previous checklists as completed (#8615)

Fixed bug in checklist to not display previous checklists as completed.

* Fix ND not updating after TMPY deletion

* Fix disco deletion

* Show NOT ALLOWED upon procedure reselection

* Merge legs after certain disco deletions

* Fix circling approach not showing up

* Fix ND not updating after TMPY deletion

* Fix disco deletion

* fix: don't throw null true bearing when parsing discont

* fix: check for null vs truthiness

* fix: use strict !==

* Fix FREQ not shown after deduplicating airway fixes

* Port tropopause uplink

* Show NOT ALLOWED when attempting to clr ZFW/ZFWCG

* Remove unused import

* HIde circling approaches

* Show CLB or DES prompt when necessary

* Show NO TRANS when explicitly selected

* Show ENTRY for pilot constructed points on PROG page

* Filter STARs when only runway selected

* Revert "Show NO TRANS when explicitly selected"

This reverts commit f6a8905.

* Fix NO SID, NO STAR selection not working

* Improve automatic NONE selection

* Improve automatic NONE trans selection

* Handle missing airways during uplink

* clean up after git mess

* make performance data nullable (incl. FMC implications); remove dead code; revert change on PilotWaypoint

* GeometricPathBuilder fix

* update from a380 branch

* merge fix

* re-insert MathUtils, to be deleted with MFD PR

* updated fms type improvements (make nullable, don't use undefined)

* feat(fms): fm legs

* fix(fms): to wpt details for fm leg

* Fix trans lvl being reset when changing runway

* Fix runway formatting on PERF page

* feat(utils): add angle normalise functions

* fix(fms): fix vor station declination

fixes fix info radials

* fix: handle "at or below" constraint

* chore: update fms-v2 workflow

* fix: 380 fadec build

* fix(fms): cf leg interpretation

* fix(fms): idf sids => also sids starting with cf leg

* feat(fms): fa leg v0.0.1

* fix: eslint ref

* style: run lint after merge

* chore: fix lint

* chore: fix lint

* Treat missed approach legs as climb constraints

* Fix missed approach track not being shown

* Allow SID without runway

* lint-fix

* fix lint error, don't include debug switches in a/c specific lnav config

* fix build :/

* make legEta non-static, update copyright claims, remove facLoader (tracers comments)

* holland's comments: update copyright claims, remove exports, change file and var naming

* don't delete one more copyright claim

* fix merge error

* [VNAV] a32nx fixes

(cherry picked from commit 8c68638)

---------

Co-authored-by: BBK <22713769+BlueberryKing@users.noreply.github.com>
Co-authored-by: Saschl <19493808+Saschl@users.noreply.github.com>
Co-authored-by: Saschl <sascharudolf46@gmail.com>
Co-authored-by: Sascha Rudolf <sascha.rudolf@sap.com>
Co-authored-by: Benjamin Dupont <4503241+Benjozork@users.noreply.github.com>
Co-authored-by: Andreas Guther <andreas@guther.family>
Co-authored-by: 2hwk <reasonstouninstall@tutanota.com>
Co-authored-by: 2hwk <15316958+2hwk@users.noreply.github.com>
Co-authored-by: Aurora Takemi <98479040+alepouna@users.noreply.github.com>
Co-authored-by: Croc <38904654+crocket63@users.noreply.github.com>
Co-authored-by: donstim <70166617+donstim@users.noreply.github.com>
Co-authored-by: Frank Kopp <frank@familie-kopp.de>
Co-authored-by: Michael Corcoran <tracer@outlook.co.nz>
flogross89 added a commit that referenced this pull request Aug 17, 2024
… VNAV (#8510)

* fix: destination runways without secondary designator

* fix: lint

* fix(sync): use sensible defaults if mapping fails

* fix: init issue after fixing other init issue

* Fix wrong FD leg ident

* Improve arrival and departure pages

* Handle explicit NO SID, NO STAR, etc. selection

* Refactor MPR selection

* Fix missing disco after leg deletion in alternate

* Remove arrival procedures after changing alternate

* Dump entire alternate plan when changing altn dest

* feat: load MSFS flightplan in "SAVE" mode too

* Remove commented code

* Remove FacilityCache console logging

* Highlight entire row for selected approach

* Allow repeated constraints in F-PLN page

* Remove duplicate code

* Fix deletion of leg after CI at segment boundary

* Implement basic support for XI IF XF leg combination

* Disable SEC fpln functionality for now

* Disable fms-v2 tests until they are fixed

* improve error handling and runway designatorChars

* make loading and saving more resilient

* Disable inoperative buttons

* Remove debugger statement

* Fix WAYPOINT page entry

* Fix missing error message after waypoint insertion

* fix: potential bogus comparison

* Rebuild arrival after setting all alternate procedures

* Handle missing geometry leg again

* Reset managed speed constraint after GA

* remove OANS; update OANS Simvar definition

* VNAV: increase drag, lower idle N1

* fix STAR/VIA filtering on F-PLN/ARRIVAL

* Increase VM leg size

* Make MRP side dependent

* Remove dead code

* Fix AIRPORT button getting stuck

* Fix references to dead functions

* [FMC] fixes for fms-v2 compatibility (independent efis settings)

* Fix typo

* Remove TODO for clarity

* Sync cruise step deletion

* Re-add licence identifier

* Move `WaypointConstraintType`

* fix: do not transmit empty vectors if not needed

* Encode MRP in ARINC429

* Update comment

* Remove unused arguments

* Fix wrong TO waypoint for runways

* Fix EFB build again

* fix: efb ts config

* [FMC] Transmit Vapp for BTV, update CRZ speed

* [FMC] improve handling of missing values

* fix: revert optimization until better solution found

* fix: new allocation optimisation for efis vector sync

* refactor: undefined -> null

* Add null check

* Remove JS FMCDataManager

* [FMS] Don't activate PRESEL speed when transitioning to CRZ and not PRESEL set; update ND PLAN center even when not on F-PLN page

* fms-v2 merge fix

(cherry picked from commit bbf23fb)

* fix: hotfix for departure page issue with selecting new dep runway

* fix: only set atc crz flight level when defined, remove console logs

* Change runway ident format

* fix: fpln sync after recent changes

* Remove SID when changing runway

* Remove arrival when changing approach

* fix: text alignment for constraints (font still needs work)

* ci: Rename workflows from 'PR' to more descriptive names  (#8614)

* Update and rename pr.yml to pr-build.yml

* Update PULL_REQUEST_TEMPLATE.md

* Update and rename pr-target.yml to pr-semantics.yml

* Update pr-build.yml

* feat(flight_model): Add drag from landing lights (#8554)

* add landing light drag

* Doc and naming

* typo

* Auto stash before checking out "origin/master"

* Updated drag values

* changelog

* Update cruise.FLT

---------

Co-authored-by: 2hwk <15316958+2hwk@users.noreply.github.com>
Co-authored-by: donstim <70166617+donstim@users.noreply.github.com>

* refactor: Fadec rewrite using Cpp framework (#8547)

* Initial scaffolding for new fadec

* Added SIMULATION RATE to base data

* Added SIM ON GROUND to base data

* Initial scaffolding for new EngineControl

* Initial scaffolding for both aircraft

* Remove build code for old fadec

* migrated the common.h code to Fadec.h

* removed simulation time params

* inlined var init

* Code cleanup and documentation

* Renaming of context var

* Added ThrustLimit_A380X class and helper methods in Fadec.h

* Improved insertThousandsSeparator helper

* Merge fix

* Commenting ThrustLimits_A380X.h

* Commenting SimDataStructs.h

* Adding Polynomials_A380X.hpp

* Adding Table1502_A380X.hpp

* Adding Table1502_A380X.hpp

* Adding some commenting to framework classes

* Adding FuelConfiguration class

* Added TODO

* Import fix

* code style fix

* Renamed Class

* changed class access and fixed migrated code

* Added FadecSimData class and implemented initialization of EngineControl

* Added EngineControl_A380X.cpp update()

* Adding some commenting to framework class

* Implemented additional update functions

* Implemented all required functions

* Checked initialize

* Checked update

* Bug fix setting feed tanks

* Fix unit for EGT

* Refactored var access

* Added profiler

* Added more profiler

* Refactored writing and added gauge profiler

* added "using DataDefinitionVector"

* Prepared A32NX fadec migration (wip)

* Improved Pause detection (removed unnecessary read)

* Additional profiler when PROFILING is set

* Added usage commenting to SimpleProfiler

* Added default flag to set data on Sim Object

* Added a flag to turn on/off warning of dirty data read.

* Minor docu fix in AircraftVariable.h

* Prepared A32NX fadec migration (wip)

* Fixed reading of initial pause var

* Added fuel config and data definitions

* Added ThrustLimits_A32NX.hpp

* Added Polynomials_A32NX.hpp

* Added Tables1502_A32NX.hpp

* Fixed to_string_with_zero_padding by making static

* Added initializeEngineControlData

* Added comment

* Added Gph (Gallons per hour) to UNITS

* Added profiler metadata output

* Migration done - debugging wip

* Commenting FuelConfiguration_A32NX.h

* Commenting and cleanup

* Commenting, cleanup and removed a recursion

* Commenting

* Added EngineRatios class

* Migration done - debugging wip

* Fixed engine startup - code working so far

* Moved read only Aircraft Variables to DataDefinition for 50% performance increase for data update

* Further cleanup

* Undo change in logic for fuel used

* Migration A380X done - debugging & testing

* Cleanup and commenting

* Fixed fuel issue on A380X

* Cleanup and commenting

* Removed previous fadec code

* Cleanup and commenting

* Reversed tank order of flyPad Fuel Page

* Cleanup and commenting

* Fix LVar resetting

* Review changes

* Added CHANGELOG.md entry

* fix(fadec): flex temp unit conversion (#8617)

fix: flex temp unit conversion

* Show NOT ALLOWED upon procedure reselection

* Merge legs after certain disco deletions

* Fix circling approach not showing up

* fix: Fixed bug in checklist to not display previous checklists as completed (#8615)

Fixed bug in checklist to not display previous checklists as completed.

* Fix ND not updating after TMPY deletion

* Fix disco deletion

* Show NOT ALLOWED upon procedure reselection

* Merge legs after certain disco deletions

* Fix circling approach not showing up

* Fix ND not updating after TMPY deletion

* Fix disco deletion

* fix: don't throw null true bearing when parsing discont

* fix: check for null vs truthiness

* fix: use strict !==

* Fix FREQ not shown after deduplicating airway fixes

* Port tropopause uplink

* Show NOT ALLOWED when attempting to clr ZFW/ZFWCG

* Remove unused import

* HIde circling approaches

* Show CLB or DES prompt when necessary

* Show NO TRANS when explicitly selected

* Show ENTRY for pilot constructed points on PROG page

* clean up after git mess

* make performance data nullable (incl. FMC implications); remove dead code; revert change on PilotWaypoint

* GeometricPathBuilder fix

* Filter STARs when only runway selected

* Revert "Show NO TRANS when explicitly selected"

This reverts commit f6a8905.

* unit quick fix after FADEC PR

(cherry picked from commit 84d33d6)

* Fix NO SID, NO STAR selection not working

* Improve automatic NONE selection

* Improve automatic NONE trans selection

* Handle missing airways during uplink

* fix merge errors

* clean up after git mess

* make performance data nullable (incl. FMC implications); remove dead code; revert change on PilotWaypoint

* GeometricPathBuilder fix

* update from a380 branch

* merge inconsistencies with fms-v2

* change drag / increase idle N1 margin

* merge fix

* re-insert MathUtils, to be deleted with MFD PR

* merge fix

* updated fms type improvements (make nullable, don't use undefined)

* updated fms type improvements (make nullable, don't use undefined)

* fms-v2 runway ident fixes

* feat(fms): fm legs

* fix(fms): to wpt details for fm leg

* Fix trans lvl being reset when changing runway

* Fix runway formatting on PERF page

* feat(utils): add angle normalise functions

* fix(fms): fix vor station declination

fixes fix info radials

* fix: handle "at or below" constraint

* chore: update fms-v2 workflow

* fix: 380 fadec build

* fix(fms): cf leg interpretation

* fix(fms): idf sids => also sids starting with cf leg

* feat(fms): fa leg v0.0.1

* fix: eslint ref

* style: run lint after merge

* chore: fix lint

* chore: fix lint

* Treat missed approach legs as climb constraints

* Fix missed approach track not being shown

* Allow SID without runway

* lint-fix

* lint-fix

* fix(fms): navaid selection fallback

* Fix missed approach path going dashed on landing

* Allow leg insertion at flight plan end

* Fix FM leg distance computation

* fix lint error, don't include debug switches in a/c specific lnav config

* fix build :/

* fix build :/

(cherry picked from commit a8ada8c)

* fix lint error, don't include debug switches in a/c specific lnav config

(cherry picked from commit 897e322)

* fix efis interface

* Prevent leg insertion after MANUAL

* new lint config, add cruise temperature

* Fix distance to destination on XM leg

* Improve uplink error handling

* Show ILS frequency for runway with LOC approach

* Always show solid flight plan line in preflight phase

* Fix cruise step deletion

* Don't show EFIS approach message for runway-only

* modify eslint ignore for MFD

* fix Coherent focus/unfocus

* start work on KCCU input

* use updated EIS grey

* integrate KCCU inputs

* make legEta non-static, update copyright claims, remove facLoader (tracers comments)

* holland's comments: update copyright claims, remove exports, change file and var naming

* don't delete one more copyright claim

* fix merge error

* merge fix

* add SURV/CONTROLS

* add SURV/CONTROLS page

* [MFD] connect SURV page to RMP

(cherry picked from commit cbbeb10)

* [RMP] connect MFD SURV to RMP

* [MFD/RMP] rename topics, code cleanup

* SURV/CONTROLS update

* correct ALT RPTG behavior when XPDR STBY

* new colors for radio buttons, better accuracy for surv/controls

* fill for tableInterpolation from EngineModel

* avoid NodeJS type

Co-authored-by: Michael Corcoran <tracer@outlook.co.nz>

* multiple FMCs, add failures

* SURV: squawk code field update

* failures update

* transmit PFD speeds from FMS (temporary, until PRIM FE is finished)

* implement AOA based alpha speeds computation

* [MFD/FMS] fix FMS switching knob

(cherry picked from commit 1df4c8b)

* improve PFD speeds

* Fix fmgc import paths

* re-merge from a32nx

* fix ENTER DEST DATA check

* lint, fetch VLS from tables and derive Vs1G from that

* BBK's comments part 1

* be less verbose

* check fallback values

* use more CSS classes

* speed calculation fixes

* fix INSERT NEXT WPT input field, throw error if not successful

* [FMS] Fix THS and flaps transmission

(cherry picked from commit d2604cf)

* remove VD

* review; clean up /shared

* instrument clean up, lint

* remove flight phase from tabs, add highlightedTab

* fix InputField entry error (QNH, radio, ...)

* fix colors

* update colors

---------

Co-authored-by: Saschl <sascharudolf46@gmail.com>
Co-authored-by: BBK <22713769+BlueberryKing@users.noreply.github.com>
Co-authored-by: 2hwk <reasonstouninstall@tutanota.com>
Co-authored-by: 2hwk <15316958+2hwk@users.noreply.github.com>
Co-authored-by: Aurora Takemi <98479040+alepouna@users.noreply.github.com>
Co-authored-by: Croc <38904654+crocket63@users.noreply.github.com>
Co-authored-by: donstim <70166617+donstim@users.noreply.github.com>
Co-authored-by: Frank Kopp <frank@familie-kopp.de>
Co-authored-by: Saschl <19493808+Saschl@users.noreply.github.com>
Co-authored-by: Michael Corcoran <tracer@outlook.co.nz>
Co-authored-by: Benjamin Dupont <4503241+Benjozork@users.noreply.github.com>
flogross89 added a commit that referenced this pull request Sep 1, 2024
* ignore flight phase for BTV display; show BTV message at top of ND

* merge fms-v2 into feat-a380x-oans

* implement Navigraph-less BTV fallback

* feat: fms-v2 msfs sync (#8508)

* add intial sync with all todos and hacks

* serialize dest and origin airports

* fix: guard origin and destination airport in serialization

* fix: waypoint insertion, add extra module for sync

* remove unncecessary change

* use more granular sync events

* some cleanup

* feat: sync flight plan from game

* fix some errors

* more log

* fix: export FlightPlanRpcServer

* fix: mapping

* fix: delay init until ingame

* use native fms2 sync

* fix: missing airport and runway in sync

* Revert "fix: missing airport and runway in sync"

This reverts commit 0d87e5a.

* Revert "use native fms2 sync"

This reverts commit b9f2f1f.

* fix: sync confusion

* small improvement

* enable basic load from sim

* fix: rpcclient creation

* only use rpc client for initial load

* fix: datastore subscription

* fix: enroute waypoint insertion

* fix: approach mapping, off by one error and runway selection

* remove flightPlanTest

* fix: typing errors

* fix: destination runways without secondary designator

* fix: lint

* fix(sync): use sensible defaults if mapping fails

* fix: init issue after fixing other init issue

* Fix wrong FD leg ident

* Improve arrival and departure pages

* Handle explicit NO SID, NO STAR, etc. selection

* Refactor MPR selection

* Fix missing disco after leg deletion in alternate

* Remove arrival procedures after changing alternate

* Dump entire alternate plan when changing altn dest

* feat: load MSFS flightplan in "SAVE" mode too

* Remove commented code

* Remove FacilityCache console logging

* Highlight entire row for selected approach

* Allow repeated constraints in F-PLN page

* Remove duplicate code

* Fix deletion of leg after CI at segment boundary

* Implement basic support for XI IF XF leg combination

* Disable SEC fpln functionality for now

* Disable fms-v2 tests until they are fixed

* improve error handling and runway designatorChars

* make loading and saving more resilient

* Disable inoperative buttons

* Remove debugger statement

* Fix WAYPOINT page entry

* Fix missing error message after waypoint insertion

* fix: potential bogus comparison

* Rebuild arrival after setting all alternate procedures

* fix BTV/FMS rwy disagree; transmit remaining rwy end distance after rwy selection; allow BTV exit selection only in PLAN mode

* calculate LDA if none (or invalid) available from Navigraph data

* Handle missing geometry leg again

* Reset managed speed constraint after GA

* change Simvars to Arinc429; compute fallback data only if no Navigraph avail

* Increase VM leg size

* Make MRP side dependent

* Remove dead code

* Fix AIRPORT button getting stuck

* Fix references to dead functions

* before touchdown, transmit BTV remaining distances from threshold location

* Fix typo

* Remove TODO for clarity

* Sync cruise step deletion

* Re-add licence identifier

* Move `WaypointConstraintType`

* fix: do not transmit empty vectors if not needed

* [OANS] move moving map only if on ground or in ARC mode

* Encode MRP in ARINC429

* Update comment

* Remove unused arguments

* Fix wrong TO waypoint for runways

* [OANS] stop lines & labels

* stopping distance requested: Account for touch down zone distance

* BTV: Fix SimVar

(cherry picked from commit 5544557)

* Fix EFB build again

* fix: efb ts config

* [OANS] potential fix for missing labels

* [OANS] draw stop line, update DRY/WET lines, visualize overrun status

* fix: revert optimization until better solution found

* fix: new allocation optimisation for efis vector sync

* refactor: undefined -> null

* Add null check

* Remove JS FMCDataManager

* [OANC] Don't show stop bar below 20kts, improved stop bar drawing, clamp to runway end (kinda)

* fix: hotfix for departure page issue with selecting new dep runway

* fix: only set atc crz flight level when defined, remove console logs

* Change runway ident format

* fix: fpln sync after recent changes

* [OANS] move DRY/WET lines when floating above runway, fix STOP bar bug

* Remove SID when changing runway

* Remove arrival when changing approach

* [OANS] fix WET/DRY labels in flight, improve exit validity check

* fix: text alignment for constraints (font still needs work)

* ci: Rename workflows from 'PR' to more descriptive names  (#8614)

* Update and rename pr.yml to pr-build.yml

* Update PULL_REQUEST_TEMPLATE.md

* Update and rename pr-target.yml to pr-semantics.yml

* Update pr-build.yml

* feat(flight_model): Add drag from landing lights (#8554)

* add landing light drag

* Doc and naming

* typo

* Auto stash before checking out "origin/master"

* Updated drag values

* changelog

* Update cruise.FLT

---------

Co-authored-by: 2hwk <15316958+2hwk@users.noreply.github.com>
Co-authored-by: donstim <70166617+donstim@users.noreply.github.com>

* refactor: Fadec rewrite using Cpp framework (#8547)

* Initial scaffolding for new fadec

* Added SIMULATION RATE to base data

* Added SIM ON GROUND to base data

* Initial scaffolding for new EngineControl

* Initial scaffolding for both aircraft

* Remove build code for old fadec

* migrated the common.h code to Fadec.h

* removed simulation time params

* inlined var init

* Code cleanup and documentation

* Renaming of context var

* Added ThrustLimit_A380X class and helper methods in Fadec.h

* Improved insertThousandsSeparator helper

* Merge fix

* Commenting ThrustLimits_A380X.h

* Commenting SimDataStructs.h

* Adding Polynomials_A380X.hpp

* Adding Table1502_A380X.hpp

* Adding Table1502_A380X.hpp

* Adding some commenting to framework classes

* Adding FuelConfiguration class

* Added TODO

* Import fix

* code style fix

* Renamed Class

* changed class access and fixed migrated code

* Added FadecSimData class and implemented initialization of EngineControl

* Added EngineControl_A380X.cpp update()

* Adding some commenting to framework class

* Implemented additional update functions

* Implemented all required functions

* Checked initialize

* Checked update

* Bug fix setting feed tanks

* Fix unit for EGT

* Refactored var access

* Added profiler

* Added more profiler

* Refactored writing and added gauge profiler

* added "using DataDefinitionVector"

* Prepared A32NX fadec migration (wip)

* Improved Pause detection (removed unnecessary read)

* Additional profiler when PROFILING is set

* Added usage commenting to SimpleProfiler

* Added default flag to set data on Sim Object

* Added a flag to turn on/off warning of dirty data read.

* Minor docu fix in AircraftVariable.h

* Prepared A32NX fadec migration (wip)

* Fixed reading of initial pause var

* Added fuel config and data definitions

* Added ThrustLimits_A32NX.hpp

* Added Polynomials_A32NX.hpp

* Added Tables1502_A32NX.hpp

* Fixed to_string_with_zero_padding by making static

* Added initializeEngineControlData

* Added comment

* Added Gph (Gallons per hour) to UNITS

* Added profiler metadata output

* Migration done - debugging wip

* Commenting FuelConfiguration_A32NX.h

* Commenting and cleanup

* Commenting, cleanup and removed a recursion

* Commenting

* Added EngineRatios class

* Migration done - debugging wip

* Fixed engine startup - code working so far

* Moved read only Aircraft Variables to DataDefinition for 50% performance increase for data update

* Further cleanup

* Undo change in logic for fuel used

* Migration A380X done - debugging & testing

* Cleanup and commenting

* Fixed fuel issue on A380X

* Cleanup and commenting

* Removed previous fadec code

* Cleanup and commenting

* Reversed tank order of flyPad Fuel Page

* Cleanup and commenting

* Fix LVar resetting

* Review changes

* Added CHANGELOG.md entry

* fix(fadec): flex temp unit conversion (#8617)

fix: flex temp unit conversion

* Show NOT ALLOWED upon procedure reselection

* Merge legs after certain disco deletions

* Fix circling approach not showing up

* fix: Fixed bug in checklist to not display previous checklists as completed (#8615)

Fixed bug in checklist to not display previous checklists as completed.

* Fix ND not updating after TMPY deletion

* Fix disco deletion

* [OANS] take runway length from Navigraph geometry (for improved stop line drawing)

* Show NOT ALLOWED upon procedure reselection

* Merge legs after certain disco deletions

* Fix circling approach not showing up

* Fix ND not updating after TMPY deletion

* Fix disco deletion

* fix: don't throw null true bearing when parsing discont

* fix: check for null vs truthiness

* fix: use strict !==

* Fix FREQ not shown after deduplicating airway fixes

* Port tropopause uplink

* Show NOT ALLOWED when attempting to clr ZFW/ZFWCG

* Remove unused import

* [OANS] clamp stop bars to 100/200m behind end of rwy

* [OANS] improve auto-load, let user select only exit lines

* [OANS] various small fixes

(cherry picked from commit d815cd1)

* HIde circling approaches

* Show CLB or DES prompt when necessary

* Show NO TRANS when explicitly selected

* Show ENTRY for pilot constructed points on PROG page

* Filter STARs when only runway selected

* Revert "Show NO TRANS when explicitly selected"

This reverts commit f6a8905.

* Fix NO SID, NO STAR selection not working

* Improve automatic NONE selection

* Improve automatic NONE trans selection

* Handle missing airways during uplink

* fms-v2 runway ident fixes

* feat(fms): fm legs

* fix(fms): to wpt details for fm leg

* Fix trans lvl being reset when changing runway

* Fix runway formatting on PERF page

* implement "RWY AHEAD" advisory

* feat(utils): add angle normalise functions

* fix(fms): fix vor station declination

fixes fix info radials

* display arrow, if airport outside range

* fix: handle "at or below" constraint

* chore: update fms-v2 workflow

* fix: 380 fadec build

* fix(fms): cf leg interpretation

* fix(fms): idf sids => also sids starting with cf leg

* feat(fms): fa leg v0.0.1

* fix: eslint ref

* style: run lint after merge

* chore: fix lint

* chore: fix lint

* Treat missed approach legs as climb constraints

* Fix missed approach track not being shown

* Allow SID without runway

* linting

* port LinearDeviationIndicator from a32nx PFD

* add PFD warnings for ROW, ROP, OANS

* add speed margins to a380x

* add ROP/ROW/OANS PFD warnings to a32nx

* update two-line message, fix bug in getDisplayIndex()

* make RWY TOO SHORT smaller

* Disable second ISIS; update colors for PFD tapes, PFD horizon, EWD THR gauges

* restructure code, add A380X-only warnings

* refactor Publisher structure, leave only data with existing sources

* switch to data words for ROS/ROP and OANS PFD alerts

* clean up

* feat: add some A429 utils

* fix(pfd): tidy up publishers

* feat: add fwc publisher

* fix(pfd): use fwc data for stall warning

* A380X: GPWS PFD alerts, ROP/ROW aural alerts,
A32NX: Add GPWS discrete word to GPWS,
Both: warnings position update

* use correct discrete word bit fields

* Add ROP/ROW aural alerts to A32NX

* fix lint after rebase

* lint-fix

* lint-fix

* push pnpm-lock, fix build

* remove unused FlightPlanTest

* a380x prettier format

* fix green arrow for similar runway QFUs

* fix OANS RWY AHEAD

* update font for IF WET RWY TOO SHORT (fix for a32nx)

* subtract min. TDZ distance for remaining distances before reaching TDZ

* update a32nx environment: Don't include OANC for now

* import updates

* lint + lint-fixes

* add LS reminder for ILS, frequency of ILS information has same font size before and after decimal point

* sync RWY AHEAD to other ND

* OANS: Fix RWY AHEAD for extreme longitudes

(cherry picked from commit 5e72996)

* consolidate to single definitions.scss, use standard colors for thrust gauge and PFD tapes

* move ISIS changes to other PR

* move logic from A32NX_FWC.js to PseudoFWC

* inhibit single chimes for the first two seconds after power-on

* add "ARPT NOT IN ACTIVE F/PLN" message in OANS layer

* call correct gpwsUpdateDiscreteWords function in A32NX

* fix: wrong speedtape failure indication

* use Arinc429RegisterSubject for rowRop and oans words

* delete a380x/fmgc

* disable typecheck for a380x

* update amdb navigraph client to use auth from Navigraph SDK

* fix unit test (will be deleted with MFD PR anyways)

* [OANS] a32nx fixes

(cherry picked from commit 13e10cd)

* limit canvas size: modify offset when airport is very away

* remove console output

* update lockfile

* fix merge errors

* remove a380x/MathUtils

* remove VD

* fix colors

* migrate to MFD UI elements, fix errors

* update nav data

* disable ROP/ROW/BTV distance update above 600ft AGL and when not in approach

* use font for ROT display

* update feature types

* add VD dummy

* transmit NCD if not within operational ROP/ROW domain

* [OANS] fix flight phase check

(cherry picked from commit d95e46e)

* [OANS] improve turnaround time display

(cherry picked from commit 16c55e5)

* renamed simvars

* fix ND messages bug

* update copyright claims

* clean up subjects/consumersubjects

* css classes improvement

---------

Co-authored-by: Andreas Guther <andreas@guther.family>
Co-authored-by: Saschl <19493808+Saschl@users.noreply.github.com>
Co-authored-by: Saschl <sascharudolf46@gmail.com>
Co-authored-by: BBK <22713769+BlueberryKing@users.noreply.github.com>
Co-authored-by: 2hwk <reasonstouninstall@tutanota.com>
Co-authored-by: 2hwk <15316958+2hwk@users.noreply.github.com>
Co-authored-by: Aurora Takemi <98479040+alepouna@users.noreply.github.com>
Co-authored-by: Croc <38904654+crocket63@users.noreply.github.com>
Co-authored-by: donstim <70166617+donstim@users.noreply.github.com>
Co-authored-by: Frank Kopp <frank@familie-kopp.de>
Co-authored-by: Michael Corcoran <tracer@outlook.co.nz>
Co-authored-by: Benjamin Dupont <4503241+Benjozork@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✔️ Done
Development

Successfully merging this pull request may close these issues.

4 participants