Skip to content

Commit

Permalink
Review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
frankkopp committed Apr 11, 2024
1 parent cffba49 commit f9123ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ class FadecSimData_A380X {
oilPsiDataPtr[E3] = dm->make_datadefinition_var<OilPsiData>("GENERAL ENG OIL PRESSURE 3", oilPsiE3DataDef, NO_AUTO_UPDATE);
oilPsiDataPtr[E4] = dm->make_datadefinition_var<OilPsiData>("GENERAL ENG OIL PRESSURE 4", oilPsiE4DataDef, NO_AUTO_UPDATE);

// TURB ENG CN2 is used as a proxy for N3 as the sim does not have a direct N3 value
engineCorrectedN3DataPtr[E1] = dm->make_datadefinition_var<CorrectedN3Data>("TURB ENG CN2 1", engine1CN3DataDef, NO_AUTO_UPDATE);
engineCorrectedN3DataPtr[E2] = dm->make_datadefinition_var<CorrectedN3Data>("TURB ENG CN2 2", engine2CN3DataDef, NO_AUTO_UPDATE);
engineCorrectedN3DataPtr[E3] = dm->make_datadefinition_var<CorrectedN3Data>("TURB ENG CN2 3", engine3CN3DataDef, NO_AUTO_UPDATE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ class Polynomial_A380X {
* @return The calculated N3 value in percent.
*/
static double startN3(double currentSimN3, double previousN3, double idleN3) {
// Normalize the current N3 percentage by scaling it with the idle N2
// Normalize the current N3 percentage by scaling it with the idle N3
// percentage and a constant factor.
// The constant factor 60.0 is likely derived from empirical data or a mathematical model of the
// engine's behavior.
double normalizedN3 = currentSimN3 * 60.0 / idleN3;

// Coefficients for the polynomial used to calculate the N2 percentage.
// Coefficients for the polynomial used to calculate the N3 percentage.
constexpr double coefficients[16] = {
4.03649879e+00, // coefficient for x^0
-9.41981960e-01, // coefficient for x^1
Expand Down Expand Up @@ -434,7 +434,7 @@ class Polynomial_A380X {
}

/**
* @brief Calculates the Oil Pressure (PSI) based on simulated N2 value.
* @brief Calculates the Oil Pressure (PSI) based on simulated N3 value.
* Real-life modeled polynomials - Oil Pressure (PSI)
*
* @param simN3 The simulated N3 value in percent.
Expand Down

0 comments on commit f9123ab

Please sign in to comment.