diff --git a/fbw-a32nx/src/systems/fmgc/src/flightplanning/A320AircraftConfig.ts b/fbw-a32nx/src/systems/fmgc/src/flightplanning/A320AircraftConfig.ts index 336103bf80a0..c1b6e6b6b011 100644 --- a/fbw-a32nx/src/systems/fmgc/src/flightplanning/A320AircraftConfig.ts +++ b/fbw-a32nx/src/systems/fmgc/src/flightplanning/A320AircraftConfig.ts @@ -49,6 +49,99 @@ const engineModelParams: EngineModelParameters = { maxThrust: 27120, numberOfEngines: 2, fuelBurnFactor: 1.0, + n1ClimbLimit: [ + [0, 2000, 5000, 8000, 12000, 15000, 17000, 20000, 24000, 27000, 31000, 35000, 39000, 41500], + [-54.0, 71.8, 73.6, 75.5, 76.8, 78.1, 78.9, 80.1, 81.5, 81.6, 83.0, 83.6, 83.7, 83.3], + [-50.0, 72.5, 74.3, 76.2, 77.5, 78.8, 79.6, 80.9, 82.2, 82.4, 83.8, 84.4, 84.5, 84.0], + [-46.0, 73.1, 75.0, 76.9, 78.2, 79.5, 80.3, 81.6, 83.0, 83.1, 84.5, 85.1, 85.3, 84.8], + [-42.0, 73.8, 75.6, 77.6, 78.9, 80.2, 81.0, 82.3, 83.7, 83.8, 85.3, 85.9, 86.0, 85.5], + [-38.0, 74.4, 76.3, 78.2, 79.6, 80.9, 81.7, 83.0, 84.4, 84.6, 86.0, 86.6, 86.7, 86.3], + [-34.0, 75.0, 76.9, 78.9, 80.3, 81.6, 82.4, 83.7, 85.1, 85.3, 86.7, 87.3, 87.5, 87.0], + [-30.0, 75.7, 77.6, 79.6, 80.9, 82.2, 83.1, 84.4, 85.8, 86.0, 87.5, 88.1, 88.2, 87.7], + [-26.0, 76.3, 78.2, 80.2, 81.6, 82.9, 83.8, 85.1, 86.5, 86.7, 88.2, 88.8, 88.9, 88.4], + [-22.0, 76.9, 78.8, 80.9, 82.2, 83.6, 84.4, 85.8, 87.2, 87.4, 88.9, 89.5, 89.6, 89.1], + [-18.0, 77.5, 79.5, 81.5, 82.9, 84.2, 85.1, 86.5, 87.9, 88.1, 89.6, 90.2, 90.0, 89.5], + [-14.0, 78.1, 80.1, 82.1, 83.5, 84.9, 85.8, 87.1, 88.6, 88.8, 90.3, 90.0, 89.2, 88.7], + [-10.0, 78.7, 80.7, 82.8, 84.2, 85.6, 86.4, 87.8, 89.3, 89.5, 91.0, 89.2, 88.4, 87.9], + [-6.0, 79.3, 81.3, 83.4, 84.8, 86.2, 87.1, 88.5, 90.0, 90.1, 91.1, 88.5, 87.7, 87.1], + [-2.0, 79.9, 81.9, 84.0, 85.5, 86.8, 87.7, 89.1, 90.6, 90.8, 90.2, 87.7, 86.9, 86.4], + [2.0, 80.5, 82.5, 84.6, 86.1, 87.5, 88.4, 89.8, 91.3, 90.3, 89.5, 87.0, 86.2, 85.6], + [6.0, 81.1, 83.1, 85.3, 86.7, 88.1, 89.0, 90.4, 90.5, 89.5, 88.8, 86.3, 85.5, 84.9], + [10.0, 81.6, 83.7, 85.9, 87.3, 88.7, 89.7, 90.0, 89.6, 88.7, 88.1, 85.6, 84.8, 84.2], + [14.0, 82.2, 84.3, 86.5, 87.9, 89.4, 89.3, 89.1, 88.7, 87.9, 87.5, 84.8, 83.9, 83.3], + [18.0, 82.8, 84.9, 87.1, 88.5, 88.6, 88.4, 88.3, 87.9, 87.2, 86.8, 86.8, 86.8, 86.8], + [22.0, 83.4, 85.5, 86.9, 88.0, 87.8, 87.7, 87.5, 87.2, 86.5, 86.1, 86.1, 86.1, 86.1], + [26.0, 83.9, 85.7, 86.2, 87.2, 87.1, 87.0, 86.8, 86.5, 85.8, 85.4, 85.4, 85.4, 85.4], + [30.0, 84.5, 84.9, 85.4, 86.5, 86.4, 86.3, 86.1, 85.8, 85.1, 85.1, 85.1, 85.1, 85.1], + [34.0, 83.8, 84.2, 84.7, 85.8, 85.7, 85.6, 85.5, 85.1, 85.1, 85.1, 85.1, 85.1, 85.1], + [38.0, 83.0, 83.4, 83.9, 85.1, 85.0, 84.9, 84.8, 84.8, 84.8, 84.8, 84.8, 84.8, 84.8], + [42.0, 82.2, 82.6, 83.1, 84.4, 84.4, 84.3, 84.3, 84.3, 84.3, 84.3, 84.3, 84.3, 84.3], + [46.0, 81.4, 81.8, 82.4, 83.7, 83.7, 83.7, 83.7, 83.7, 83.7, 83.7, 83.7, 83.7, 83.7], + [50.0, 80.6, 81.1, 81.6, 83.0, 83.0, 83.0, 83.0, 83.0, 83.0, 83.0, 83.0, 83.0, 83.0], + [54.0, 79.9, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4], + [58.0, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2], + ], + table1502: [ + [0, 0, 0.2, 0.9], + [18.2, 0.0, 0.0, 17.0], + [22.0, 1.9, 1.9, 17.4], + [26.0, 2.5, 2.5, 18.2], + [57.0, 12.8, 12.8, 27.0], + [68.2, 19.6, 19.6, 34.827774], + [77.0, 26.0, 26.0, 40.839552], + [83.0, 31.42024, 31.42024, 44.768766], + [89.0, 40.972041, 40.972041, 50.09214], + [92.8, 51.0, 51.0, 55.042], + [97.0, 65.0, 65.0, 65.0], + [100.0, 77.0, 77.0, 77.0], + [104.0, 85.0, 85.0, 85.5], + [116.5, 101.0, 101.0, 101.0], + ], + table1503: [ + [0, 1.0, 1.20172257, 1.453783983, 2.175007333, 3.364755652, 4.47246108, 5.415178313], + [0.0, 68.2, 69.402657, 70.671269, 73.432244, 76.544349, 78.644882, 78.644882], + [0.1, 76.0, 77.340205, 78.753906, 81.830654, 85.298688, 87.639458, 87.639458], + [0.2, 83.0, 84.463645, 86.007556, 89.367688, 93.155146, 95.711513, 95.711513], + [0.4, 92.8, 94.436461, 96.162664, 99.919535, 104.154188, 107.01239, 107.01239], + [0.6, 98.0, 99.728159, 101.55109, 105.518475, 109.990414, 113.008774, 113.008774], + [0.75, 101.5, 103.289879, 105.177914, 109.286991, 113.918643, 117.044802, 117.044802], + [0.9, 103.0, 104.81633, 106.0, 110.90207, 115.60217, 118.774528, 118.774528], + [1.0, 104.2, 106.037491, 107.97575, 112.194133, 116.948991, 120.158309, 120.158309], + ], + table1504: [ + [0, 1.0, 1.20172257, 1.453783983, 2.175007333, 3.364755652, 4.47246108, 5.415178313], + [0.0, 63.267593, 64.383271, 65.560133, 68.121427, 71.008456, 72.957073, 72.957073], + [0.1, 70.503476, 71.746753, 73.058212, 75.912441, 79.129658, 81.301137, 81.301137], + [0.2, 76.997217, 78.355007, 79.787258, 82.904376, 86.417916, 88.789399, 88.789399], + [0.4, 86.088455, 87.606562, 89.207922, 92.693086, 96.621477, 99.272967, 99.272967], + [0.6, 90.912377, 92.51555, 94.206642, 97.887095, 102.035612, 104.835676, 104.835676], + [0.75, 94.159247, 95.819677, 97.571165, 101.383063, 105.679741, 108.579808, 108.579808], + [0.9, 95.550763, 97.235732, 98.333795, 102.881334, 107.24151, 110.184435, 110.184435], + [1.0, 104.2, 106.037491, 107.97575, 112.194133, 116.948991, 120.158309, 120.158309], + ], + table1506: [ + [0.0, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9], + [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], + [20.0, 0.091741, 0.05702, 0.052029, 0.028096, -0.017284, -0.037284, -0.057077, -0.205841, -0.315399, -0.488717], + [25.0, 0.14281, 0.072215, 0.053026, 0.030404, -0.009593, -0.026571, -0.041999, -0.151328, -0.266204, -0.439028], + [30.0, 0.189837, 0.082322, 0.05505, 0.032748, 0.017389, 0.00399, -0.026921, -0.051814, -0.081946, -0.369391], + [35.0, 0.262207, 0.126047, 0.077206, 0.045921, 0.024719, 0.006062, -0.002812, -0.0228, -0.044248, -0.293631], + [40.0, 0.33023, 0.162757, 0.124088, 0.069579, 0.057905, 0.049621, 0.02979, -0.002139, -0.025811, -0.22063], + [45.0, 0.393293, 0.250096, 0.156707, 0.112419, 0.091418, 0.076757, 0.05609, 0.018509, -0.007375, -0.15512], + [50.0, 0.452337, 0.311066, 0.211353, 0.158174, 0.127429, 0.104915, 0.081171, 0.047419, 0.011062, -0.098474], + [55.0, 0.509468, 0.373568, 0.269961, 0.209106, 0.16865, 0.137223, 0.108383, 0.07566, 0.028704, -0.049469], + [60.0, 0.594614, 0.439955, 0.334629, 0.267477, 0.217773, 0.176899, 0.141404, 0.107148, 0.064556, -0.005036], + [65.0, 0.660035, 0.512604, 0.407151, 0.335055, 0.276928, 0.226669, 0.183627, 0.14585, 0.104441, 0.039012], + [70.0, 0.733601, 0.593506, 0.488571, 0.412623, 0.347163, 0.28821, 0.237559, 0.195142, 0.152485, 0.087269], + [75.0, 0.818693, 0.68388, 0.578756, 0.499514, 0.427939, 0.361604, 0.304241, 0.257197, 0.212005, 0.144042], + [80.0, 0.910344, 0.783795, 0.675982, 0.593166, 0.516644, 0.444822, 0.382689, 0.332384, 0.284867, 0.212679], + [85.0, 1.025165, 0.891823, 0.776548, 0.688692, 0.608128, 0.53321, 0.469351, 0.41869, 0.37087, 0.294907], + [90.0, 1.157049, 1.004695, 0.8744, 0.778466, 0.694251, 0.619011, 0.557581, 0.511153, 0.467149, 0.390203], + [95.0, 1.281333, 1.116993, 0.960774, 0.851733, 0.763455, 0.69089, 0.637136, 0.601322, 0.567588, 0.495167], + [100.0, 1.357935, 1.220844, 1.023864, 0.894234, 0.800352, 0.733488, 0.693684, 0.654691, 0.617963, 0.539115], + [105.0, 1.378826, 1.239626, 1.048498, 0.91575, 0.819609, 0.751137, 0.710375, 0.670444, 0.632832, 0.552086], + [110.0, 1.392754, 1.252148, 1.069322, 0.933937, 0.835886, 0.766054, 0.724483, 0.683759, 0.6454, 0.563051], + ], }; const fmsSymbolConfig: FMSymbolsConfig = { diff --git a/fbw-a32nx/src/systems/fmgc/src/flightplanning/A380AircraftConfig.ts b/fbw-a32nx/src/systems/fmgc/src/flightplanning/A380AircraftConfig.ts index ad154e4248b5..4f1df25f2259 100644 --- a/fbw-a32nx/src/systems/fmgc/src/flightplanning/A380AircraftConfig.ts +++ b/fbw-a32nx/src/systems/fmgc/src/flightplanning/A380AircraftConfig.ts @@ -48,6 +48,133 @@ const engineModelParams: EngineModelParameters = { maxThrust: 80_213, numberOfEngines: 4, fuelBurnFactor: 1.33, + /** + * Maximum N1 in CLB thrust + * @param i row index (tat) in steps of 4°C + * @param j col index (pressure altitude, ft) + * @returns Corrected N1 (CN1) + */ + n1ClimbLimit: [ + [0, 2000, 5000, 8000, 12000, 15000, 17000, 20000, 24000, 27000, 31000, 35000, 39000, 41500], + [-54.0, 71.8, 73.6, 75.5, 76.8, 78.1, 78.9, 80.1, 81.5, 81.6, 83.0, 83.6, 83.7, 83.3], + [-50.0, 72.5, 74.3, 76.2, 77.5, 78.8, 79.6, 80.9, 82.2, 82.4, 83.8, 84.4, 84.5, 84.0], + [-46.0, 73.1, 75.0, 76.9, 78.2, 79.5, 80.3, 81.6, 83.0, 83.1, 84.5, 85.1, 85.3, 84.8], + [-42.0, 73.8, 75.6, 77.6, 78.9, 80.2, 81.0, 82.3, 83.7, 83.8, 85.3, 85.9, 86.0, 85.5], + [-38.0, 74.4, 76.3, 78.2, 79.6, 80.9, 81.7, 83.0, 84.4, 84.6, 86.0, 86.6, 86.7, 86.3], + [-34.0, 75.0, 76.9, 78.9, 80.3, 81.6, 82.4, 83.7, 85.1, 85.3, 86.7, 87.3, 87.5, 87.0], + [-30.0, 75.7, 77.6, 79.6, 80.9, 82.2, 83.1, 84.4, 85.8, 86.0, 87.5, 88.1, 88.2, 87.7], + [-26.0, 76.3, 78.2, 80.2, 81.6, 82.9, 83.8, 85.1, 86.5, 86.7, 88.2, 88.8, 88.9, 88.4], + [-22.0, 76.9, 78.8, 80.9, 82.2, 83.6, 84.4, 85.8, 87.2, 87.4, 88.9, 89.5, 89.6, 89.1], + [-18.0, 77.5, 79.5, 81.5, 82.9, 84.2, 85.1, 86.5, 87.9, 88.1, 89.6, 90.2, 90.0, 89.5], + [-14.0, 78.1, 80.1, 82.1, 83.5, 84.9, 85.8, 87.1, 88.6, 88.8, 90.3, 90.0, 89.2, 88.7], + [-10.0, 78.7, 80.7, 82.8, 84.2, 85.6, 86.4, 87.8, 89.3, 89.5, 91.0, 89.2, 88.4, 87.9], + [-6.0, 79.3, 81.3, 83.4, 84.8, 86.2, 87.1, 88.5, 90.0, 90.1, 91.1, 88.5, 87.7, 87.1], + [-2.0, 79.9, 81.9, 84.0, 85.5, 86.8, 87.7, 89.1, 90.6, 90.8, 90.2, 87.7, 86.9, 86.4], + [2.0, 80.5, 82.5, 84.6, 86.1, 87.5, 88.4, 89.8, 91.3, 90.3, 89.5, 87.0, 86.2, 85.6], + [6.0, 81.1, 83.1, 85.3, 86.7, 88.1, 89.0, 90.4, 90.5, 89.5, 88.8, 86.3, 85.5, 84.9], + [10.0, 81.6, 83.7, 85.9, 87.3, 88.7, 89.7, 90.0, 89.6, 88.7, 88.1, 85.6, 84.8, 84.2], + [14.0, 82.2, 84.3, 86.5, 87.9, 89.4, 89.3, 89.1, 88.7, 87.9, 87.5, 84.8, 83.9, 83.3], + [18.0, 82.8, 84.9, 87.1, 88.5, 88.6, 88.4, 88.3, 87.9, 87.2, 86.8, 86.8, 86.8, 86.8], + [22.0, 83.4, 85.5, 86.9, 88.0, 87.8, 87.7, 87.5, 87.2, 86.5, 86.1, 86.1, 86.1, 86.1], + [26.0, 83.9, 85.7, 86.2, 87.2, 87.1, 87.0, 86.8, 86.5, 85.8, 85.4, 85.4, 85.4, 85.4], + [30.0, 84.5, 84.9, 85.4, 86.5, 86.4, 86.3, 86.1, 85.8, 85.1, 85.1, 85.1, 85.1, 85.1], + [34.0, 83.8, 84.2, 84.7, 85.8, 85.7, 85.6, 85.5, 85.1, 85.1, 85.1, 85.1, 85.1, 85.1], + [38.0, 83.0, 83.4, 83.9, 85.1, 85.0, 84.9, 84.8, 84.8, 84.8, 84.8, 84.8, 84.8, 84.8], + [42.0, 82.2, 82.6, 83.1, 84.4, 84.4, 84.3, 84.3, 84.3, 84.3, 84.3, 84.3, 84.3, 84.3], + [46.0, 81.4, 81.8, 82.4, 83.7, 83.7, 83.7, 83.7, 83.7, 83.7, 83.7, 83.7, 83.7, 83.7], + [50.0, 80.6, 81.1, 81.6, 83.0, 83.0, 83.0, 83.0, 83.0, 83.0, 83.0, 83.0, 83.0, 83.0], + [54.0, 79.9, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4], + [58.0, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2], + ], + /** + * Table 1502 - CN2 vs CN1 @ Mach 0, 0.2, 0.9 + * n2_to_n1_table + * @param i row index (n2) + * @param j 1 = Mach 0, 2 = Mach 0.2, 3 = Mach 0.9 + * @returns Corrected N1 (CN1) + */ + table1502: [ + [0, 0, 0.2, 0.9], + [18.2, 0.0, 0.0, 17.0], + [22.0, 1.9, 1.9, 17.4], + [26.0, 2.5, 2.5, 18.2], + [57.0, 12.8, 12.8, 27.0], + [68.2, 19.6, 19.6, 34.827774], + [77.0, 26.0, 26.0, 40.839552], + [83.0, 31.42024, 31.42024, 44.768766], + [89.0, 40.972041, 40.972041, 50.09214], + [92.8, 51.0, 51.0, 55.042], + [97.0, 65.0, 65.0, 65.0], + [100.0, 77.0, 77.0, 77.0], + [104.0, 85.0, 85.0, 85.5], + [116.5, 101.0, 101.0, 101.0], + ], + /** + * Table 1503 - Turbine LoMach (0) CN2 vs. Throttle @ IAP Ratio 1.00000000, 1.20172257, 1.453783983, 2.175007333, 3.364755652, 4.47246108, 5.415178313 + * mach_0_corrected_commanded_ne_table + * @param i row index (thrust lever position) + * @param j IAP ratio + * @returns Corrected N2 (CN2) + */ + table1503: [ + [0, 1.0, 1.20172257, 1.453783983, 2.175007333, 3.364755652, 4.47246108, 5.415178313], + [0.0, 68.2, 69.402657, 70.671269, 73.432244, 76.544349, 78.644882, 78.644882], + [0.1, 76.0, 77.340205, 78.753906, 81.830654, 85.298688, 87.639458, 87.639458], + [0.2, 83.0, 84.463645, 86.007556, 89.367688, 93.155146, 95.711513, 95.711513], + [0.4, 92.8, 94.436461, 96.162664, 99.919535, 104.154188, 107.01239, 107.01239], + [0.6, 98.0, 99.728159, 101.55109, 105.518475, 109.990414, 113.008774, 113.008774], + [0.75, 101.5, 103.289879, 105.177914, 109.286991, 113.918643, 117.044802, 117.044802], + [0.9, 103.0, 104.81633, 106.0, 110.90207, 115.60217, 118.774528, 118.774528], + [1.0, 104.2, 106.037491, 107.97575, 112.194133, 116.948991, 120.158309, 120.158309], + ], + /** + * Table 1504 - Turbine HiMach (0.9) CN2 vs. Throttle @ IAP Ratio 1.00000000, 1.20172257, 1.453783983, 2.175007333, 3.364755652, 4.47246108, 5.415178313 + * mach_hi_corrected_commanded_ne_table + * @param i row index (thrust lever position) + * @param j IAP ratio + * @returns Corrected N2 (CN2) + */ + table1504: [ + [0, 1.0, 1.20172257, 1.453783983, 2.175007333, 3.364755652, 4.47246108, 5.415178313], + [0.0, 63.267593, 64.383271, 65.560133, 68.121427, 71.008456, 72.957073, 72.957073], + [0.1, 70.503476, 71.746753, 73.058212, 75.912441, 79.129658, 81.301137, 81.301137], + [0.2, 76.997217, 78.355007, 79.787258, 82.904376, 86.417916, 88.789399, 88.789399], + [0.4, 86.088455, 87.606562, 89.207922, 92.693086, 96.621477, 99.272967, 99.272967], + [0.6, 90.912377, 92.51555, 94.206642, 97.887095, 102.035612, 104.835676, 104.835676], + [0.75, 94.159247, 95.819677, 97.571165, 101.383063, 105.679741, 108.579808, 108.579808], + [0.9, 95.550763, 97.235732, 98.333795, 102.881334, 107.24151, 110.184435, 110.184435], + [1.0, 104.2, 106.037491, 107.97575, 112.194133, 116.948991, 120.158309, 120.158309], + ], + /** + * Table 1506 - Corrected net Thrust vs CN1 @ Mach 0 to 0.9 in 0.1 steps + * n1_and_mach_on_thrust_table + * @param i row index (CN1) + * @param j mach + * @returns Corrected net thrust (pounds of force) + */ + table1506: [ + [0.0, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9], + [0.0, 0.0, 0.0, 0.0, 0.0, -0.009, -0.001, -0.016, -0.039, -0.041, -0.071], + [20.0, 0.065, 0.008, 0.015, 0.034, -0.018, -0.036, -0.041, -0.128, -0.216, -0.427], + [25.0, 0.061, 0.054, 0.018, 0.036, -0.003, -0.027, -0.033, -0.122, -0.213, -0.44], + [30.0, 0.16, 0.16, 0.02, 0.039, 0.018, -0.01, -0.02, -0.107, -0.195, -0.428], + [35.0, 0.315, 0.151, 0.093, 0.055, 0.045, 0.013, -0.002, -0.083, -0.164, -0.394], + [40.0, 0.396, 0.195, 0.149, 0.083, 0.078, 0.043, 0.022, -0.051, -0.121, -0.342], + [45.0, 0.472, 0.3, 0.188, 0.135, 0.116, 0.08, 0.051, -0.012, -0.069, -0.275], + [50.0, 0.543, 0.373, 0.254, 0.19, 0.159, 0.17, 0.086, 0.033, -0.01, -0.196], + [55.0, 0.611, 0.448, 0.324, 0.231, 0.22, 0.22, 0.15, 0.085, 0.055, -0.107], + [60.0, 0.714, 0.528, 0.402, 0.28, 0.258, 0.25, 0.23, 0.14, 0.124, -0.012], + [65.0, 0.792, 0.615, 0.489, 0.35, 0.32, 0.31, 0.28, 0.23, 0.196, 0.087], + [70.0, 0.88, 0.712, 0.586, 0.4, 0.36, 0.37, 0.33, 0.32, 0.267, 0.185], + [75.0, 0.982, 0.821, 0.695, 0.45, 0.42, 0.41, 0.38, 0.4, 0.35, 0.281], + [80.0, 1.092, 0.941, 0.811, 0.55, 0.47, 0.44, 0.44, 0.47, 0.42, 0.371], + [85.0, 1.23, 1.07, 0.932, 0.65, 0.57, 0.48, 0.52, 0.53, 0.51, 0.55], + [90.0, 1.388, 1.206, 1.049, 0.75, 0.68, 0.55, 0.62, 0.55, 0.52, 0.6], + [95.0, 1.538, 1.34, 1.153, 0.875, 0.75, 0.6, 0.659, 0.67, 0.6, 0.62], + [100.0, 1.63, 1.465, 1.229, 0.95, 0.8, 0.7, 0.7, 0.68, 0.67, 0.64], + [105.0, 1.655, 1.488, 1.258, 1.03, 0.859, 0.8, 0.8, 0.707, 0.73, 0.72], + [110.0, 1.671, 1.503, 1.283, 1.1, 0.935, 0.9, 0.9, 0.763, 0.74, 0.75], + ], }; const fmsSymbolConfig: FMSymbolsConfig = { diff --git a/fbw-a32nx/src/systems/fmgc/src/flightplanning/AircraftConfigTypes.ts b/fbw-a32nx/src/systems/fmgc/src/flightplanning/AircraftConfigTypes.ts index a1106630f264..f609b7e22228 100644 --- a/fbw-a32nx/src/systems/fmgc/src/flightplanning/AircraftConfigTypes.ts +++ b/fbw-a32nx/src/systems/fmgc/src/flightplanning/AircraftConfigTypes.ts @@ -92,6 +92,50 @@ export interface EngineModelParameters { /** Fuel burn relative to A320 / base implementation */ fuelBurnFactor: number; + + /** + * Maximum N1 in CLB thrust + * @param i row index (tat) in steps of 4°C + * @param j col index (pressure altitude, ft) + * @returns Corrected N1 (CN1) + */ + n1ClimbLimit: readonly (readonly number[])[]; + + /** + * Table 1502 - CN2 vs CN1 @ Mach 0, 0.2, 0.9 + * n2_to_n1_table + * @param i row index (n2) + * @param j 1 = Mach 0, 2 = Mach 0.2, 3 = Mach 0.9 + * @returns Corrected N1 (CN1) + */ + table1502: readonly (readonly number[])[]; + + /** + * Table 1503 - Turbine LoMach (0) CN2 vs. Throttle @ IAP Ratio 1.00000000, 1.20172257, 1.453783983, 2.175007333, 3.364755652, 4.47246108, 5.415178313 + * mach_0_corrected_commanded_ne_table + * @param i row index (thrust lever position) + * @param j IAP ratio + * @returns Corrected N2 (CN2) + */ + table1503: readonly (readonly number[])[]; + + /** + * Table 1504 - Turbine HiMach (0.9) CN2 vs. Throttle @ IAP Ratio 1.00000000, 1.20172257, 1.453783983, 2.175007333, 3.364755652, 4.47246108, 5.415178313 + * mach_hi_corrected_commanded_ne_table + * @param i row index (thrust lever position) + * @param j IAP ratio + * @returns Corrected N2 (CN2) + */ + table1504: readonly (readonly number[])[]; + + /** + * Table 1506 - Corrected net Thrust vs CN1 @ Mach 0 to 0.9 in 0.1 steps + * n1_and_mach_on_thrust_table + * @param i row index (CN1) + * @param j mach + * @returns Corrected net thrust (pounds of force) + */ + table1506: readonly (readonly number[])[]; } export interface FlightModelParameters { diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/CostIndex.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/CostIndex.ts index 3b8754f4203b..d0cc3aff629a 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/CostIndex.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/CostIndex.ts @@ -35,7 +35,7 @@ export class CostIndex { const correctedThrust = thrust / delta2 / 2; // Since table 1506 describes corrected thrust as a fraction of max thrust, divide it const correctedN1 = EngineModel.reverseTableInterpolation( - EngineModel.table1506, + config.engineModelParameters.table1506, mach, correctedThrust / config.engineModelParameters.maxThrust, ); diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/EngineModel.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/EngineModel.ts index bd2871670965..2c844a4d032b 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/EngineModel.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/EngineModel.ts @@ -6,138 +6,6 @@ import { EngineModelParameters } from '@fmgc/flightplanning/AircraftConfigTypes' import { Common } from './common'; export class EngineModel { - /** - * Maximum N1 in CLB thrust - * @param i row index (tat) in steps of 4°C - * @param j col index (pressure altitude) - * @returns Corrected N1 (CN1) - */ - static maxClimbThrustTableLeap = [ - [0, 2000, 5000, 8000, 12000, 15000, 17000, 20000, 24000, 27000, 31000, 35000, 39000, 41500], - [-54.0, 71.8, 73.6, 75.5, 76.8, 78.1, 78.9, 80.1, 81.5, 81.6, 83.0, 83.6, 83.7, 83.3], - [-50.0, 72.5, 74.3, 76.2, 77.5, 78.8, 79.6, 80.9, 82.2, 82.4, 83.8, 84.4, 84.5, 84.0], - [-46.0, 73.1, 75.0, 76.9, 78.2, 79.5, 80.3, 81.6, 83.0, 83.1, 84.5, 85.1, 85.3, 84.8], - [-42.0, 73.8, 75.6, 77.6, 78.9, 80.2, 81.0, 82.3, 83.7, 83.8, 85.3, 85.9, 86.0, 85.5], - [-38.0, 74.4, 76.3, 78.2, 79.6, 80.9, 81.7, 83.0, 84.4, 84.6, 86.0, 86.6, 86.7, 86.3], - [-34.0, 75.0, 76.9, 78.9, 80.3, 81.6, 82.4, 83.7, 85.1, 85.3, 86.7, 87.3, 87.5, 87.0], - [-30.0, 75.7, 77.6, 79.6, 80.9, 82.2, 83.1, 84.4, 85.8, 86.0, 87.5, 88.1, 88.2, 87.7], - [-26.0, 76.3, 78.2, 80.2, 81.6, 82.9, 83.8, 85.1, 86.5, 86.7, 88.2, 88.8, 88.9, 88.4], - [-22.0, 76.9, 78.8, 80.9, 82.2, 83.6, 84.4, 85.8, 87.2, 87.4, 88.9, 89.5, 89.6, 89.1], - [-18.0, 77.5, 79.5, 81.5, 82.9, 84.2, 85.1, 86.5, 87.9, 88.1, 89.6, 90.2, 90.0, 89.5], - [-14.0, 78.1, 80.1, 82.1, 83.5, 84.9, 85.8, 87.1, 88.6, 88.8, 90.3, 90.0, 89.2, 88.7], - [-10.0, 78.7, 80.7, 82.8, 84.2, 85.6, 86.4, 87.8, 89.3, 89.5, 91.0, 89.2, 88.4, 87.9], - [-6.0, 79.3, 81.3, 83.4, 84.8, 86.2, 87.1, 88.5, 90.0, 90.1, 91.1, 88.5, 87.7, 87.1], - [-2.0, 79.9, 81.9, 84.0, 85.5, 86.8, 87.7, 89.1, 90.6, 90.8, 90.2, 87.7, 86.9, 86.4], - [2.0, 80.5, 82.5, 84.6, 86.1, 87.5, 88.4, 89.8, 91.3, 90.3, 89.5, 87.0, 86.2, 85.6], - [6.0, 81.1, 83.1, 85.3, 86.7, 88.1, 89.0, 90.4, 90.5, 89.5, 88.8, 86.3, 85.5, 84.9], - [10.0, 81.6, 83.7, 85.9, 87.3, 88.7, 89.7, 90.0, 89.6, 88.7, 88.1, 85.6, 84.8, 84.2], - [14.0, 82.2, 84.3, 86.5, 87.9, 89.4, 89.3, 89.1, 88.7, 87.9, 87.5, 84.8, 83.9, 83.3], - [18.0, 82.8, 84.9, 87.1, 88.5, 88.6, 88.4, 88.3, 87.9, 87.2, 86.8, 86.8, 86.8, 86.8], - [22.0, 83.4, 85.5, 86.9, 88.0, 87.8, 87.7, 87.5, 87.2, 86.5, 86.1, 86.1, 86.1, 86.1], - [26.0, 83.9, 85.7, 86.2, 87.2, 87.1, 87.0, 86.8, 86.5, 85.8, 85.4, 85.4, 85.4, 85.4], - [30.0, 84.5, 84.9, 85.4, 86.5, 86.4, 86.3, 86.1, 85.8, 85.1, 85.1, 85.1, 85.1, 85.1], - [34.0, 83.8, 84.2, 84.7, 85.8, 85.7, 85.6, 85.5, 85.1, 85.1, 85.1, 85.1, 85.1, 85.1], - [38.0, 83.0, 83.4, 83.9, 85.1, 85.0, 84.9, 84.8, 84.8, 84.8, 84.8, 84.8, 84.8, 84.8], - [42.0, 82.2, 82.6, 83.1, 84.4, 84.4, 84.3, 84.3, 84.3, 84.3, 84.3, 84.3, 84.3, 84.3], - [46.0, 81.4, 81.8, 82.4, 83.7, 83.7, 83.7, 83.7, 83.7, 83.7, 83.7, 83.7, 83.7, 83.7], - [50.0, 80.6, 81.1, 81.6, 83.0, 83.0, 83.0, 83.0, 83.0, 83.0, 83.0, 83.0, 83.0, 83.0], - [54.0, 79.9, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4, 80.4], - [58.0, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2, 79.2], - ]; - - /** - * Table 1502 - CN2 vs CN1 @ Mach 0, 0.2, 0.9 - * n2_to_n1_table - * @param i row index (n2) - * @param j 1 = Mach 0, 2 = Mach 0.2, 3 = Mach 0.9 - * @returns Corrected N1 (CN1) - */ - static table1502 = [ - [0, 0, 0.2, 0.9], - [18.2, 0.0, 0.0, 17.0], - [22.0, 1.9, 1.9, 17.4], - [26.0, 2.5, 2.5, 18.2], - [57.0, 12.8, 12.8, 27.0], - [68.2, 19.6, 19.6, 34.827774], - [77.0, 26.0, 26.0, 40.839552], - [83.0, 31.42024, 31.42024, 44.768766], - [89.0, 40.972041, 40.972041, 50.09214], - [92.8, 51.0, 51.0, 55.042], - [97.0, 65.0, 65.0, 65.0], - [100.0, 77.0, 77.0, 77.0], - [104.0, 85.0, 85.0, 85.5], - [116.5, 101.0, 101.0, 101.0], - ]; - - /** - * Table 1503 - Turbine LoMach (0) CN2 vs. Throttle @ IAP Ratio 1.00000000, 1.20172257, 1.453783983, 2.175007333, 3.364755652, 4.47246108, 5.415178313 - * mach_0_corrected_commanded_ne_table - * @param i row index (thrust lever position) - * @param j IAP ratio - * @returns Corrected N2 (CN2) - */ - static table1503 = [ - [0, 1.0, 1.20172257, 1.453783983, 2.175007333, 3.364755652, 4.47246108, 5.415178313], - [0.0, 68.2, 69.402657, 70.671269, 73.432244, 76.544349, 78.644882, 78.644882], - [0.1, 76.0, 77.340205, 78.753906, 81.830654, 85.298688, 87.639458, 87.639458], - [0.2, 83.0, 84.463645, 86.007556, 89.367688, 93.155146, 95.711513, 95.711513], - [0.4, 92.8, 94.436461, 96.162664, 99.919535, 104.154188, 107.01239, 107.01239], - [0.6, 98.0, 99.728159, 101.55109, 105.518475, 109.990414, 113.008774, 113.008774], - [0.75, 101.5, 103.289879, 105.177914, 109.286991, 113.918643, 117.044802, 117.044802], - [0.9, 103.0, 104.81633, 106.0, 110.90207, 115.60217, 118.774528, 118.774528], - [1.0, 104.2, 106.037491, 107.97575, 112.194133, 116.948991, 120.158309, 120.158309], - ]; - - /** - * Table 1504 - Turbine HiMach (0.9) CN2 vs. Throttle @ IAP Ratio 1.00000000, 1.20172257, 1.453783983, 2.175007333, 3.364755652, 4.47246108, 5.415178313 - * mach_hi_corrected_commanded_ne_table - * @param i row index (thrust lever position) - * @param j IAP ratio - * @returns Corrected N2 (CN2) - */ - static table1504 = [ - [0, 1.0, 1.20172257, 1.453783983, 2.175007333, 3.364755652, 4.47246108, 5.415178313], - [0.0, 63.267593, 64.383271, 65.560133, 68.121427, 71.008456, 72.957073, 72.957073], - [0.1, 70.503476, 71.746753, 73.058212, 75.912441, 79.129658, 81.301137, 81.301137], - [0.2, 76.997217, 78.355007, 79.787258, 82.904376, 86.417916, 88.789399, 88.789399], - [0.4, 86.088455, 87.606562, 89.207922, 92.693086, 96.621477, 99.272967, 99.272967], - [0.6, 90.912377, 92.51555, 94.206642, 97.887095, 102.035612, 104.835676, 104.835676], - [0.75, 94.159247, 95.819677, 97.571165, 101.383063, 105.679741, 108.579808, 108.579808], - [0.9, 95.550763, 97.235732, 98.333795, 102.881334, 107.24151, 110.184435, 110.184435], - [1.0, 104.2, 106.037491, 107.97575, 112.194133, 116.948991, 120.158309, 120.158309], - ]; - - /** - * Table 1506 - Corrected net Thrust vs CN1 @ Mach 0 to 0.9 in 0.1 steps - * n1_and_mach_on_thrust_table - * @param i row index (CN1) - * @param j mach - * @returns Corrected net thrust (pounds of force) - */ - static table1506 = [ - [0, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9], - [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], - [20.0, 0.091741, 0.05702, 0.052029, 0.028096, -0.017284, -0.037284, -0.057077, -0.205841, -0.315399, -0.488717], - [25.0, 0.14281, 0.072215, 0.053026, 0.030404, -0.009593, -0.026571, -0.041999, -0.151328, -0.266204, -0.439028], - [30.0, 0.189837, 0.082322, 0.05505, 0.032748, 0.017389, 0.00399, -0.026921, -0.056814, -0.081946, -0.369391], - [35.0, 0.262207, 0.126047, 0.077206, 0.045921, 0.024719, 0.006062, -0.002812, -0.0228, -0.044248, -0.293631], - [40.0, 0.33023, 0.162757, 0.124088, 0.069579, 0.057905, 0.049621, 0.02979, -0.002139, -0.025811, -0.22063], - [45.0, 0.393293, 0.250096, 0.156707, 0.112419, 0.091418, 0.076757, 0.05609, 0.018509, -0.007375, -0.15512], - [50.0, 0.452337, 0.311066, 0.211353, 0.158174, 0.127429, 0.104915, 0.081171, 0.047419, 0.011062, -0.098474], - [55.0, 0.509468, 0.373568, 0.269961, 0.209106, 0.16865, 0.137223, 0.108383, 0.07566, 0.028704, -0.049469], - [60.0, 0.594614, 0.439955, 0.334629, 0.267477, 0.217773, 0.176899, 0.141404, 0.107148, 0.064556, -0.005036], - [65.0, 0.660035, 0.512604, 0.407151, 0.335055, 0.276928, 0.226669, 0.183627, 0.14585, 0.104441, 0.039012], - [70.0, 0.733601, 0.593506, 0.488571, 0.412623, 0.347163, 0.28821, 0.237559, 0.195142, 0.152485, 0.087269], - [75.0, 0.818693, 0.68388, 0.578756, 0.499514, 0.427939, 0.361604, 0.304241, 0.257197, 0.212005, 0.144042], - [80.0, 0.910344, 0.783795, 0.675982, 0.593166, 0.516644, 0.444822, 0.382689, 0.332384, 0.284867, 0.212679], - [85.0, 1.025165, 0.891823, 0.776548, 0.688692, 0.608128, 0.53321, 0.469351, 0.41869, 0.37087, 0.294907], - [90.0, 1.157049, 1.004695, 0.8744, 0.778466, 0.694251, 0.619011, 0.557581, 0.511153, 0.467149, 0.390203], - [95.0, 1.281333, 1.116993, 0.960774, 0.851733, 0.763455, 0.69089, 0.637136, 0.601322, 0.567588, 0.495167], - [100.0, 1.357935, 1.220844, 1.023864, 0.894234, 0.800352, 0.733488, 0.693684, 0.654691, 0.617963, 0.539115], - [105.0, 1.378826, 1.239626, 1.048498, 0.91575, 0.819609, 0.751137, 0.710375, 0.670444, 0.632832, 0.552086], - [110.0, 1.392754, 1.252148, 1.069322, 0.933937, 0.835886, 0.766054, 0.724483, 0.683759, 0.6454, 0.563051], - ]; - /** * Placeholder * @param table @@ -145,7 +13,7 @@ export class EngineModel { * @param j * @returns */ - static tableInterpolation(table: number[][], i: number, j: number): number { + static tableInterpolation(table: readonly (readonly number[])[], i: number, j: number): number { const numRows = table.length; const numCols = table[0].length; // Iterate through rows to find the upper bound to i @@ -187,7 +55,7 @@ export class EngineModel { * @param j Value on column axis * @param result Value normally returned as result */ - static reverseTableInterpolation(table: number[][], j: number, result: number): number { + static reverseTableInterpolation(table: readonly (readonly number[])[], j: number, result: number): number { const numRows = table.length; const numCols = table[0].length; @@ -290,20 +158,24 @@ export class EngineModel { return uncorrectedThrust / delta2; } - static getIdleN1(altitude: Feet, mach: Mach, tropoAltitude: Feet): number { + static getIdleN1(parameters: EngineModelParameters, altitude: Feet, mach: Mach, tropoAltitude: Feet): number { const delta = Common.getDelta(altitude, altitude > tropoAltitude); const iap = 1 / delta; const theta = Common.getTheta(altitude, 0, altitude > tropoAltitude); const theta2 = Common.getTheta2(theta, mach); - const lowMachCn2 = EngineModel.tableInterpolation(EngineModel.table1503, 0, iap); - const highMachCn2 = EngineModel.tableInterpolation(EngineModel.table1504, 0, iap); + const lowMachCn2 = EngineModel.tableInterpolation(parameters.table1503, 0, iap); + const highMachCn2 = EngineModel.tableInterpolation(parameters.table1504, 0, iap); const cn2 = Common.interpolate(mach, 0, 0.9, lowMachCn2, highMachCn2); - const cn1 = EngineModel.tableInterpolation(EngineModel.table1502, cn2, mach); + const cn1 = EngineModel.tableInterpolation(parameters.table1502, cn2, mach); const n1 = cn1 * Math.sqrt(theta2); return n1; } + + static getClimbThrustN1(parameters: EngineModelParameters, altitude: Feet, totalAirTemperature: number) { + return EngineModel.tableInterpolation(parameters.n1ClimbLimit, totalAirTemperature, altitude); + } } diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/Predictions.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/Predictions.ts index 24f1f80df242..aa8d7adf059b 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/Predictions.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/Predictions.ts @@ -89,7 +89,7 @@ export class Predictions { const delta2 = Common.getDelta2(delta, mach); const correctedN1 = EngineModel.getCorrectedN1(commandedN1, theta2); const correctedThrust = - EngineModel.tableInterpolation(EngineModel.table1506, correctedN1, mach) * + EngineModel.tableInterpolation(config.engineModelParameters.table1506, correctedN1, mach) * config.engineModelParameters.numberOfEngines * config.engineModelParameters.maxThrust; const correctedFuelFlow = @@ -225,7 +225,7 @@ export class Predictions { const delta2 = Common.getDelta2(delta, mach); const correctedN1 = EngineModel.getCorrectedN1(commandedN1, theta2); const correctedThrust = - EngineModel.tableInterpolation(EngineModel.table1506, correctedN1, mach) * + EngineModel.tableInterpolation(config.engineModelParameters.table1506, correctedN1, mach) * config.engineModelParameters.numberOfEngines * config.engineModelParameters.maxThrust; const correctedFuelFlow = @@ -343,7 +343,7 @@ export class Predictions { const correctedThrust = thrust / delta2 / 2; // Since table 1506 describes corrected thrust as a fraction of max thrust, divide it const correctedN1 = EngineModel.reverseTableInterpolation( - EngineModel.table1506, + config.engineModelParameters.table1506, mach, correctedThrust / config.engineModelParameters.maxThrust, ); @@ -441,7 +441,7 @@ export class Predictions { const delta2 = Common.getDelta2(delta, averageMach); const correctedN1 = EngineModel.getCorrectedN1(commandedN1, theta2); const correctedThrust = - EngineModel.tableInterpolation(EngineModel.table1506, correctedN1, averageMach) * + EngineModel.tableInterpolation(config.engineModelParameters.table1506, correctedN1, averageMach) * config.engineModelParameters.numberOfEngines * config.engineModelParameters.maxThrust; const correctedFuelFlow = @@ -627,7 +627,7 @@ export class Predictions { const correctedThrust = thrust / delta2 / config.engineModelParameters.numberOfEngines; // Since table 1506 describes corrected thrust as a fraction of max thrust, divide it const correctedN1 = EngineModel.reverseTableInterpolation( - EngineModel.table1506, + config.engineModelParameters.table1506, mach, correctedThrust / config.engineModelParameters.maxThrust, ); @@ -743,7 +743,7 @@ export class Predictions { const correctedThrust = thrust / delta2 / config.engineModelParameters.numberOfEngines; // Since table 1506 describes corrected thrust as a fraction of max thrust, divide it predictedN1 = EngineModel.reverseTableInterpolation( - EngineModel.table1506, + config.engineModelParameters.table1506, mach, correctedThrust / config.engineModelParameters.maxThrust, ); @@ -860,7 +860,7 @@ export class Predictions { const correctedThrust = thrust / delta2 / config.engineModelParameters.numberOfEngines; // Since table 1506 describes corrected thrust as a fraction of max thrust, divide it predictedN1 = EngineModel.reverseTableInterpolation( - EngineModel.table1506, + config.engineModelParameters.table1506, mach, correctedThrust / config.engineModelParameters.maxThrust, ); @@ -974,7 +974,7 @@ export class Predictions { const delta2 = Common.getDelta2(delta, midwayMach); const correctedN1 = EngineModel.getCorrectedN1(commandedN1, theta2); const correctedThrust = - EngineModel.tableInterpolation(EngineModel.table1506, correctedN1, midwayMach) * + EngineModel.tableInterpolation(config.engineModelParameters.table1506, correctedN1, midwayMach) * config.engineModelParameters.numberOfEngines * config.engineModelParameters.maxThrust; const correctedFuelFlow = @@ -1111,7 +1111,7 @@ export class Predictions { const delta2 = Common.getDelta2(delta, midwayMach); const correctedN1 = EngineModel.getCorrectedN1(commandedN1, theta2); const correctedThrust = - EngineModel.tableInterpolation(EngineModel.table1506, correctedN1, midwayMach) * + EngineModel.tableInterpolation(config.engineModelParameters.table1506, correctedN1, midwayMach) * config.engineModelParameters.numberOfEngines * config.engineModelParameters.maxThrust; const correctedFuelFlow = diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/climb/ClimbPathBuilder.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/climb/ClimbPathBuilder.ts index fdef06dc1d46..451f37ceff70 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/climb/ClimbPathBuilder.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/climb/ClimbPathBuilder.ts @@ -457,6 +457,13 @@ export class ClimbPathBuilder { ): StepResults { const { zeroFuelWeight, managedClimbSpeedMach, tropoPause } = this.computationParametersObserver.get(); + const averageCas = (initialSpeed + speedTarget) / 2; + const averageClimbSpeedMach = Math.min( + managedClimbSpeedMach, + this.atmosphericConditions.computeMachFromCas(altitude, averageCas), + ); + const totalAirTemperature = this.atmosphericConditions.totalAirTemperatureFromMach(altitude, averageClimbSpeedMach); + return Predictions.speedChangeStep( config, 0, @@ -465,12 +472,7 @@ export class ClimbPathBuilder { speedTarget, managedClimbSpeedMach, managedClimbSpeedMach, - getClimbThrustN1Limit( - this.atmosphericConditions, - altitude, - (initialSpeed + speedTarget) / 2, - managedClimbSpeedMach, - ), // TOD0 + EngineModel.getClimbThrustN1(config.engineModelParameters, altitude, totalAirTemperature), // TOD0 zeroFuelWeight, fuelWeight, 0, @@ -542,16 +544,3 @@ export class ClimbPathBuilder { step.speed = (1 - scaling) * lastCheckpoint.speed + scaling * step.speed; } } - -// TODO: Deduplicate this from here and ClimbStrategy.ts -function getClimbThrustN1Limit( - atmosphericConditions: AtmosphericConditions, - altitude: Feet, - speed: Knots, - maxMach: Mach, -) { - const climbSpeedMach = Math.min(maxMach, atmosphericConditions.computeMachFromCas(altitude, speed)); - const estimatedTat = atmosphericConditions.totalAirTemperatureFromMach(altitude, climbSpeedMach); - - return EngineModel.tableInterpolation(EngineModel.maxClimbThrustTableLeap, estimatedTat, altitude); -} diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/climb/ClimbStrategy.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/climb/ClimbStrategy.ts index 9a0252d0cbb7..086f638f5c9d 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/climb/ClimbStrategy.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/climb/ClimbStrategy.ts @@ -8,7 +8,7 @@ import { WindComponent } from '@fmgc/guidance/vnav/wind'; import { AircraftConfiguration as AircraftCtlSurfcConfiguration } from '@fmgc/guidance/vnav/descent/ApproachPathBuilder'; import { MathUtils } from '@flybywiresim/fbw-sdk'; import { UnitType } from '@microsoft/msfs-sdk'; -import { AircraftConfig } from '@fmgc/flightplanning/AircraftConfigTypes'; +import { AircraftConfig, EngineModelParameters } from '@fmgc/flightplanning/AircraftConfigTypes'; import { EngineModel } from '../EngineModel'; import { Predictions, StepResults } from '../Predictions'; import { AtmosphericConditions } from '../AtmosphericConditions'; @@ -138,8 +138,15 @@ export class VerticalSpeedStrategy implements ClimbStrategy, DescentStrategy { const n1 = this.verticalSpeed > 0 - ? getClimbThrustN1Limit(this.atmosphericConditions, initialAltitude, initialSpeed, managedClimbSpeedMach) - : EngineModel.getIdleN1(initialAltitude, computedMach, tropoPause) + this.acConfig.vnavConfig.IDLE_N1_MARGIN; + ? getClimbThrustN1Limit( + this.acConfig.engineModelParameters, + this.atmosphericConditions, + initialAltitude, + initialSpeed, + managedClimbSpeedMach, + ) + : EngineModel.getIdleN1(this.acConfig.engineModelParameters, initialAltitude, computedMach, tropoPause) + + this.acConfig.vnavConfig.IDLE_N1_MARGIN; return Predictions.verticalSpeedStepWithSpeedChange( this.acConfig, @@ -255,8 +262,15 @@ export class FlightPathAngleStrategy implements ClimbStrategy, DescentStrategy { const computedMach = Math.min(this.atmosphericConditions.computeMachFromCas(initialAltitude, initialSpeed), mach); const predictedN1 = this.flightPathAngle > 0 - ? getClimbThrustN1Limit(this.atmosphericConditions, initialAltitude, initialSpeed, managedClimbSpeedMach) - : EngineModel.getIdleN1(initialAltitude, computedMach, tropoPause) + this.acConfig.vnavConfig.IDLE_N1_MARGIN; + ? getClimbThrustN1Limit( + this.acConfig.engineModelParameters, + this.atmosphericConditions, + initialAltitude, + initialSpeed, + managedClimbSpeedMach, + ) + : EngineModel.getIdleN1(this.acConfig.engineModelParameters, initialAltitude, computedMach, tropoPause) + + this.acConfig.vnavConfig.IDLE_N1_MARGIN; return Predictions.speedChangeStep( this.acConfig, @@ -306,6 +320,7 @@ export class ClimbThrustClimbStrategy implements ClimbStrategy { speed, mach, getClimbThrustN1Limit( + this.acConfig.engineModelParameters, this.atmosphericConditions, (initialAltitude + finalAltitude) / 2, speed, @@ -340,7 +355,13 @@ export class ClimbThrustClimbStrategy implements ClimbStrategy { distance, speed, mach, - getClimbThrustN1Limit(this.atmosphericConditions, initialAltitude, speed, managedClimbSpeedMach), + getClimbThrustN1Limit( + this.acConfig.engineModelParameters, + this.atmosphericConditions, + initialAltitude, + speed, + managedClimbSpeedMach, + ), zeroFuelWeight, fuelOnBoard, headwindComponent.value, @@ -370,7 +391,13 @@ export class ClimbThrustClimbStrategy implements ClimbStrategy { initialSpeed, finalSpeed, mach, - getClimbThrustN1Limit(this.atmosphericConditions, initialAltitude, initialSpeed, managedClimbSpeedMach), + getClimbThrustN1Limit( + this.acConfig.engineModelParameters, + this.atmosphericConditions, + initialAltitude, + initialSpeed, + managedClimbSpeedMach, + ), zeroFuelWeight, fuelOnBoard, headwindComponent.value, @@ -385,6 +412,7 @@ export class ClimbThrustClimbStrategy implements ClimbStrategy { } function getClimbThrustN1Limit( + engineModelParameters: EngineModelParameters, atmosphericConditions: AtmosphericConditions, altitude: Feet, speed: Knots, @@ -393,5 +421,5 @@ function getClimbThrustN1Limit( const climbSpeedMach = Math.min(maxMach, atmosphericConditions.computeMachFromCas(altitude, speed)); const estimatedTat = atmosphericConditions.totalAirTemperatureFromMach(altitude, climbSpeedMach); - return EngineModel.tableInterpolation(EngineModel.maxClimbThrustTableLeap, estimatedTat, altitude); + return EngineModel.getClimbThrustN1(engineModelParameters, altitude, estimatedTat); } diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/cruise/CruisePathBuilder.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/cruise/CruisePathBuilder.ts index 628389d20ee6..d26f05dc28e6 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/cruise/CruisePathBuilder.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/cruise/CruisePathBuilder.ts @@ -262,6 +262,16 @@ export class CruisePathBuilder { const { zeroFuelWeight, cruiseAltitude, managedCruiseSpeedMach, tropoPause } = this.computationParametersObserver.get(); + const averageCas = (speed + finalSpeed) / 2; + const averageClimbSpeedMach = Math.min( + managedCruiseSpeedMach, + this.atmosphericConditions.computeMachFromCas(cruiseAltitude, averageCas), + ); + const totalAirTemperature = this.atmosphericConditions.totalAirTemperatureFromMach( + cruiseAltitude, + averageClimbSpeedMach, + ); + return Predictions.speedChangeStep( config, 0, @@ -270,7 +280,7 @@ export class CruisePathBuilder { finalSpeed, managedCruiseSpeedMach, managedCruiseSpeedMach, - this.getClimbThrustN1Limit(this.atmosphericConditions, cruiseAltitude, speed), + EngineModel.getClimbThrustN1(config.engineModelParameters, cruiseAltitude, totalAirTemperature), zeroFuelWeight, remainingFuelOnBoard, headwind.value, @@ -293,14 +303,6 @@ export class CruisePathBuilder { return altitude; } - private getClimbThrustN1Limit(atmosphericConditions: AtmosphericConditions, altitude: Feet, speed: Knots) { - // This Mach number is the Mach number for the predicted climb speed, not the Mach to use after crossover altitude. - const climbSpeedMach = atmosphericConditions.computeMachFromCas(altitude, speed); - const estimatedTat = atmosphericConditions.totalAirTemperatureFromMach(altitude, climbSpeedMach); - - return EngineModel.tableInterpolation(EngineModel.maxClimbThrustTableLeap, estimatedTat, altitude); - } - private ignoreCruiseStep(profile: NavGeometryProfile, step: GeographicCruiseStep) { step.isIgnored = true; profile.ignoreCruiseStep(step.waypointIndex); diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/takeoff/TakeoffPathBuilder.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/takeoff/TakeoffPathBuilder.ts index 08ff2875b4b2..2fb4a1b78ffe 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/takeoff/TakeoffPathBuilder.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/takeoff/TakeoffPathBuilder.ts @@ -94,11 +94,8 @@ export class TakeoffPathBuilder { const v2PlusTenMach = this.atmosphericConditions.computeMachFromCas(midwayAltitude, speed); const estimatedTat = this.atmosphericConditions.totalAirTemperatureFromMach(midwayAltitude, v2PlusTenMach); - const predictedN1 = EngineModel.tableInterpolation( - EngineModel.maxClimbThrustTableLeap, - estimatedTat, - midwayAltitude, - ); + + const predictedN1 = EngineModel.getClimbThrustN1(config.engineModelParameters, midwayAltitude, estimatedTat); const { fuelBurned, distanceTraveled, timeElapsed } = Predictions.altitudeStep( config,