diff --git a/hdw-a333x/src/wasm/fadec_a330/src/RegPolynomials.h b/hdw-a333x/src/wasm/fadec_a330/src/RegPolynomials.h index 64fc4cff2..107bba5a1 100644 --- a/hdw-a333x/src/wasm/fadec_a330/src/RegPolynomials.h +++ b/hdw-a333x/src/wasm/fadec_a330/src/RegPolynomials.h @@ -187,15 +187,16 @@ class Polynomial { /// double correctedEGT(double cn1, double cff, double mach, double alt) { double outCEGT = 0; - cff = cff / 2; // to account for the A380 double fuel flow. Will have to be taken care of + double cff_a330 = 2.7; - double c_EGT[16] = {3.2636e+02, 0.0000e+00, 9.2893e-01, 3.9505e-02, 3.9070e+02, -4.7911e-04, 7.7679e-03, 5.8361e-05, - -2.5566e+00, 5.1227e-06, 1.0178e-07, -7.4602e-03, 1.2106e-07, -5.1639e+01, -2.7356e-03, 1.9312e-08}; + double c_EGT[16] = {443.3145034, 0.0000000e+00, 3.0141710e+00, 3.9132758e-02, -4.8488279e+02, -1.2890964e-03, + -2.2332050e-02, 8.3849683e-05, 6.0478647e+00, 6.9171710e-05, -6.5369271e-07, -8.1438322e-03, + -5.1229403e-07, 7.4657497e+01, -4.6016728e-03, 2.8637860e-08}; - outCEGT = c_EGT[0] + c_EGT[1] + (c_EGT[2] * cn1) + (c_EGT[3] * cff) + (c_EGT[4] * mach) + (c_EGT[5] * alt) + - (c_EGT[6] * powFBW(cn1, 2)) + (c_EGT[7] * cn1 * cff) + (c_EGT[8] * cn1 * mach) + (c_EGT[9] * cn1 * alt) + - (c_EGT[10] * powFBW(cff, 2)) + (c_EGT[11] * mach * cff) + (c_EGT[12] * cff * alt) + (c_EGT[13] * powFBW(mach, 2)) + - (c_EGT[14] * mach * alt) + (c_EGT[15] * powFBW(alt, 2)); + outCEGT = c_EGT[0] + c_EGT[1] + (c_EGT[2] * cn1) + (c_EGT[3] * cff_a330) + (c_EGT[4] * mach) + (c_EGT[5] * alt) + + (c_EGT[6] * powFBW(cn1, 2)) + (c_EGT[7] * cn1 * cff_a330) + (c_EGT[8] * cn1 * mach) + (c_EGT[9] * cn1 * alt) + + (c_EGT[10] * powFBW(cff_a330, 2)) + (c_EGT[11] * mach * cff_a330) + (c_EGT[12] * cff_a330 * alt) + + (c_EGT[13] * powFBW(mach, 2)) + (c_EGT[14] * mach * alt) + (c_EGT[15] * powFBW(alt, 2)); return outCEGT; } @@ -205,10 +206,11 @@ class Polynomial { /// double correctedFuelFlow(double cn1, double mach, double alt) { double outCFF = 0; + double a330_f = 2.7; - double c_Flow[21] = {-1.7630e+02, -2.1542e-01, 4.7119e+01, 6.1519e+02, 1.8047e-03, -4.4554e-01, -4.3940e+01, - 4.0459e-05, -3.2912e+01, -6.2894e-03, -1.2544e-07, 1.0938e-02, 4.0936e-01, -5.5841e-06, - -2.3829e+01, 9.3269e-04, 2.0273e-11, -2.4100e+02, 1.4171e-02, -9.5581e-07, 1.2728e-11}; + double c_Flow[21] = {-639.6602981, 0.00000e+00, 1.03705e+02, -2.23264e+03, 5.70316e-03, -2.29404e+00, 1.08230e+02, + 2.77667e-04, -6.17180e+02, -7.20713e-02, 2.19013e-07, 2.49418e-02, -7.31662e-01, -1.00003e-05, + -3.79466e+01, 1.34552e-03, 5.72612e-09, -2.71950e+02, 8.58469e-02, -2.72912e-06, 2.02928e-11}; outCFF = c_Flow[0] + c_Flow[1] + (c_Flow[2] * cn1) + (c_Flow[3] * mach) + (c_Flow[4] * alt) + (c_Flow[5] * powFBW(cn1, 2)) + (c_Flow[6] * cn1 * mach) + (c_Flow[7] * cn1 * alt) + (c_Flow[8] * powFBW(mach, 2)) + (c_Flow[9] * mach * alt) + @@ -217,7 +219,7 @@ class Polynomial { (c_Flow[16] * cn1 * powFBW(alt, 2)) + (c_Flow[17] * powFBW(mach, 3)) + (c_Flow[18] * powFBW(mach, 2) * alt) + (c_Flow[19] * mach * powFBW(alt, 2)) + (c_Flow[20] * powFBW(alt, 3)); - return 2 * outCFF; + return outCFF * a330_f; } double oilTemperature(double energy, double preOilTemp, double maxOilTemp, double deltaTime) { diff --git a/hdw-a339x/src/systems/fmgc/src/guidance/vnav/EngineModel.ts b/hdw-a339x/src/systems/fmgc/src/guidance/vnav/EngineModel.ts index 1f79bda78..554461198 100644 --- a/hdw-a339x/src/systems/fmgc/src/guidance/vnav/EngineModel.ts +++ b/hdw-a339x/src/systems/fmgc/src/guidance/vnav/EngineModel.ts @@ -238,7 +238,7 @@ export class EngineModel { + (coefficients[17] * mach ** 3) + (coefficients[18] * mach ** 2 * alt) + (coefficients[19] * mach * alt ** 2) + (coefficients[20] * alt ** 3); - return flow * 2.7; + return flow * 2.4; } // static getCN1fromUncorrectedThrust(thrust: number) diff --git a/hdw-a339x/src/systems/fmgc/src/guidance/vnav/FlightModel.ts b/hdw-a339x/src/systems/fmgc/src/guidance/vnav/FlightModel.ts index d720606ed..0e5aa5f52 100644 --- a/hdw-a339x/src/systems/fmgc/src/guidance/vnav/FlightModel.ts +++ b/hdw-a339x/src/systems/fmgc/src/guidance/vnav/FlightModel.ts @@ -2,11 +2,11 @@ import { MathUtils } from '@flybywiresim/fbw-sdk'; import { Common, FlapConf } from './common'; export class FlightModel { - static Cd0 = 0.0200; + static Cd0 = 0.0280; static wingSpan = 209.97; - static wingArea = 5010; + static wingArea = 3892.23; static wingEffcyFactor = 0.72; diff --git a/hdw-a339x/src/wasm/fadec_a330/src/RegPolynomials.h b/hdw-a339x/src/wasm/fadec_a330/src/RegPolynomials.h index 107bba5a1..37588a587 100644 --- a/hdw-a339x/src/wasm/fadec_a330/src/RegPolynomials.h +++ b/hdw-a339x/src/wasm/fadec_a330/src/RegPolynomials.h @@ -187,7 +187,7 @@ class Polynomial { /// double correctedEGT(double cn1, double cff, double mach, double alt) { double outCEGT = 0; - double cff_a330 = 2.7; + double cff_a330 = 2.4; double c_EGT[16] = {443.3145034, 0.0000000e+00, 3.0141710e+00, 3.9132758e-02, -4.8488279e+02, -1.2890964e-03, -2.2332050e-02, 8.3849683e-05, 6.0478647e+00, 6.9171710e-05, -6.5369271e-07, -8.1438322e-03, @@ -206,7 +206,7 @@ class Polynomial { /// double correctedFuelFlow(double cn1, double mach, double alt) { double outCFF = 0; - double a330_f = 2.7; + double a330_f = 2.4; double c_Flow[21] = {-639.6602981, 0.00000e+00, 1.03705e+02, -2.23264e+03, 5.70316e-03, -2.29404e+00, 1.08230e+02, 2.77667e-04, -6.17180e+02, -7.20713e-02, 2.19013e-07, 2.49418e-02, -7.31662e-01, -1.00003e-05,