Skip to content

Commit

Permalink
Merge branch 'master' into A380X-Flight-Model-Update-2020_2024
Browse files Browse the repository at this point in the history
  • Loading branch information
Saschl authored Feb 6, 2025
2 parents 790f210 + 9cfc51f commit be03d71
Show file tree
Hide file tree
Showing 58 changed files with 5,623 additions and 2,815 deletions.
2 changes: 2 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@
1. [A380X/FMS] Add STEP ALTs tab on VERT REV page & auto step climb functionality - @flogross89 (floridude)
1. [A380X/FMS] Add selection of CLB/DES constraint if constraint type is unknown - @flogross89 (floridude)
1. [FMS] Fix approach ident only showing on ND when approach is being flown - @BravoMike99 (bruno_pt99)
1. [A380X/FWS] Add support for deferred procedures, abnormal (non-)sensed procedures - @flogross89 (floridude)
1. [A380X/FWS] Enable FWS failures (FWS 1/2, FWS 1+2, ECP, Audio Function) - @flogross89 (floridude)
1. [A380X/Flight Model] Flight model update incl stall & auto-rotate fix for FS2020 & 2024 - @donstim (donbikes)

## 0.12.0
Expand Down
5 changes: 3 additions & 2 deletions fbw-a32nx/src/wasm/fbw_a320/src/FlyByWireInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1780,14 +1780,15 @@ bool FlyByWireInterface::updateFmgc(double sampleTime, int fmgcIndex) {

fmgcs[fmgcIndex].modelInputs.in.fms_inputs.fm_valid = true;
fmgcs[fmgcIndex].modelInputs.in.fms_inputs.fms_flight_phase = static_cast<fmgc_flight_phase>(idFmgcFlightPhase->get());
fmgcs[fmgcIndex].modelInputs.in.fms_inputs.selected_approach_type = fmgc_approach_type::None;
fmgcs[fmgcIndex].modelInputs.in.fms_inputs.selected_approach_type =
idFmRnavAppSelected->get() ? fmgc_approach_type::RNAV : fmgc_approach_type::ILS;
fmgcs[fmgcIndex].modelInputs.in.fms_inputs.backbeam_selected = idFm1BackbeamSelected->get();
fmgcs[fmgcIndex].modelInputs.in.fms_inputs.fms_loc_distance = (simData.nav_dme_valid != 0) ? simData.nav_dme_nmi : 0;
fmgcs[fmgcIndex].modelInputs.in.fms_inputs.fms_unrealistic_gs_angle_deg = (simData.nav_gs_valid != 0) ? -simData.nav_gs_deg : 0;
fmgcs[fmgcIndex].modelInputs.in.fms_inputs.fms_weight_lbs = simData.total_weight_kg * 2.205;
fmgcs[fmgcIndex].modelInputs.in.fms_inputs.fms_cg_percent = simData.CG_percent_MAC;
fmgcs[fmgcIndex].modelInputs.in.fms_inputs.lateral_flight_plan_valid = idFlightGuidanceAvailable->get();
fmgcs[fmgcIndex].modelInputs.in.fms_inputs.nav_capture_condition = idFlightGuidanceCrossTrackError->get() < 1;
fmgcs[fmgcIndex].modelInputs.in.fms_inputs.nav_capture_condition = std::abs(idFlightGuidanceCrossTrackError->get()) < 1;
fmgcs[fmgcIndex].modelInputs.in.fms_inputs.phi_c_deg = idFlightGuidancePhiCommand->get();
fmgcs[fmgcIndex].modelInputs.in.fms_inputs.xtk_nmi = idFlightGuidanceCrossTrackError->get();
fmgcs[fmgcIndex].modelInputs.in.fms_inputs.tke_deg = idFlightGuidanceTrackAngleError->get();
Expand Down
2,607 changes: 1,339 additions & 1,268 deletions fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.cpp

Large diffs are not rendered by default.

70 changes: 37 additions & 33 deletions fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ class FmgcComputer final
rtDW_MATLABFunction_FmgcComputer_f_T sf_MATLABFunction_ppu;
rtDW_MATLABFunction_FmgcComputer_k_T sf_MATLABFunction_k4v;
rtDW_MATLABFunction_FmgcComputer_k_T sf_MATLABFunction_k0;
rtDW_MATLABFunction_FmgcComputer_c_T sf_MATLABFunction_p2o;
rtDW_MATLABFunction_FmgcComputer_c_T sf_MATLABFunction_jc;
rtDW_MATLABFunction_FmgcComputer_c_T sf_MATLABFunction_bbb;
rtDW_MATLABFunction_FmgcComputer_c_T sf_MATLABFunction_fed;
Expand All @@ -187,7 +188,7 @@ class FmgcComputer final
rtDW_MATLABFunction_FmgcComputer_c_T sf_MATLABFunction_f0h;
rtDW_MATLABFunction_FmgcComputer_k_T sf_MATLABFunction_go;
rtDW_MATLABFunction_FmgcComputer_k_T sf_MATLABFunction_moh;
rtDW_MATLABFunction_FmgcComputer_k_T sf_MATLABFunction_db;
rtDW_MATLABFunction_FmgcComputer_k_T sf_MATLABFunction_dba;
rtDW_MATLABFunction_FmgcComputer_k_T sf_MATLABFunction_muf;
rtDW_LagFilter_FmgcComputer_T sf_LagFilter_k;
rtDW_MATLABFunction_FmgcComputer_k_T sf_MATLABFunction_bs;
Expand Down Expand Up @@ -246,7 +247,7 @@ class FmgcComputer final
rtDW_MATLABFunction_FmgcComputer_k_T sf_MATLABFunction_mtz;
rtDW_MATLABFunction_FmgcComputer_f_T sf_MATLABFunction_e3;
rtDW_MATLABFunction_FmgcComputer_c_T sf_MATLABFunction_fn5;
rtDW_MATLABFunction_FmgcComputer_k_T sf_MATLABFunction_lm;
rtDW_MATLABFunction_FmgcComputer_k_T sf_MATLABFunction_lml;
rtDW_MATLABFunction_FmgcComputer_k_T sf_MATLABFunction_hvs;
rtDW_MATLABFunction_FmgcComputer_c_T sf_MATLABFunction_eb2;
rtDW_MATLABFunction_FmgcComputer_c_T sf_MATLABFunction_kb;
Expand Down Expand Up @@ -410,11 +411,13 @@ class FmgcComputer final
real_T BitfromLabel2_bit_px;
real_T BitfromLabel1_bit_g3;
real_T BitfromLabel2_bit_is;
real_T BitfromLabel4_bit_b;
real_T BitfromLabel3_bit_p;
real_T BitfromLabel_bit_cq;
real_T BitfromLabel2_bit_nq;
real_T BitfromLabel1_bit_mi;
real_T BitfromLabel2_bit_j;
real_T BitfromLabel4_bit_f;
real_T BitfromLabel3_bit_a;
real_T BitfromLabel1_bit_nv;
real_T BitfromLabel2_bit_i1;
Expand Down Expand Up @@ -449,18 +452,16 @@ class FmgcComputer final
real_T BitfromLabel1_bit_i5;
real_T BitfromLabel2_bit_o;
real_T BitfromLabel3_bit_l;
real_T BitfromLabel4_bit_f;
real_T BitfromLabel4_bit_fw;
real_T BitfromLabel_bit_cb;
real_T BitfromLabel_bit_b2;
real_T BitfromLabel_bit_al;
real_T BitfromLabel_bit_hy;
real_T BitfromLabel_bit_am;
real_T CompareToConstant_const;
real_T CompareToConstant_const_o;
real_T CompareToConstant_const_g;
real_T CompareToConstant3_const;
real_T CompareToConstant5_const;
real_T CompareToConstant_const_om;
real_T CompareToConstant_const_o;
real_T CompareToConstant1_const;
real_T CompareToConstant1_const_k;
real_T CompareToConstant2_const;
Expand All @@ -469,49 +470,37 @@ class FmgcComputer final
real_T CompareToConstant5_const_a;
real_T CompareToConstant6_const;
real_T CompareToConstant1_const_i;
real_T CompareToConstant_const_l;
real_T CompareToConstant_const_gv;
real_T CompareToConstant_const_d;
real_T CompareToConstant2_const_i;
real_T CompareToConstant1_const_h;
real_T CompareToConstant_const_lj;
real_T CompareToConstant3_const_i;
real_T CompareToConstant5_const_k;
real_T CompareToConstant_const_a;
real_T CompareToConstant_const_oh;
real_T CompareToConstant1_const_b;
real_T CompareToConstant_const_m;
real_T CompareToConstant1_const_n;
real_T CompareToConstant_const_l5;
real_T CompareToConstant_const_f;
real_T CompareToConstant1_const_a;
real_T CompareToConstant_const_omz;
real_T CompareToConstant_const_om;
real_T CompareToConstant2_const_d;
real_T CompareToConstant_const_lz;
real_T CompareToConstant_const_l;
real_T CompareToConstant1_const_p;
real_T CompareToConstant2_const_a;
real_T CompareToConstant2_const_e;
real_T CompareToConstant2_const_l;
real_T CompareToConstant_const_od;
real_T CompareToConstant1_const_n2;
real_T CompareToConstant2_const_iq;
real_T CompareToConstant2_const_i;
real_T CompareToConstant2_const_h;
real_T CompareToConstant_const_gh;
real_T CompareToConstant_const_c;
real_T CompareToConstant_const_dy;
real_T CompareToConstant_const_g;
real_T CompareToConstant_const_d;
real_T CompareToConstant1_const_e;
real_T CompareToConstant_const_e;
real_T CompareToConstant2_const_m;
real_T CompareToConstant3_const_j;
real_T CompareToConstant4_const_n;
real_T CompareToConstant5_const_h;
real_T CompareToConstant1_const_b3;
real_T CompareToConstant1_const_b;
real_T CompareToConstant_const_l3;
real_T CompareToConstant_const_h;
real_T CompareToConstant1_const_c;
real_T CompareToConstant_const_hq;
real_T CompareToConstant2_const_di;
real_T CompareToConstant1_const_h4;
real_T CompareToConstant1_const_h;
real_T CompareToConstant3_const_d;
real_T CompareToConstant4_const_p;
real_T CompareToConstant6_const_h;
Expand All @@ -521,12 +510,11 @@ class FmgcComputer final
real_T CompareToConstant9_const;
real_T CompareToConstant10_const;
real_T CompareToConstant11_const;
real_T CompareToConstant_const_e3;
real_T CompareToConstant_const_eq;
real_T CompareToConstant1_const_ik;
real_T CompareToConstant1_const_f;
real_T CompareToConstant2_const_j;
real_T CompareToConstant_const_ce;
real_T CompareToConstant_const_c;
real_T CompareToConstant3_const_p;
real_T CompareToConstant4_const_ny;
real_T CompareToConstant5_const_hr;
Expand Down Expand Up @@ -643,10 +631,11 @@ class FmgcComputer final
SignStatusMatrix EnumeratedConstant_Value;
SignStatusMatrix EnumeratedConstant1_Value;
SignStatusMatrix EnumeratedConstant1_Value_d;
SignStatusMatrix EnumeratedConstant_Value_i;
fmgc_approach_type EnumeratedConstant_Value_a;
fmgc_approach_type EnumeratedConstant_Value_f;
fmgc_des_submode EnumeratedConstant1_Value_i;
fmgc_flight_phase EnumeratedConstant_Value_i5;
fmgc_flight_phase EnumeratedConstant_Value_a;
fmgc_flight_phase EnumeratedConstant_Value_i;
fmgc_flight_phase EnumeratedConstant_Value_ah;
fmgc_flight_phase EnumeratedConstant1_Value_dg;
fmgc_flight_phase EnumeratedConstant_Value_p;
fmgc_flight_phase EnumeratedConstant1_Value_m;
Expand Down Expand Up @@ -674,17 +663,32 @@ class FmgcComputer final
fmgc_flight_phase EnumeratedConstant1_Value_e;
real32_T ScheduledGain1_BreakpointsForDimension1[5];
real32_T ScheduledGain1_Table[5];
real32_T CompareToConstant_const_n;
real32_T CompareToConstant_const_o2;
real32_T CompareToConstant_const_hu;
real32_T CompareToConstant1_const_bt;
real32_T CompareToConstant2_const_c;
real32_T CompareToConstant2_const_b;
real32_T CompareToConstant_const_l0;
real32_T CompareToConstant_const_gv;
real32_T CompareToConstant_const_dt;
real32_T CompareToConstant2_const_i0;
real32_T CompareToConstant1_const_ht;
real32_T CompareToConstant_const_lj;
real32_T CompareToConstant_const_a;
real32_T CompareToConstant_const_oh;
real32_T CompareToConstant1_const_bh;
real32_T CompareToConstant_const_m;
real32_T CompareToConstant1_const_hi;
real32_T CompareToConstant_const_mh;
real32_T CompareToConstant2_const_jy;
real32_T CompareToConstant_const_l5;
real32_T CompareToConstant1_const_o;
real32_T CompareToConstant2_const_g;
real32_T CompareToConstant_const_cn;
real32_T CompareToConstant_const_j;
real32_T CompareToConstant1_const_d;
real32_T CompareToConstant_const_e3;
real32_T A429ValueOrDefault3_defaultValue;
real32_T A429ValueOrDefault_defaultValue;
real32_T A429ValueOrDefault_defaultValue_l;
Expand Down Expand Up @@ -884,6 +888,7 @@ class FmgcComputer final
boolean_T PulseNode4_isRisingEdge;
boolean_T PulseNode5_isRisingEdge;
boolean_T ConfirmNode3_isRisingEdge;
boolean_T PulseNode3_isRisingEdge_f;
boolean_T PulseNode1_isRisingEdge_l;
boolean_T ConfirmNode_isRisingEdge_h;
boolean_T PulseNode_isRisingEdge_p;
Expand Down Expand Up @@ -1093,13 +1098,11 @@ class FmgcComputer final
boolean_T Constant_Value_j;
boolean_T Logic_table_hz[16];
boolean_T Logic_table_d[16];
boolean_T Constant_Value_l;
boolean_T Constant2_Value_p;
boolean_T Logic_table_k[16];
boolean_T Logic_table_p[16];
boolean_T Logic_table_m[16];
boolean_T Logic_table_bp[16];
boolean_T Constant_Value_hg;
boolean_T Logic_table_c[16];
boolean_T Logic_table_pl[16];
boolean_T Logic_table_o[16];
Expand Down Expand Up @@ -1194,13 +1197,14 @@ class FmgcComputer final
rtDW_MATLABFunction_FmgcComputer_c_T *localDW);
static void FmgcComputer_MATLABFunction_i(const base_arinc_429 *rtu_u, real_T rtu_bit, uint32_T *rty_y);
static void FmgcComputer_MATLABFunction_ie(const base_arinc_429 *rtu_u, boolean_T *rty_y);
static void FmgcComputer_MATLABFunction_c(const base_arinc_429 *rtu_u, real32_T *rty_y);
static void FmgcComputer_LeadLagFilter_Reset(rtDW_LeadLagFilter_FmgcComputer_T *localDW);
static void FmgcComputer_LeadLagFilter(real_T rtu_U, real_T rtu_C1, real_T rtu_C2, real_T rtu_C3, real_T rtu_C4,
real_T rtu_dt, real_T *rty_Y, rtDW_LeadLagFilter_FmgcComputer_T *localDW);
static void FmgcComputer_LagFilter_Reset(rtDW_LagFilter_FmgcComputer_T *localDW);
static void FmgcComputer_LagFilter(real32_T rtu_U, real_T rtu_C1, real_T rtu_dt, real32_T *rty_Y,
rtDW_LagFilter_FmgcComputer_T *localDW);
static void FmgcComputer_MATLABFunction_o_Reset(rtDW_MATLABFunction_FmgcComputer_f_T *localDW);
static void FmgcComputer_MATLABFunction_oh_Reset(rtDW_MATLABFunction_FmgcComputer_f_T *localDW);
static void FmgcComputer_MATLABFunction_m(boolean_T rtu_u, real_T rtu_Ts, boolean_T *rty_y, real_T rtp_isRisingEdge,
real_T rtp_retriggerable, real_T rtp_triggerDuration, rtDW_MATLABFunction_FmgcComputer_f_T *localDW);
static void FmgcComputer_MATLABFunction_f(const base_arinc_429 *rtu_u, boolean_T *rty_y);
Expand Down
Loading

0 comments on commit be03d71

Please sign in to comment.