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(fms): fms-v2 aircraft specific config / VNAV parameters #8493

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
555 commits
Select commit Hold shift + click to select a range
ba41654
Deduplicate waypoints when inserting into flightplan
BlueberryKing Jan 26, 2024
76bc206
Fix origin being active leg initially
BlueberryKing Jan 27, 2024
3352127
Add IF for procedures starting with FX
BlueberryKing Jan 27, 2024
07a4834
Implement FROM/TO leg deletion
BlueberryKing Feb 1, 2024
e6609fe
fix: fms-v2 fmgc variable ref (#8376)
flogross89 Feb 2, 2024
0ffc721
Always compute IF at runway/airport
BlueberryKing Feb 2, 2024
3cb41ca
Merge branch 'fms-v2' of https://github.com/flybywiresim/aircraft int…
BlueberryKing Feb 2, 2024
72b262c
Only restring to enroute if arrival changed
BlueberryKing Feb 3, 2024
7c61201
Fix arrival not being rebuilt for transition change
BlueberryKing Feb 3, 2024
7408d51
Reset enroute transition when arrival changes
BlueberryKing Feb 3, 2024
cafdd42
Show ILS frequency on Arrivals page
BlueberryKing Feb 4, 2024
3d01124
Set active leg when arrival changes while flying it
BlueberryKing Feb 4, 2024
ccb1ca9
Deduplicate after airway entry
BlueberryKing Feb 4, 2024
e16e3d2
Create disco but no tmpy on waypoint entry
BlueberryKing Feb 4, 2024
d31c219
Fix missing approach vias with Navigraph data
BlueberryKing Feb 5, 2024
4380fca
Remove `MagVar` class
BlueberryKing Feb 5, 2024
702cdc2
Fix no disco for waypoint insertion before destination
BlueberryKing Feb 5, 2024
61f5d09
Fix being able to clear PPOS
BlueberryKing Feb 5, 2024
548ad23
fix: cleanup docker images for more space
Saschl Feb 6, 2024
19722e6
Remove deleted import
BlueberryKing Feb 7, 2024
5a76afd
Merge branch 'fms-v2' of https://github.com/flybywiresim/aircraft int…
BlueberryKing Feb 7, 2024
e9d385d
Improve airway entry perf by filtering at db level
BlueberryKing Feb 8, 2024
20bb626
Fix typo in constraint parsing
BlueberryKing Feb 8, 2024
42a95f9
Port AIRPORT key functionality
BlueberryKing Feb 8, 2024
50e7eb4
Remove unnecessary navdata workaround
BlueberryKing Feb 9, 2024
2b14603
Remove accidental CSS changes
BlueberryKing Feb 9, 2024
8998ae4
Use 0 as default origin altitude
BlueberryKing Feb 9, 2024
6cf601d
Rename to more meaningful name
BlueberryKing Feb 9, 2024
b49986b
Only transmit fixinfos of active flightplan
BlueberryKing Feb 9, 2024
027e4c2
Treat "at" speed constraints as "atOrBelow"
BlueberryKing Feb 9, 2024
87e4de1
Fix inaccurate comments
BlueberryKing Feb 9, 2024
10b4fcf
Use more appropriate name
BlueberryKing Feb 9, 2024
3ba2cdd
Keep using `Avionics.Utils.bearingDistanceToCoordinates` for now
BlueberryKing Feb 9, 2024
de362de
Fix typo
BlueberryKing Feb 9, 2024
a046146
Remove unused code
BlueberryKing Feb 9, 2024
c676717
Fix DIR to waypoint bug
BlueberryKing Feb 10, 2024
6040424
Move DIR to logic out of page rendering code
BlueberryKing Feb 10, 2024
1946eea
Remove debugging code
BlueberryKing Feb 10, 2024
263ec39
Fix AIRPORT button
BlueberryKing Feb 10, 2024
55c5a97
Fix VNAV not resetting after landing
BlueberryKing Feb 10, 2024
62c0cf0
Port forced turn indications
BlueberryKing Feb 10, 2024
ec845c5
Fix turn area exceedance message logic
BlueberryKing Feb 10, 2024
4914c12
Fix toggle overfly function in non active flightplan
BlueberryKing Feb 10, 2024
cb54571
Keep database format for altitude constraints
BlueberryKing Feb 11, 2024
8602787
Remove unnecessary speed constraint abstraction layer
BlueberryKing Feb 11, 2024
683da10
Remove unused constraint properties on TF leg
BlueberryKing Feb 11, 2024
1270e3b
Remove unclear comment
BlueberryKing Feb 11, 2024
107c60c
Filter out approach to missing runways
BlueberryKing Feb 11, 2024
6e9557e
Change to simpler FROM/TO deletion stopgap logic
BlueberryKing Feb 11, 2024
4240eea
Keep upstream leg when stringing arrival to upstream
BlueberryKing Feb 12, 2024
c874b44
Fix typo in FROM/TO validation
BlueberryKing Feb 12, 2024
420431d
Fix ILS frequency display after first arrival selection
BlueberryKing Feb 12, 2024
ccb91d0
Allow selection of arrival without runway
BlueberryKing Feb 12, 2024
85106e4
String XI to XF
BlueberryKing Feb 12, 2024
5882ca7
Remove XI if leg added after it
BlueberryKing Feb 12, 2024
80ab251
Fix typecheck
BlueberryKing Feb 12, 2024
b36bcb8
Fix airport/runway altitude shown in flight plan
BlueberryKing Feb 13, 2024
84c1622
Merge branch 'master' into fms-v2
BlueberryKing Feb 14, 2024
56fc126
Delete alternate flight plan after NEW DEST
BlueberryKing Feb 16, 2024
ad3ee14
Ensure DIR to leg is not in missed approach
BlueberryKing Feb 16, 2024
4f8b1a1
Use TF leg after truncating duplicate waypoint
BlueberryKing Feb 16, 2024
f412c8a
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Feb 17, 2024
5cd9d0c
Fix performance data rounding
BlueberryKing Feb 17, 2024
99c60bb
Only change out of GA phase with new destination
BlueberryKing Feb 17, 2024
6e8214b
Make approach transition names unique
BlueberryKing Feb 18, 2024
e0c25c8
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Feb 18, 2024
87483c7
fix: clock build
Saschl Feb 18, 2024
bcc1ffd
fix: weather request manual entry
Saschl Feb 19, 2024
038c58d
Ignore null legs in distance calculation
BlueberryKing Feb 22, 2024
2483b07
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Feb 22, 2024
0ad6151
Identify procedures by id over ident
BlueberryKing Feb 22, 2024
f42e80c
fix: clock build pt 2
Saschl Feb 22, 2024
87a40b4
Merge branch 'fms-v2' of https://github.com/flybywiresim/aircraft int…
BlueberryKing Feb 23, 2024
8bf9a2c
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Feb 23, 2024
d80da7c
Adjust flypad imports
BlueberryKing Feb 24, 2024
a058620
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Feb 24, 2024
ac12e93
sync and serialization fixes
Benjozork Feb 25, 2024
3bc75e4
fix: efb build
Saschl Feb 25, 2024
5c9d8dd
Fix first departure leg runway check
BlueberryKing Feb 26, 2024
ddfe067
Fix linting issues
BlueberryKing Feb 26, 2024
2256fab
Don't override runway idents
BlueberryKing Feb 27, 2024
6c7f1e2
Fix leftover procedure identification inconsistencies
BlueberryKing Feb 29, 2024
e33356e
Export `getAlongTrackDistanceTo`
BlueberryKing Feb 29, 2024
6177948
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Feb 29, 2024
69da905
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Mar 4, 2024
c7a5da4
Fix some more linting issues
BlueberryKing Mar 4, 2024
b0302ed
Port basic atsu flightplan synchronisation code
BlueberryKing Mar 4, 2024
a3769df
Merge branch 'master' into fms-v2
aguther Mar 7, 2024
8ae0d0e
Fix lint even harder
BlueberryKing Mar 7, 2024
a642b2f
Fix departure page layout
BlueberryKing Mar 8, 2024
de10dce
Fix alternate destination being copied to active
BlueberryKing Mar 9, 2024
d949208
Do not try to string MANUAL legs
BlueberryKing Mar 9, 2024
3677241
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Mar 9, 2024
5caf2b6
Fix single waypoint SID imports again
BlueberryKing Mar 10, 2024
9c80196
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Mar 11, 2024
20c9d31
Merge branch 'master' into fms-v2
aguther Mar 17, 2024
5683499
feat: fms-v2 msfs sync (#8508)
Saschl Mar 18, 2024
3612c22
fix: approach mapping, off by one error and runway selection
Saschl Mar 20, 2024
17f190b
remove flightPlanTest
Saschl Mar 20, 2024
c0cadfa
fix: typing errors
Saschl Mar 20, 2024
bbfa446
fix: destination runways without secondary designator
Saschl Mar 20, 2024
985f247
fix: lint
Saschl Mar 20, 2024
981209b
fix(sync): use sensible defaults if mapping fails
Saschl Mar 20, 2024
e9fbdd1
fix: init issue after fixing other init issue
Saschl Mar 20, 2024
e366799
Fix wrong FD leg ident
BlueberryKing Mar 22, 2024
48ffe17
Improve arrival and departure pages
BlueberryKing Mar 22, 2024
4221c75
Handle explicit NO SID, NO STAR, etc. selection
BlueberryKing Mar 22, 2024
7947117
Refactor MPR selection
BlueberryKing Mar 22, 2024
65339fe
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Mar 22, 2024
a833eff
Merge branch 'fms-v2' of https://github.com/flybywiresim/aircraft int…
BlueberryKing Mar 22, 2024
803deb3
Fix missing disco after leg deletion in alternate
BlueberryKing Mar 22, 2024
1123df5
Remove arrival procedures after changing alternate
BlueberryKing Mar 22, 2024
5217910
Dump entire alternate plan when changing altn dest
BlueberryKing Mar 23, 2024
5aef002
feat: load MSFS flightplan in "SAVE" mode too
Saschl Mar 23, 2024
5c0c395
Remove commented code
BlueberryKing Mar 23, 2024
b06c814
Merge branch 'fms-v2' of https://github.com/flybywiresim/aircraft int…
BlueberryKing Mar 23, 2024
fe481af
Remove FacilityCache console logging
BlueberryKing Mar 23, 2024
efe2b80
Highlight entire row for selected approach
BlueberryKing Mar 23, 2024
f4c88d4
Allow repeated constraints in F-PLN page
BlueberryKing Mar 23, 2024
fa049ce
Remove duplicate code
BlueberryKing Mar 24, 2024
b94ea8d
Fix deletion of leg after CI at segment boundary
BlueberryKing Mar 24, 2024
eda1abe
Implement basic support for XI IF XF leg combination
BlueberryKing Mar 24, 2024
e89dcdc
Disable SEC fpln functionality for now
BlueberryKing Mar 24, 2024
3877dea
Disable fms-v2 tests until they are fixed
BlueberryKing Mar 24, 2024
08ce72d
improve error handling and runway designatorChars
Saschl Mar 24, 2024
f4c05d2
make loading and saving more resilient
Saschl Mar 25, 2024
458a304
Disable inoperative buttons
BlueberryKing Mar 25, 2024
6d5e164
Remove debugger statement
BlueberryKing Mar 25, 2024
1f30c2f
Fix WAYPOINT page entry
BlueberryKing Mar 25, 2024
f4b29ed
Fix missing error message after waypoint insertion
BlueberryKing Mar 25, 2024
053bb8d
fix: potential bogus comparison
Saschl Mar 26, 2024
7bcf973
Rebuild arrival after setting all alternate procedures
BlueberryKing Mar 26, 2024
465795f
Handle missing geometry leg again
BlueberryKing Mar 27, 2024
e61e69b
Reset managed speed constraint after GA
BlueberryKing Mar 27, 2024
c6f4283
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Mar 31, 2024
093e635
Increase VM leg size
BlueberryKing Apr 1, 2024
123b8d5
Make MRP side dependent
BlueberryKing Apr 1, 2024
0a98fa1
Remove dead code
BlueberryKing Apr 1, 2024
bb6517d
Fix AIRPORT button getting stuck
BlueberryKing Apr 1, 2024
6f946a8
Fix references to dead functions
BlueberryKing Apr 1, 2024
0ab07be
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Apr 1, 2024
bd91f97
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Apr 2, 2024
00d070d
Fix typo
BlueberryKing Apr 2, 2024
f68bf26
Remove TODO for clarity
BlueberryKing Apr 2, 2024
ac51467
Sync cruise step deletion
BlueberryKing Apr 2, 2024
56265ab
Re-add licence identifier
BlueberryKing Apr 2, 2024
dc12ff8
Move `WaypointConstraintType`
BlueberryKing Apr 2, 2024
d9878d6
fix: do not transmit empty vectors if not needed
Saschl Apr 2, 2024
5dc361d
Encode MRP in ARINC429
BlueberryKing Apr 5, 2024
71cd446
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Apr 5, 2024
5e3be0f
Update comment
BlueberryKing Apr 6, 2024
0e1dab7
Remove unused arguments
BlueberryKing Apr 6, 2024
1519ca3
Fix wrong TO waypoint for runways
BlueberryKing Apr 6, 2024
676a3bb
Fix EFB build again
BlueberryKing Apr 7, 2024
0415b78
fix: efb ts config
2hwk Apr 7, 2024
ce17f8d
Merge branch 'master' into fms-v2
2hwk Apr 8, 2024
75bda12
fix: revert optimization until better solution found
Saschl Apr 8, 2024
e630f51
fix: new allocation optimisation for efis vector sync
2hwk Apr 8, 2024
57813f6
refactor: undefined -> null
2hwk Apr 8, 2024
1f38dc2
Add null check
BlueberryKing Apr 8, 2024
9dfce4c
Remove JS FMCDataManager
BlueberryKing Apr 8, 2024
912c66b
fix: hotfix for departure page issue with selecting new dep runway
2hwk Apr 9, 2024
a2f37ea
fix: only set atc crz flight level when defined, remove console logs
Saschl Apr 9, 2024
83083f4
Change runway ident format
BlueberryKing Apr 9, 2024
39c7f36
Merge branch 'fms-v2' of https://github.com/flybywiresim/aircraft int…
BlueberryKing Apr 9, 2024
5f29b35
fix: fpln sync after recent changes
Saschl Apr 9, 2024
ea0f79c
Remove SID when changing runway
BlueberryKing Apr 10, 2024
65a848b
Remove arrival when changing approach
BlueberryKing Apr 10, 2024
6d4814d
fix: text alignment for constraints (font still needs work)
2hwk Apr 12, 2024
f73824f
ci: Rename workflows from 'PR' to more descriptive names (#8614)
alepouna Apr 8, 2024
57e9a4f
feat(flight_model): Add drag from landing lights (#8554)
crocket63 Apr 9, 2024
203ff6d
refactor: Fadec rewrite using Cpp framework (#8547)
frankkopp Apr 11, 2024
7bc0448
fix(fadec): flex temp unit conversion (#8617)
Saschl Apr 11, 2024
fd04390
Show NOT ALLOWED upon procedure reselection
BlueberryKing Apr 12, 2024
bdf8be2
Merge legs after certain disco deletions
BlueberryKing Apr 12, 2024
ed220a1
Fix circling approach not showing up
BlueberryKing Apr 12, 2024
0d1041d
fix: Fixed bug in checklist to not display previous checklists as com…
frankkopp Apr 11, 2024
91e2e0e
Fix ND not updating after TMPY deletion
BlueberryKing Apr 13, 2024
d4f99f2
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Apr 13, 2024
c2dd86e
Fix disco deletion
BlueberryKing Apr 13, 2024
e8351e0
Show NOT ALLOWED upon procedure reselection
BlueberryKing Apr 12, 2024
89293b8
Merge legs after certain disco deletions
BlueberryKing Apr 12, 2024
d57cbb8
Fix circling approach not showing up
BlueberryKing Apr 12, 2024
6fb38bc
Fix ND not updating after TMPY deletion
BlueberryKing Apr 13, 2024
7fbe4c8
Fix disco deletion
BlueberryKing Apr 13, 2024
c3efdd0
fix: don't throw null true bearing when parsing discont
2hwk Apr 14, 2024
e32577e
fix: check for null vs truthiness
2hwk Apr 14, 2024
8e42ab0
Merge branch 'fms-v2' of https://github.com/flybywiresim/aircraft int…
BlueberryKing Apr 14, 2024
56ad887
fix: use strict !==
2hwk Apr 14, 2024
7157cf2
Merge branch 'fms-v2' of https://github.com/flybywiresim/aircraft int…
BlueberryKing Apr 14, 2024
3b091b5
Fix FREQ not shown after deduplicating airway fixes
BlueberryKing Apr 14, 2024
6934d42
Port tropopause uplink
BlueberryKing Apr 14, 2024
fa18ae1
Show NOT ALLOWED when attempting to clr ZFW/ZFWCG
BlueberryKing Apr 14, 2024
fef527e
Remove unused import
BlueberryKing Apr 14, 2024
ed18556
HIde circling approaches
BlueberryKing Apr 16, 2024
26c6788
Show CLB or DES prompt when necessary
BlueberryKing Apr 16, 2024
f6a8905
Show NO TRANS when explicitly selected
BlueberryKing Apr 16, 2024
9b45d77
Show ENTRY for pilot constructed points on PROG page
BlueberryKing Apr 16, 2024
fd6bdaf
Filter STARs when only runway selected
BlueberryKing Apr 17, 2024
f89abf0
Revert "Show NO TRANS when explicitly selected"
BlueberryKing Apr 17, 2024
9e8c368
Fix NO SID, NO STAR selection not working
BlueberryKing Apr 18, 2024
b308e77
Improve automatic NONE selection
BlueberryKing Apr 18, 2024
c0fc48d
Improve automatic NONE trans selection
BlueberryKing Apr 18, 2024
5e7cb17
Handle missing airways during uplink
BlueberryKing Apr 20, 2024
76e2435
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Apr 20, 2024
b7dbd97
clean up after git mess
flogross89 Feb 15, 2024
e3d1c0b
make performance data nullable (incl. FMC implications); remove dead…
flogross89 Feb 17, 2024
b7e57cf
GeometricPathBuilder fix
flogross89 Apr 17, 2024
4741730
update from a380 branch
flogross89 Apr 21, 2024
68f50ff
merge fix
flogross89 Apr 21, 2024
6f3599f
re-insert MathUtils, to be deleted with MFD PR
flogross89 Apr 21, 2024
1701ca2
updated fms type improvements (make nullable, don't use undefined)
flogross89 Apr 21, 2024
d09f7a1
feat(fms): fm legs
tracernz Apr 22, 2024
0e70176
fix(fms): to wpt details for fm leg
tracernz Apr 22, 2024
8659650
Fix trans lvl being reset when changing runway
BlueberryKing Apr 22, 2024
a95a6bd
Fix runway formatting on PERF page
BlueberryKing Apr 22, 2024
e2762e1
feat(utils): add angle normalise functions
tracernz Apr 23, 2024
4c25e19
fix(fms): fix vor station declination
tracernz Apr 23, 2024
47a32a8
fix: handle "at or below" constraint
Saschl Apr 25, 2024
b3502a9
Merge branch 'master' into fms-v2
BlueberryKing Apr 25, 2024
8704ace
chore: update fms-v2 workflow
Saschl Apr 25, 2024
2fb16d5
Merge remote-tracking branch 'fbw/master' into fms-v2
Saschl Apr 25, 2024
357854d
fix: 380 fadec build
Saschl Apr 25, 2024
3157ad7
fix(fms): cf leg interpretation
tracernz Apr 27, 2024
2f5dae9
fix(fms): idf sids => also sids starting with cf leg
tracernz Apr 27, 2024
571401a
feat(fms): fa leg v0.0.1
tracernz Apr 27, 2024
80781a4
Merge branch 'refs/heads/master' into fms-v2
Benjozork Apr 27, 2024
f44dae8
fix: eslint ref
Benjozork Apr 27, 2024
715d22a
style: run lint after merge
Benjozork Apr 27, 2024
e7bf4b2
chore: fix lint
Benjozork Apr 27, 2024
a3c167b
chore: fix lint
Benjozork Apr 27, 2024
39634ee
Treat missed approach legs as climb constraints
BlueberryKing Apr 27, 2024
8aee5c4
Fix missed approach track not being shown
BlueberryKing Apr 28, 2024
8922551
Merge branch 'fms-v2' of https://github.com/flybywiresim/aircraft int…
BlueberryKing Apr 28, 2024
bdd35b8
Allow SID without runway
BlueberryKing Apr 28, 2024
1708525
Merge commit '8aee5c4d4b46dc2e46f1ff0098b0f2f07eafe17b' into feat-fms…
flogross89 Apr 28, 2024
cebf219
Merge commit '89225515e80f480614def83a82cabb2251b29f03' into feat-fms…
flogross89 Apr 28, 2024
24a1872
Merge branch 'fms-v2' into feat-fms-v2-aircraft-config-2
flogross89 Apr 28, 2024
1c92aa8
lint-fix
flogross89 Apr 28, 2024
897e322
fix lint error, don't include debug switches in a/c specific lnav config
flogross89 Apr 30, 2024
a8ada8c
fix build :/
flogross89 Apr 30, 2024
1ab3e79
Merge branch 'master' into feat-fms-v2-aircraft-config-2
flogross89 Jun 15, 2024
05f512a
make legEta non-static, update copyright claims, remove facLoader (tr…
flogross89 Jun 15, 2024
1e64e5d
holland's comments: update copyright claims, remove exports, change f…
flogross89 Jun 15, 2024
8c2119a
don't delete one more copyright claim
flogross89 Jun 15, 2024
c84ba2e
fix merge error
flogross89 Jun 15, 2024
7f23f70
[VNAV] a32nx fixes
flogross89 Jun 21, 2024
8f88e68
Merge branch 'master' into a380x-experimental
flogross89 Jun 27, 2024
b262aad
Merge branch 'master' into feat-fms-v2-aircraft-config-2
flogross89 Jun 27, 2024
2f1e222
Merge branch 'master' into feat-fms-v2-aircraft-config-2
flogross89 Jul 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1076,10 +1076,10 @@ function formatAltitudeOrLevel(mcdu, alt, useTransAlt) {
let isFl = false;
if (useTransAlt) {
const transAlt = activePlan.performanceData.transitionAltitude;
isFl = transAlt !== undefined && alt > transAlt;
isFl = transAlt !== null && alt > transAlt;
} else {
const transLevel = activePlan.performanceData.transitionLevel;
isFl = transLevel !== undefined && alt >= (transLevel * 100);
isFl = transLevel !== null && alt >= (transLevel * 100);
}

if (isFl) {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// Copyright (c) 2021-2024 FlyByWire Simulations
//
// SPDX-License-Identifier: GPL-3.0

import {
AircraftConfig,
EngineModelParameters,
FlightModelParameters,
LnavConfig,
VnavConfig,
VnavDescentMode,
} from '@fmgc/flightplanning/new/AircraftConfigTypes';

const lnavConfig: LnavConfig = {
DEFAULT_MIN_PREDICTED_TAS: 160,
TURN_RADIUS_FACTOR: 1.0,
NUM_COMPUTED_TRANSITIONS_AFTER_ACTIVE: -1,
};

const vnavConfig: VnavConfig = {
VNAV_DESCENT_MODE: VnavDescentMode.NORMAL,
VNAV_EMIT_CDA_FLAP_PWP: false,
DEBUG_PROFILE: false,
DEBUG_GUIDANCE: false,
ALLOW_DEBUG_PARAMETER_INJECTION: false,
VNAV_USE_LATCHED_DESCENT_MODE: false,
IDLE_N1_MARGIN: 3,
MAXIMUM_FUEL_ESTIMATE: 40000,
};

const flightModelParams: FlightModelParameters = {
Cd0: 0.01873,
wingSpan: 117.454,
wingArea: 1317.47,
wingEffcyFactor: 0.7,
requiredAccelRateKNS: 1.33,
requiredAccelRateMS2: 0.684,
gravityConstKNS: 19.0626,
gravityConstMS2: 9.806665,
machValues: [0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85],
dragCoefficientCorrections: [0, 0.0002, 0.0003, 0.0004, 0.0008, 0.0015, 0.01],
speedBrakeDrag: 0.01008,
gearDrag: 0.0372,
dragCoeffFactor: 1,
};

const engineModelParams: EngineModelParameters = {
maxThrust: 27120,
numberOfEngines: 2,
fuelBurnFactor: 1.0,
};

export const A320AircraftConfig: AircraftConfig = {
lnavConfig,
vnavConfig,
engineModelParameters: engineModelParams,
flightModelParameters: flightModelParams,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Copyright (c) 2023-2024 FlyByWire Simulations
//
// SPDX-License-Identifier: GPL-3.0

import {
AircraftConfig,
EngineModelParameters,
FlightModelParameters,
LnavConfig,
VnavConfig,
VnavDescentMode,
} from '@fmgc/flightplanning/new/AircraftConfigTypes';

const lnavConfig: LnavConfig = {
DEFAULT_MIN_PREDICTED_TAS: 160,
TURN_RADIUS_FACTOR: 1.0,
NUM_COMPUTED_TRANSITIONS_AFTER_ACTIVE: -1,
};

const vnavConfig: VnavConfig = {
VNAV_DESCENT_MODE: VnavDescentMode.NORMAL,
VNAV_EMIT_CDA_FLAP_PWP: false,
DEBUG_PROFILE: false,
DEBUG_GUIDANCE: false,
ALLOW_DEBUG_PARAMETER_INJECTION: false,
VNAV_USE_LATCHED_DESCENT_MODE: false,
IDLE_N1_MARGIN: 2,
MAXIMUM_FUEL_ESTIMATE: 250_000,
};

const flightModelParams: FlightModelParameters = {
wingSpan: 262.467,
wingArea: 9096,
wingEffcyFactor: 0.7,
requiredAccelRateKNS: 1.33,
requiredAccelRateMS2: 0.684,
gravityConstKNS: 19.0626,
gravityConstMS2: 9.806665,
machValues: [0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85],
dragCoefficientCorrections: [0, 0.0002, 0.0003, 0.0004, 0.0008, 0.0015, 0.01],
speedBrakeDrag: 0.0201,
gearDrag: 0.00872,
dragCoeffFactor: 0.87,
};

const engineModelParams: EngineModelParameters = {
maxThrust: 80_213,
numberOfEngines: 4,
fuelBurnFactor: 2.73,
};

export const A380AircraftConfig: AircraftConfig = {
lnavConfig,
vnavConfig,
engineModelParameters: engineModelParams,
flightModelParameters: flightModelParams,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
// Copyright (c) 2021-2022 FlyByWire Simulations
//
// SPDX-License-Identifier: GPL-3.0

export enum VnavDescentMode {
NORMAL,
CDA,
DPO,
}

export interface AircraftConfig {
lnavConfig: LnavConfig;
vnavConfig: VnavConfig;
engineModelParameters: EngineModelParameters;
flightModelParameters: FlightModelParameters;
}

export interface VnavConfig {
/**
* VNAV descent calculation mode (NORMAL, CDA or DPO)
*/
VNAV_DESCENT_MODE: VnavDescentMode;

/**
* Whether to emit CDA flap1/2 pseudo-waypoints (only if VNAV_DESCENT_MODE is CDA)
*/
VNAV_EMIT_CDA_FLAP_PWP: boolean;

/**
* Whether to pring debug information and errors during the VNAV computation.
*/
DEBUG_PROFILE: boolean;

/**
* Whether to print guidance debug information on the ND
*/
DEBUG_GUIDANCE: boolean;

/**
* Whether to use debug simvars (VNAV_DEBUG_*) to determine aircraft position and state.
* This is useful for testing VNAV without having to fly the aircraft. This lets you put the aircraft some distance before destination at a given altitude and speed.
* The following simvars can be used:
* - A32NX_FM_VNAV_DEBUG_POINT: Indicates the distance from start (NM) at which to draw a debug pseudowaypoint on the ND
* - A32NX_FM_VNAV_DEBUG_ALTITUDE: Indicates the indicated altitude (ft) VNAV uses for predictions
* - A32NX_FM_VNAV_DEBUG_SPEED: Indicates the indicated airspeed (kts) VNAV uses for predictions
* - A32NX_FM_VNAV_DEBUG_DISTANCE_TO_END: Indicates the distance (NM) to end VNAV uses for predictions
*/
ALLOW_DEBUG_PARAMETER_INJECTION: boolean;

VNAV_USE_LATCHED_DESCENT_MODE: boolean;

/**
* Percent N1 to add to the predicted idle N1. The real aircraft does also use a margin for this, but I don't know how much
*/
IDLE_N1_MARGIN: number;

/**
* VNAV needs to make an initial estimate of the fuel on board at destination to compute the descent path.
* We don't want this figure to be too large as it might crash the predictions. So we clamp it to this value.
* This value is in lbs.
*/
MAXIMUM_FUEL_ESTIMATE: number;
}

/** Only covers aircraft specific configs, no debug switches */
export interface LnavConfig {
/* ========== PATHGEN CONFIG ========== */

/**
* The minimum TAS we ever compute guidables with
*/
DEFAULT_MIN_PREDICTED_TAS: number;

/**
* Coefficient applied to all transition turn radii
*/
TURN_RADIUS_FACTOR: number;

/**
* The number of transitions to compute after the active leg (-1: no limit, compute all transitions)
*/
NUM_COMPUTED_TRANSITIONS_AFTER_ACTIVE: number;
}

export interface EngineModelParameters {
/** In pounds of force. Used as a multiplier for results of table 1506 */
maxThrust: number;

/** Well... how many engines the plen has */
numberOfEngines: number;

/** Fuel burn relative to A320 / base implementation */
fuelBurnFactor: number;
}

export interface FlightModelParameters {
Cd0?: number;

wingSpan: number;

wingArea: number;

wingEffcyFactor: number;

/** in knots/second */
requiredAccelRateKNS: number;

/** in m/s^2 */
requiredAccelRateMS2: number;

/** in knots/second */
gravityConstKNS: number;

/** in m/s^2 */
gravityConstMS2: number;

/** From https://github.com/flybywiresim/a32nx/pull/6903#issuecomment-1073168320 */
machValues: Mach[];

dragCoefficientCorrections: number[];

/** Drag coefficient increase due to extended speed brake */
speedBrakeDrag: number;

/** Drag coefficient increase due to extended speed brake */
gearDrag: number;

/** Drag coefficient factor for tuning */
dragCoeffFactor: number;
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type PbdWaypoint = {
pbdDistance: NauticalMiles;
};

export type PilotWaypoint = LatLonWaypoint | PbxWaypoint | PbdWaypoint;
export type PilotWaypoint = LatLonWaypoint | PbxWaypoint | PbdWaypoint | null;
flogross89 marked this conversation as resolved.
Show resolved Hide resolved

export class DataManager {
private static readonly STORED_WP_KEY: string = 'A32NX.StoredWaypoints';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ export class FlightPlanService<P extends FlightPlanPerformanceData = FlightPlanP
async addOrEditManualHold(
at: number,
desiredHold: HoldData,
modifiedHold: HoldData,
modifiedHold: HoldData | undefined,
defaultHold: HoldData,
planIndex = FlightPlanIndex.Active,
alternate = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class WaypointEntryUtils {
fms: DataInterface & DisplayInterface,
place: string,
stored: boolean,
ident: string,
ident?: string,
): Promise<Fix | undefined> {
if (WaypointEntryUtils.isLatLonFormat(place)) {
const coordinates = WaypointEntryUtils.parseLatLon(place);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ export interface DisplayInterface {
/**
* Called when a flight plan uplink is in progress
*/
onUplinkInProgress();
onUplinkInProgress(): void;

/**
* Called when a flight plan uplink is done
*/
onUplinkDone();
onUplinkDone(): void;

/**
* Calling this function with a message should display 1the message in the FMS' message area,
Expand All @@ -24,7 +24,7 @@ export interface DisplayInterface {
*
* @param errorType the message to show
*/
showFmsErrorMessage(errorType: FmsErrorType);
showFmsErrorMessage(errorType: FmsErrorType): void;

/**
* Calling this function with an array of items should display a UI allowing the user to
Expand Down
Loading