From 06c897395773d0f597c154f08a7765483868f31e Mon Sep 17 00:00:00 2001 From: Lukas Michels Date: Thu, 12 Dec 2024 20:33:03 +0100 Subject: [PATCH 01/17] fix(fmgc): fix mode sync for EXP, add mode reset at engine start --- .../wasm/fbw_a320/src/model/FmgcComputer.cpp | 1274 +++++++++-------- .../wasm/fbw_a320/src/model/FmgcComputer.h | 6 +- .../fbw_a320/src/model/FmgcComputer_data.cpp | 13 +- .../fbw_a320/src/model/FmgcComputer_types.h | 88 +- .../src/recording/FlightDataRecorder.h | 2 +- 5 files changed, 713 insertions(+), 670 deletions(-) diff --git a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.cpp b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.cpp index 9fd78f42d2c..3d59f4cb908 100644 --- a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.cpp +++ b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.cpp @@ -241,13 +241,13 @@ void FmgcComputer::step() base_arinc_429 rtb_BusAssignment_jm_logic_chosen_fac_bus_v_max_kn; base_arinc_429 rtb_BusAssignment_jm_logic_ils_computation_data_glideslope_deviation_deg; base_arinc_429 rtb_BusAssignment_jm_logic_ir_computation_data_track_angle_magnetic_deg; - base_arinc_429 rtb_BusAssignment_k_logic_ils_computation_data_localizer_deviation_deg; - base_arinc_429 rtb_BusAssignment_k_logic_ir_computation_data_heading_magnetic_deg; - base_arinc_429 rtb_BusAssignment_k_logic_ir_computation_data_roll_angle_deg; base_arinc_429 rtb_BusAssignment_kc_logic_adr_computation_data_airspeed_computed_kn; base_arinc_429 rtb_BusAssignment_kc_logic_chosen_fac_bus_v_ls_kn; base_arinc_429 rtb_BusAssignment_kc_logic_chosen_fac_bus_v_max_kn; base_arinc_429 rtb_BusAssignment_ks_logic_adr_computation_data_altitude_corrected_ft; + base_arinc_429 rtb_BusAssignment_kv_logic_ils_computation_data_localizer_deviation_deg; + base_arinc_429 rtb_BusAssignment_kv_logic_ir_computation_data_heading_magnetic_deg; + base_arinc_429 rtb_BusAssignment_kv_logic_ir_computation_data_roll_angle_deg; base_arinc_429 rtb_BusAssignment_lz_logic_chosen_fac_bus_center_of_gravity_pos_percent; base_arinc_429 rtb_BusAssignment_lz_logic_chosen_fac_bus_total_weight_lbs; base_arinc_429 rtb_BusAssignment_lz_logic_chosen_fac_bus_v_ls_kn; @@ -389,27 +389,30 @@ void FmgcComputer::step() boolean_T rtb_AND12; boolean_T rtb_AND1_c0; boolean_T rtb_AND9; - boolean_T rtb_AND_iz; + boolean_T rtb_AND_j; boolean_T rtb_BusAssignment_gk_logic_ap_fd_common_condition; boolean_T rtb_BusAssignment_h_logic_engine_running; boolean_T rtb_BusAssignment_h_logic_fcu_failure; boolean_T rtb_BusAssignment_h_logic_one_engine_out; boolean_T rtb_BusAssignment_hk_ap_fd_logic_longi_large_box_tcas; + boolean_T rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset; boolean_T rtb_BusAssignment_n_logic_fac_speeds_failure; boolean_T rtb_BusAssignment_n_logic_fac_weights_failure; boolean_T rtb_BusAssignment_o_logic_both_ils_valid; boolean_T rtb_BusAssignment_o_logic_ils_failure; - boolean_T rtb_Compare_bj; - boolean_T rtb_Compare_c1; - boolean_T rtb_Compare_f; - boolean_T rtb_Compare_jz; + boolean_T rtb_Compare_a5; + boolean_T rtb_Compare_b; + boolean_T rtb_Compare_d0; + boolean_T rtb_Compare_du; + boolean_T rtb_Compare_kg; boolean_T rtb_GreaterThan3; + boolean_T rtb_GreaterThan3_tmp; boolean_T rtb_NOT1_i; boolean_T rtb_NOT3; boolean_T rtb_NOT_b; boolean_T rtb_NOT_c; - boolean_T rtb_NOT_k; - boolean_T rtb_NOT_m; + boolean_T rtb_NOT_gj; + boolean_T rtb_NOT_oj; boolean_T rtb_OR1_j; boolean_T rtb_OR2_l; boolean_T rtb_OR_bg; @@ -422,8 +425,7 @@ void FmgcComputer::step() boolean_T rtb_adrOwnInvalid; boolean_T rtb_ap_inop_tmp; boolean_T rtb_ap_inop_tmp_tmp; - boolean_T rtb_appCapability_idx_0; - boolean_T rtb_appInop_idx_2; + boolean_T rtb_appCapability_idx_2; boolean_T rtb_bothRaValid; boolean_T rtb_doubleAdrFault; boolean_T rtb_dualRaFailure; @@ -474,12 +476,13 @@ void FmgcComputer::step() boolean_T absVsTarget_tmp_tmp; boolean_T guard1; boolean_T rtb_AND_e_tmp; - boolean_T rtb_AND_e_tmp_0; - boolean_T rtb_GreaterThan3_tmp; + boolean_T rtb_GreaterThan3_tmp_0; boolean_T rtb_NOT3_tmp; boolean_T rtb_NOT3_tmp_0; boolean_T rtb_OR2_l_tmp; boolean_T rtb_OR2_l_tmp_0; + boolean_T rtb_y_a0_tmp; + boolean_T rtb_y_lh_tmp; if (FmgcComputer_U.in.sim_data.computer_running) { if (!FmgcComputer_DWork.Runtime_MODE) { FmgcComputer_DWork.Delay_DSTATE = FmgcComputer_P.Delay_InitialCondition; @@ -568,6 +571,7 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_e5); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_ag); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_dx); + FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_p2o); FmgcComputer_MATLABFunction_o_Reset(&FmgcComputer_DWork.sf_MATLABFunction_an); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_bz); FmgcComputer_MATLABFunction_o_Reset(&FmgcComputer_DWork.sf_MATLABFunction_g0); @@ -1466,11 +1470,11 @@ void FmgcComputer::step() &rtb_y_k3, &FmgcComputer_DWork.sf_MATLABFunction_jp); FmgcComputer_MATLABFunction_g(FmgcComputer_U.in.discrete_inputs.ap_opp_engaged, FmgcComputer_P.PulseNode2_isRisingEdge, &rtb_y_j, &FmgcComputer_DWork.sf_MATLABFunction_cb); - rtb_OR2_l_tmp = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active; - rtb_appInop_idx_2 = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active; + rtb_y_c = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active; + rtb_TmpSignalConversionAtSFunctionInport3_idx_0 = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active; rtb_OR2_l_tmp_0 = !FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed; - rtb_NOT_c = (rtb_OR2_l_tmp_0 && rtb_appInop_idx_2); - rtb_OR2_l = (rtb_NOT_c && rtb_OR2_l_tmp); + rtb_NOT_gj = (rtb_OR2_l_tmp_0 && rtb_TmpSignalConversionAtSFunctionInport3_idx_0); + rtb_OR2_l = (rtb_NOT_gj && rtb_y_c); FmgcComputer_MATLABFunction_g(rtb_OR2_l, FmgcComputer_P.PulseNode1_isRisingEdge, &rtb_y_me, &FmgcComputer_DWork.sf_MATLABFunction_hp); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg, @@ -1489,22 +1493,22 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault5_defaultValue, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_gk_logic_ir_computation_data_roll_angle_deg, FmgcComputer_P.A429ValueOrDefault6_defaultValue, &rtb_y_gtq); - rtb_NOT_k = !rtb_ir3Invalid; - rtb_TmpSignalConversionAtSFunctionInport3_idx_0 = !FmgcComputer_U.in.discrete_inputs.elac_own_ap_disc; - rtb_TmpSignalConversionAtSFunctionInport3_idx_1 = !FmgcComputer_U.in.discrete_inputs.elac_opp_ap_disc; + rtb_NOT_c = !rtb_ir3Invalid; + rtb_TmpSignalConversionAtSFunctionInport3_idx_1 = !FmgcComputer_U.in.discrete_inputs.elac_own_ap_disc; + rtb_TmpSignalConversionAtSFunctionInport3_idx_2 = !FmgcComputer_U.in.discrete_inputs.elac_opp_ap_disc; apCondition = ((!FmgcComputer_U.in.discrete_inputs.ap_instinctive_disc) && - (rtb_TmpSignalConversionAtSFunctionInport3_idx_0 || rtb_TmpSignalConversionAtSFunctionInport3_idx_1) && - rtb_NOT_k); + (rtb_TmpSignalConversionAtSFunctionInport3_idx_1 || rtb_TmpSignalConversionAtSFunctionInport3_idx_2) && + rtb_NOT_c); rtb_ap_inop_tmp_tmp = !fdOppOff; rtb_ap_inop_tmp = (rtb_ap_inop_tmp_tmp || (!rtb_BusAssignment_gk_logic_ap_fd_common_condition) || (!apCondition)); - rtb_NOT_m = !FmgcComputer_U.in.discrete_inputs.is_unit_1; + rtb_y_hy = !FmgcComputer_U.in.discrete_inputs.is_unit_1; FmgcComputer_DWork.Memory_PreviousInput = FmgcComputer_P.Logic_table[(((static_cast(rtb_y_da && (!FmgcComputer_DWork.Delay_DSTATE_p) && rtb_y_hb && rtb_BusAssignment_gk_logic_ap_fd_common_condition && fdOppOff && apCondition && ((rtb_y_mw >= rtb_y_cf) && (rtb_y_cf >= rtb_y_fl) && (rtb_y_jq >= FmgcComputer_P.CompareToConstant_const_hu) && (rtb_y_jq <= FmgcComputer_P.CompareToConstant1_const_bt) && (std:: abs(rtb_y_gtq) <= FmgcComputer_P.CompareToConstant2_const_c))) << 1) + (rtb_ap_inop_tmp || (rtb_y_da && FmgcComputer_DWork.Delay_DSTATE_p) || FmgcComputer_U.in.discrete_inputs.ap_instinctive_disc || ((rtb_y_j && - rtb_OR2_l) || (FmgcComputer_U.in.discrete_inputs.ap_opp_engaged && rtb_y_me && rtb_NOT_m)) || (rtb_y_p && + rtb_OR2_l) || (FmgcComputer_U.in.discrete_inputs.ap_opp_engaged && rtb_y_me && rtb_y_hy)) || (rtb_y_p && (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || rtb_y_i2 || (rtb_Phi_c_deg >= FmgcComputer_P.CompareToConstant5_const))) || (rtb_y_k3 && rtb_y_p))) << 1) + FmgcComputer_DWork.Memory_PreviousInput]; @@ -1524,12 +1528,12 @@ void FmgcComputer::step() FmgcComputer_DWork.Memory_PreviousInput_g1 = FmgcComputer_P.Logic_table_f[(((static_cast(rtb_y_k3) << 1) + FmgcComputer_P.Constant_Value_e) << 1) + FmgcComputer_DWork.Memory_PreviousInput_g1]; FmgcComputer_MATLABFunction_g(FmgcComputer_U.in.discrete_inputs.fcu_athr_button, - FmgcComputer_P.PulseNode_isRisingEdge_k, &rtb_y_fd, &FmgcComputer_DWork.sf_MATLABFunction_o1); + FmgcComputer_P.PulseNode_isRisingEdge_k, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_o1); FmgcComputer_MATLABFunction_a((FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode2_isRisingEdge, FmgcComputer_P.ConfirmNode2_timeDelay, &rtb_y_j, &FmgcComputer_DWork.sf_MATLABFunction_mn); - FmgcComputer_MATLABFunction_g(rtb_y_j, FmgcComputer_P.PulseNode1_isRisingEdge_h, &rtb_Compare_bj, + FmgcComputer_MATLABFunction_g(rtb_y_j, FmgcComputer_P.PulseNode1_isRisingEdge_h, &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_jt); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault_defaultValue_n, &rtb_y_gtq); @@ -1560,41 +1564,47 @@ void FmgcComputer::step() (!FmgcComputer_DWork.Memory_PreviousInput_g1) && rtb_y_ga && rtb_OR_bg); rtb_ap_inop_tmp_tmp = (rtb_ap_inop_tmp_tmp || (!rtb_y_k3)); FmgcComputer_DWork.Delay_DSTATE_k = FmgcComputer_P.Logic_table_n[(((static_cast(fdOppOff && rtb_y_k3 && - ((rtb_y_fd && ((rtb_raComputationData > 100.0F) || rtb_dualRaFailure)) || rtb_Compare_bj || rtb_y_da || rtb_y_j)) << - 1) + (rtb_ap_inop_tmp_tmp || rtb_y_me || (FmgcComputer_DWork.Delay_DSTATE_k && rtb_y_fd && + ((rtb_Compare_a5 && ((rtb_raComputationData > 100.0F) || rtb_dualRaFailure)) || rtb_Compare_du || rtb_y_da || + rtb_y_j)) << 1) + (rtb_ap_inop_tmp_tmp || rtb_y_me || (FmgcComputer_DWork.Delay_DSTATE_k && rtb_Compare_a5 && (!rtP_fmgc_ap_fd_logic_output_MATLABStruct.lateral_modes.land_active)) || - FmgcComputer_U.in.discrete_inputs.athr_instinctive_disc || rtb_y_ff || rtb_NOT_b)) << 1) + + FmgcComputer_U.in.discrete_inputs.athr_instinctive_disc || rtb_y_ff || rtb_NOT_b)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_p]; rtb_fmgcOppPriority_tmp = !rtb_Logic_a2[0]; rtb_y_k3 = !rtb_NOT1_i; rtb_y_mp = !FmgcComputer_DWork.Delay_DSTATE_k; - rtb_OR_bg = (FmgcComputer_U.in.discrete_inputs.ap_opp_engaged || FmgcComputer_U.in.discrete_inputs.fd_opp_engaged); - rtb_y_j = (rtb_OR_bg || FmgcComputer_U.in.discrete_inputs.athr_opp_engaged); - rtb_y_k3 = ((rtb_NOT_m || (rtb_fmgcOppPriority_tmp && (FmgcComputer_U.in.discrete_inputs.ap_opp_engaged || rtb_y_k3) - && (rtb_OR_bg || rtb_y_mp) && rtb_y_j)) && (FmgcComputer_U.in.discrete_inputs.is_unit_1 || - ((rtb_fmgcOppPriority_tmp || FmgcComputer_U.in.discrete_inputs.ap_opp_engaged) && (rtb_OR_bg || rtb_y_k3) && - (rtb_y_j || rtb_y_mp) && (rtb_Logic_a2[0] || rtb_NOT1_i || FmgcComputer_DWork.Delay_DSTATE_k || - (!FmgcComputer_U.in.discrete_inputs.fmgc_opp_healthy))))); - rtb_Compare_jz = !FmgcComputer_U.in.discrete_inputs.ap_opp_engaged; - rtb_OR2_l = (rtb_y_k3 && (rtb_fmgcOppPriority_tmp || rtb_Compare_jz)); + rtb_y_j = (FmgcComputer_U.in.discrete_inputs.ap_opp_engaged || FmgcComputer_U.in.discrete_inputs.fd_opp_engaged); + rtb_y_da = (rtb_y_j || FmgcComputer_U.in.discrete_inputs.athr_opp_engaged); + rtb_y_k3 = ((rtb_y_hy || (rtb_fmgcOppPriority_tmp && (FmgcComputer_U.in.discrete_inputs.ap_opp_engaged || rtb_y_k3) && + (rtb_y_j || rtb_y_mp) && rtb_y_da)) && (FmgcComputer_U.in.discrete_inputs.is_unit_1 || ((rtb_fmgcOppPriority_tmp || + FmgcComputer_U.in.discrete_inputs.ap_opp_engaged) && (rtb_y_j || rtb_y_k3) && (rtb_y_da || rtb_y_mp) && + (rtb_Logic_a2[0] || rtb_NOT1_i || FmgcComputer_DWork.Delay_DSTATE_k || + (!FmgcComputer_U.in.discrete_inputs.fmgc_opp_healthy))))); + rtb_OR2_l_tmp = !FmgcComputer_U.in.discrete_inputs.ap_opp_engaged; + rtb_OR2_l = (rtb_y_k3 && (rtb_fmgcOppPriority_tmp || rtb_OR2_l_tmp)); + rtb_y_fd = (rtb_Logic_a2[0] || FmgcComputer_U.in.discrete_inputs.ap_opp_engaged || rtb_NOT1_i || + FmgcComputer_U.in.discrete_inputs.fd_opp_engaged); + FmgcComputer_MATLABFunction_g(rtb_BusAssignment_h_logic_engine_running, FmgcComputer_P.PulseNode3_isRisingEdge_f, + &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_p2o); + rtb_appCapability_idx_2 = !rtb_y_fd; + rtb_y_hy = (rtb_appCapability_idx_2 || (rtb_Compare_du && rtb_y_p)); rtb_BusAssignment_m_logic_adr_computation_data_vertical_speed_ft_min.SSM = rtb_adrComputationBus_vertical_speed_ft_min_SSM; rtb_BusAssignment_m_logic_adr_computation_data_vertical_speed_ft_min.Data = rtb_adrComputationBus_vertical_speed_ft_min_Data; - apCondition = (rtb_Logic_a2[0] || FmgcComputer_U.in.discrete_inputs.ap_opp_engaged || rtb_NOT1_i || - FmgcComputer_U.in.discrete_inputs.fd_opp_engaged); + apCondition = rtb_y_fd; + rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset = rtb_y_hy; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel1_bit_c, &rtb_DataTypeConversion1_e); - rtb_NOT_m = (rtb_DataTypeConversion1_e == 0U); + rtb_NOT_oj = (rtb_DataTypeConversion1_e == 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel3_bit_m, &rtb_DataTypeConversion1_e); rtb_y_i2 = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel4_bit_p, &rtb_DataTypeConversion1_e); - rtb_y_i2 = ((!rtb_NOT_m) || (!rtb_y_i2) || (rtb_DataTypeConversion1_e == 0U)); + rtb_y_i2 = ((!rtb_NOT_oj) || (!rtb_y_i2) || (rtb_DataTypeConversion1_e == 0U)); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel2_bit_a, &rtb_DataTypeConversion1_e); - rtb_NOT_m = (rtb_DataTypeConversion1_e != 0U); + rtb_NOT_oj = (rtb_DataTypeConversion1_e != 0U); rtb_DataTypeConversion2_kb = std::round(FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory.Data); if (rtb_DataTypeConversion2_kb < 4.2949673E+9F) { if (rtb_DataTypeConversion2_kb >= 0.0F) { @@ -1623,7 +1633,7 @@ void FmgcComputer::step() } if (rtb_y_i2) { - if (rtb_NOT_m) { + if (rtb_NOT_oj) { rtb_Phi_c_deg = -static_cast(absVsTarget); } else { rtb_Phi_c_deg = absVsTarget; @@ -1640,63 +1650,63 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_i, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_l, - &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_bz); + &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_bz); FmgcComputer_DWork.Memory_PreviousInput_e = FmgcComputer_P.Logic_table_l[(((static_cast - (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active && rtb_Compare_bj) << 1) + + (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active && rtb_Compare_du) << 1) + FmgcComputer_DWork.Delay_DSTATE_o) << 1) + FmgcComputer_DWork.Memory_PreviousInput_e]; - rtb_Compare_c1 = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active; - FmgcComputer_DWork.Delay_DSTATE_o = (FmgcComputer_DWork.Memory_PreviousInput_e && rtb_Compare_c1); - FmgcComputer_MATLABFunction_m(FmgcComputer_DWork.Delay_DSTATE_o, FmgcComputer_U.in.time.dt, &rtb_y_fd, + rtb_Compare_b = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active; + FmgcComputer_DWork.Delay_DSTATE_o = (FmgcComputer_DWork.Memory_PreviousInput_e && rtb_Compare_b); + FmgcComputer_MATLABFunction_m(FmgcComputer_DWork.Delay_DSTATE_o, FmgcComputer_U.in.time.dt, &rtb_Compare_a5, FmgcComputer_P.MTrigNode1_isRisingEdge, FmgcComputer_P.MTrigNode1_retriggerable, FmgcComputer_P.MTrigNode1_triggerDuration, &FmgcComputer_DWork.sf_MATLABFunction_g0); FmgcComputer_MATLABFunction_m((FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active && (FmgcComputer_DWork.Delay_DSTATE.armed_modes.clb_armed || FmgcComputer_DWork.Delay_DSTATE.armed_modes.des_armed || FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed || FmgcComputer_DWork.Delay_DSTATE.armed_modes.glide_armed || - FmgcComputer_DWork.Delay_DSTATE.armed_modes.alt_acq_armed)), FmgcComputer_U.in.time.dt, &rtb_Compare_bj, + FmgcComputer_DWork.Delay_DSTATE.armed_modes.alt_acq_armed)), FmgcComputer_U.in.time.dt, &rtb_Compare_du, FmgcComputer_P.MTrigNode2_isRisingEdge, FmgcComputer_P.MTrigNode2_retriggerable, FmgcComputer_P.MTrigNode2_triggerDuration, &FmgcComputer_DWork.sf_MATLABFunction_pl4); rtb_BusAssignment_j_logic_adr_computation_data_altitude_corrected_ft.SSM = rtb_adrComputationBus_altitude_corrected_ft_SSM; rtb_BusAssignment_j_logic_adr_computation_data_altitude_corrected_ft.Data = rtb_adrComputationBus_altitude_corrected_ft_Data; - rtb_NOT_m = rtb_y_i2; + rtb_NOT_oj = rtb_y_i2; FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_m, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_j_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault1_defaultValue_c, &rtb_y_gtq); rtb_AND_e_tmp = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_hold_active); - rtb_AND_e_tmp_0 = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active); - rtb_AND_iz = (rtb_AND_e_tmp && FmgcComputer_DWork.Delay_DSTATE.alt_cstr_applicable && rtb_AND_e_tmp_0 && - FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid); + rtb_y_ai = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active); + rtb_AND_j = (rtb_AND_e_tmp && FmgcComputer_DWork.Delay_DSTATE.alt_cstr_applicable && rtb_y_ai && + FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid); if (rtb_y_jq > rtb_y_gtq) { rtb_OR_bg = ((FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft < rtb_y_jq) && - ((FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft + 250.0 > rtb_y_gtq) || rtb_AND_iz)); + ((FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft + 250.0 > rtb_y_gtq) || rtb_AND_j)); } else { rtb_OR_bg = ((FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft > rtb_y_jq) && - ((FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft - 250.0 < rtb_y_gtq) || rtb_AND_iz)); + ((FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft - 250.0 < rtb_y_gtq) || rtb_AND_j)); } - rtb_AND_iz = ((FmgcComputer_DWork.Delay_DSTATE.armed_modes.clb_armed || - FmgcComputer_DWork.Delay_DSTATE.armed_modes.des_armed || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || rtb_AND_iz) && - (FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft != 0.0) && rtb_OR_bg); - if (rtb_AND_iz) { + rtb_AND_j = ((FmgcComputer_DWork.Delay_DSTATE.armed_modes.clb_armed || + FmgcComputer_DWork.Delay_DSTATE.armed_modes.des_armed || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || rtb_AND_j) && + (FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft != 0.0) && rtb_OR_bg); + if (rtb_AND_j) { rtb_altCstrOrFcu = FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft; } else { rtb_altCstrOrFcu = rtb_y_jq; } rtb_BusAssignment_hk_ap_fd_logic_tcas_vs_target = rtb_Phi_c_deg; - rtb_BusAssignment_hk_ap_fd_logic_longi_large_box_tcas = rtb_Compare_bj; + rtb_BusAssignment_hk_ap_fd_logic_longi_large_box_tcas = rtb_Compare_du; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel_bit_c, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_a(rtb_y_p, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_h, - FmgcComputer_P.ConfirmNode_timeDelay_i, &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_hz); + FmgcComputer_P.ConfirmNode_timeDelay_i, &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_hz); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault_defaultValue_l2, &rtb_y_gtq); rtb_GreaterThan3 = (rtb_y_gtq < FmgcComputer_P.CompareToConstant3_const_n); @@ -1711,16 +1721,14 @@ void FmgcComputer::step() FmgcComputer_P.CompareToConstant6_const) && rtb_y_fi)), FmgcComputer_P.PulseNode_isRisingEdge_p, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_gk); rtb_y_e = !rtb_OR2_l; - rtb_TmpSignalConversionAtSFunctionInport3_idx_2 = - !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active; - rtb_NOT3_tmp = (rtb_y_e && rtb_TmpSignalConversionAtSFunctionInport3_idx_2 && rtb_OR2_l_tmp); + rtb_Compare_d0 = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active; + rtb_NOT3_tmp = (rtb_y_e && rtb_Compare_d0 && rtb_y_c); rtb_NOT3 = (((FmgcComputer_U.in.fms_inputs.v_2_kts > FmgcComputer_P.CompareToConstant1_const_k) && - (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_NOT3_tmp && rtb_Compare_bj && + (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_NOT3_tmp && rtb_Compare_du && (FmgcComputer_U.in.fms_inputs.v_2_kts > FmgcComputer_P.CompareToConstant2_const) && (rtb_handleIndex >= FmgcComputer_P.CompareToConstant_const_b) && rtb_y_ff)); FmgcComputer_MATLABFunction_a(rtb_NOT3, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_c, FmgcComputer_P.ConfirmNode_timeDelay_h, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_fx); - rtb_OR_bg = !apCondition; Memory_PreviousInput_k_tmp_tmp = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.vs_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fpa_active); Memory_PreviousInput_k_tmp_tmp_tmp = (Memory_PreviousInput_k_tmp_tmp || @@ -1739,7 +1747,7 @@ void FmgcComputer::step() rtb_y_i2 = (Memory_PreviousInput_k_tmp_tmp_0 || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active); - FmgcComputer_DWork.Memory_PreviousInput_k = FmgcComputer_P.Logic_table_b[(((rtb_OR_bg || ((rtb_y_i2 || + FmgcComputer_DWork.Memory_PreviousInput_k = FmgcComputer_P.Logic_table_b[(((rtb_y_hy || ((rtb_y_i2 || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_ff))) + (static_cast(rtb_NOT3) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_k]; rtb_BusAssignment_f4_logic_ir_computation_data_heading_magnetic_deg.SSM = @@ -1767,7 +1775,7 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault_defaultValue_e, &rtb_y_gtq); FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_f4_logic_ils_computation_data_localizer_deviation_deg, &rtb_NOT3); FmgcComputer_MATLABFunction_a(rtb_y_p, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_p, - FmgcComputer_P.ConfirmNode_timeDelay_o, &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_fm); + FmgcComputer_P.ConfirmNode_timeDelay_o, &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_fm); if (rtb_y_gtq < 0.0F) { rtb_DataTypeConversion1_d = -rtb_y_gtq; } else { @@ -1778,7 +1786,7 @@ void FmgcComputer::step() (!FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_loc_submode_active) && ((rtb_handleIndex >= FmgcComputer_P.CompareToConstant_const_cq) && rtb_y_ff && (rtb_DataTypeConversion2_kb <= FmgcComputer_P.CompareToConstant2_const_b) && (rtb_DataTypeConversion1_d < - FmgcComputer_P.CompareToConstant1_const_i) && FmgcComputer_P.Constant_Value_j && rtb_NOT3 && rtb_Compare_bj))); + FmgcComputer_P.CompareToConstant1_const_i) && FmgcComputer_P.Constant_Value_j && rtb_NOT3 && rtb_Compare_du))); FmgcComputer_MATLABFunction_a(rtb_NOT3, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_l, FmgcComputer_P.ConfirmNode_timeDelay_f, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_jl); FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_f4_logic_ils_computation_data_localizer_deviation_deg, &rtb_y_g); @@ -1790,7 +1798,7 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_OR_bg || (!rtb_y_g)) + (static_cast + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_y_hy || (!rtb_y_g)) + (static_cast (rtb_NOT3) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_c]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel_bit_f, &rtb_DataTypeConversion1_e); @@ -1799,12 +1807,12 @@ void FmgcComputer::step() FmgcComputer_P.BitfromLabel1_bit_n, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_raComputationData >= FmgcComputer_P.CompareToConstant_const_l), FmgcComputer_P.PulseNode_isRisingEdge_b, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_fh); - FmgcComputer_MATLABFunction_m(rtb_y_ff, FmgcComputer_U.in.time.dt, &rtb_Compare_bj, + FmgcComputer_MATLABFunction_m(rtb_y_ff, FmgcComputer_U.in.time.dt, &rtb_Compare_du, FmgcComputer_P.MTrigNode_isRisingEdge_jv, FmgcComputer_P.MTrigNode_retriggerable_p, FmgcComputer_P.MTrigNode_triggerDuration_n, &FmgcComputer_DWork.sf_MATLABFunction_mnt); rtb_NOT3_tmp_0 = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active; rtb_NOT3 = ((rtb_GreaterThan3 && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && (rtb_NOT3_tmp_0 && ( - !FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed)) && rtb_Compare_bj)); + !FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed)) && rtb_Compare_du)); FmgcComputer_MATLABFunction_a(rtb_NOT3, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_hu, FmgcComputer_P.ConfirmNode_timeDelay_j, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_kz1); FmgcComputer_DWork.Memory_PreviousInput_b = FmgcComputer_P.Logic_table_d[(((((!rtb_y_ff) && @@ -1815,18 +1823,18 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_OR_bg) + (static_cast(rtb_NOT3) << 1)) + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_y_hy) + (static_cast(rtb_NOT3) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_b]; rtb_NOT3 = rtb_NOT_b; - rtb_y_g = rtb_y_fd; + rtb_y_g = rtb_Compare_a5; rtb_y_fi = (FmgcComputer_DWork.Memory_PreviousInput_c || FmgcComputer_DWork.Memory_PreviousInput_b); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_k, &rtb_DataTypeConversion1_e); rtb_y_nlq = ((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_br, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_l, &rtb_y_fd, - &FmgcComputer_DWork.sf_MATLABFunction_hh); + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_l, + &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_hh); FmgcComputer_MATLABFunction_a(FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_f, FmgcComputer_P.ConfirmNode_timeDelay_d, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_ha); @@ -1838,52 +1846,52 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault2_defaultValue_c, &rtb_y_jq); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.ils_own_bus.runway_heading_deg, FmgcComputer_P.A429ValueOrDefault3_defaultValue_o, &rtb_y_gtq); - rtb_y_hy = !rtb_BusAssignment_h_logic_engine_running; - rtb_appCapability_idx_0 = !rtb_BusAssignment_o_logic_ils_failure; - rtb_AND12 = !FmgcComputer_P.Constant2_Value_p; - rtb_GreaterThan3_tmp = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_active; + rtb_GreaterThan3_tmp = !rtb_BusAssignment_h_logic_engine_running; + rtb_OR_bg = !rtb_BusAssignment_o_logic_ils_failure; + rtb_y_me = !FmgcComputer_P.Constant2_Value_p; + rtb_GreaterThan3_tmp_0 = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_active; rtb_AND1_c0 = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.roll_goaround_active; - rtb_y_ai = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active; - rtb_GreaterThan3 = (rtb_appInop_idx_2 && (rtb_y_nlq || (rtb_y_e && (FmgcComputer_P.Constant_Value_l && - rtb_appCapability_idx_0 && (rtb_y_hy || (rtb_raComputationData >= FmgcComputer_P.CompareToConstant_const_gv)) && - rtb_OR1_j && rtb_y_fd && (!rtb_y_ff) && (rtb_y_ai && (!FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed))) - && rtb_TmpSignalConversionAtSFunctionInport3_idx_2 && rtb_OR2_l_tmp && rtb_GreaterThan3_tmp && rtb_AND1_c0 && - rtb_AND12 && rtb_AND12 && (((rtb_y_mw == rtb_y_fl) && (rtb_y_jq == rtb_y_gtq)) || - (!rtb_BusAssignment_o_logic_both_ils_valid))))); + rtb_Compare_kg = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active; + rtb_GreaterThan3 = (rtb_TmpSignalConversionAtSFunctionInport3_idx_0 && (rtb_y_nlq || (rtb_y_e && + (FmgcComputer_P.Constant_Value_l && rtb_OR_bg && (rtb_GreaterThan3_tmp || (rtb_raComputationData >= + FmgcComputer_P.CompareToConstant_const_gv)) && rtb_OR1_j && rtb_Compare_a5 && (!rtb_y_ff) && (rtb_Compare_kg && + (!FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed))) && rtb_Compare_d0 && rtb_y_c && + rtb_GreaterThan3_tmp_0 && rtb_AND1_c0 && rtb_y_me && rtb_y_me && (((rtb_y_mw == rtb_y_fl) && (rtb_y_jq == + rtb_y_gtq)) || (!rtb_BusAssignment_o_logic_both_ils_valid))))); rtb_NOT_b = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active); - rtb_y_c = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active); + rtb_y_a0_tmp = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active); FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.vs_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fpa_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active), FmgcComputer_P.PulseNode2_isRisingEdge_e, - &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_kb); + &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_kb); FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active), FmgcComputer_P.PulseNode3_isRisingEdge_j, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_eb2); - rtb_y_j = (rtb_y_c && rtb_y_ff); + rtb_y_j = (rtb_y_a0_tmp && rtb_y_ff); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel1_bit_l, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_c, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_es); - FmgcComputer_DWork.Memory_PreviousInput_l = FmgcComputer_P.Logic_table_k[(((rtb_y_oi || ((!rtb_NOT_b) && (!rtb_y_c) && - FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed) || ((rtb_NOT_b && rtb_Compare_bj) || rtb_y_j) || (rtb_y_fd && - FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed) || rtb_y_ff || rtb_OR_bg || + FmgcComputer_DWork.Memory_PreviousInput_l = FmgcComputer_P.Logic_table_k[(((rtb_y_oi || ((!rtb_NOT_b) && + (!rtb_y_a0_tmp) && FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed) || ((rtb_NOT_b && rtb_Compare_du) || + rtb_y_j) || (rtb_Compare_a5 && FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed) || rtb_y_ff || rtb_y_hy || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active) + (static_cast(rtb_GreaterThan3) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_l]; FmgcComputer_MATLABFunction_a(!FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active, FmgcComputer_U.in.time.dt, - FmgcComputer_P.ConfirmNode_isRisingEdge_e, FmgcComputer_P.ConfirmNode_timeDelay_l, &rtb_Compare_bj, + FmgcComputer_P.ConfirmNode_isRisingEdge_e, FmgcComputer_P.ConfirmNode_timeDelay_l, &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_mq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_4, FmgcComputer_P.BitfromLabel_bit_ff, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_a((rtb_raComputationData < FmgcComputer_P.CompareToConstant_const_d), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge_g, FmgcComputer_P.ConfirmNode1_timeDelay_d, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_cr); - rtb_y_j = (rtb_Compare_bj && (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && + rtb_y_j = (rtb_Compare_du && (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active && rtb_y_ff))); FmgcComputer_MATLABFunction_a(rtb_y_j, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_d, @@ -1894,7 +1902,7 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_a, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_fa); FmgcComputer_MATLABFunction_a(rtb_y_p, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode2_isRisingEdge_l, - FmgcComputer_P.ConfirmNode2_timeDelay_b, &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_fo0); + FmgcComputer_P.ConfirmNode2_timeDelay_b, &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_fo0); Memory_PreviousInput_d_tmp_tmp = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.roll_goaround_active); rtb_AND9 = (Memory_PreviousInput_d_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || @@ -1905,7 +1913,7 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || (Memory_PreviousInput_d_tmp || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active)) && rtb_y_da) || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || (rtb_fmgcOppPriority_tmp && - rtb_Compare_jz && rtb_y_ff && rtb_Compare_bj) || rtb_OR_bg) + (static_cast(rtb_y_j) << 1)) << 1) + + rtb_OR2_l_tmp && rtb_y_ff && rtb_Compare_du) || rtb_y_hy) + (static_cast(rtb_y_j) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_d]; rtb_y_nlq = (FmgcComputer_U.in.discrete_inputs.bscu_opp_valid || FmgcComputer_U.in.discrete_inputs.bscu_own_valid); FmgcComputer_MATLABFunction_a((FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active && (rtb_raComputationData <= @@ -1914,20 +1922,21 @@ void FmgcComputer::step() FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge_bk, FmgcComputer_P.ConfirmNode1_timeDelay_ef, &rtb_y_j, &FmgcComputer_DWork.sf_MATLABFunction_mb); FmgcComputer_DWork.Memory_PreviousInput_m = FmgcComputer_P.Logic_table_m[(((static_cast(rtb_y_j) << 1) + - rtb_appInop_idx_2) << 1) + FmgcComputer_DWork.Memory_PreviousInput_m]; - rtb_NOT_k = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active && (rtb_raComputationData <= - FmgcComputer_P.CompareToConstant1_const_h) && rtb_NOT_k); + rtb_TmpSignalConversionAtSFunctionInport3_idx_0) << 1) + FmgcComputer_DWork.Memory_PreviousInput_m]; + rtb_NOT_c = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active && (rtb_raComputationData <= + FmgcComputer_P.CompareToConstant1_const_h) && rtb_NOT_c); rtb_y_j = (rtb_OR1_j && FmgcComputer_DWork.Delay2_DSTATE.flare_law.condition_Flare && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active); FmgcComputer_MATLABFunction_a(rtb_y_j, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge_d, FmgcComputer_P.ConfirmNode1_timeDelay_dj, &rtb_y_da, &FmgcComputer_DWork.sf_MATLABFunction_j2); FmgcComputer_DWork.Memory_PreviousInput_bc = FmgcComputer_P.Logic_table_bp[(((static_cast(rtb_y_da) << 1) - + rtb_appInop_idx_2) << 1) + FmgcComputer_DWork.Memory_PreviousInput_bc]; + + rtb_TmpSignalConversionAtSFunctionInport3_idx_0) << 1) + FmgcComputer_DWork.Memory_PreviousInput_bc]; rtb_y_j = (rtb_y_j || FmgcComputer_DWork.Memory_PreviousInput_bc); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_l, &rtb_DataTypeConversion1_e); rtb_GreaterThan3 = ((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l); - rtb_y_oi = (rtb_y_hy || (rtb_raComputationData >= FmgcComputer_P.CompareToConstant_const_lj) || rtb_dualRaFailure); + rtb_y_oi = (rtb_GreaterThan3_tmp || (rtb_raComputationData >= FmgcComputer_P.CompareToConstant_const_lj) || + rtb_dualRaFailure); FmgcComputer_MATLABFunction_a(FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_le, FmgcComputer_P.ConfirmNode_timeDelay_n, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_pu); @@ -1936,22 +1945,22 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_h, &rtb_y_me, &FmgcComputer_DWork.sf_MATLABFunction_d3); rtb_y_i2 = (rtb_y_e && FmgcComputer_U.in.fms_inputs.lateral_flight_plan_valid); - rtb_y_nlq = (rtb_y_i2 && FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && FmgcComputer_P.Constant_Value_hg - && rtb_y_oi && rtb_OR2_l_tmp_0 && (rtb_TmpSignalConversionAtSFunctionInport3_idx_2 && - rtb_GreaterThan3_tmp && rtb_OR2_l_tmp && rtb_AND1_c0 && rtb_y_ai && (!rtb_y_ff) && rtb_y_me)); - rtb_NOT_b = (rtb_appInop_idx_2 && (rtb_GreaterThan3 || rtb_y_nlq)); + rtb_NOT_b = (rtb_TmpSignalConversionAtSFunctionInport3_idx_0 && (rtb_GreaterThan3 || (rtb_y_i2 && + FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && FmgcComputer_P.Constant_Value_hg && rtb_y_oi && + rtb_OR2_l_tmp_0 && (rtb_Compare_d0 && rtb_GreaterThan3_tmp_0 && rtb_y_c && rtb_AND1_c0 && rtb_Compare_kg && + (!rtb_y_ff) && rtb_y_me)))); FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active), FmgcComputer_P.PulseNode3_isRisingEdge_k, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_bbv); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel1_bit_o, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_li, - &rtb_y_nlq, &FmgcComputer_DWork.sf_MATLABFunction_bk); - rtb_Compare_f = !FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid; + &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_bk); + rtb_OR2_l_tmp = !FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid; FmgcComputer_DWork.Memory_PreviousInput_dv = FmgcComputer_P.Logic_table_c [(((FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || rtb_Compare_f || rtb_y_ff || - (rtb_y_me && FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed) || rtb_y_nlq || rtb_OR_bg || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || rtb_OR2_l_tmp || rtb_y_ff || + (rtb_y_me && FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed) || rtb_GreaterThan3 || rtb_y_hy || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active) + (static_cast(rtb_NOT_b) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_dv]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, @@ -1962,11 +1971,10 @@ void FmgcComputer::step() (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant_Value_i5))); FmgcComputer_MATLABFunction_a(rtb_y_da, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ha, FmgcComputer_P.ConfirmNode_timeDelay_on, &rtb_y_me, &FmgcComputer_DWork.sf_MATLABFunction_mm); - absVsTarget_tmp = (Memory_PreviousInput_k_tmp_tmp || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_hold_active); - absVsTarget_tmp_tmp = (absVsTarget_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active); - rtb_Compare_jz = (absVsTarget_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active); - absVsTarget = static_cast((((rtb_OR_bg || ((rtb_Compare_jz || + rtb_AND12 = (Memory_PreviousInput_k_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_hold_active); + absVsTarget_tmp_tmp = (rtb_AND12 || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active); + absVsTarget_tmp = (absVsTarget_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active); + absVsTarget = static_cast((((rtb_y_hy || ((absVsTarget_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || @@ -1997,7 +2005,7 @@ void FmgcComputer::step() rtb_y_ff)); FmgcComputer_MATLABFunction_a(rtb_y_da, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_hj, FmgcComputer_P.ConfirmNode_timeDelay_a3, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_lm); - FmgcComputer_DWork.Memory_PreviousInput_i = FmgcComputer_P.Logic_table_o[((((rtb_OR_bg || + FmgcComputer_DWork.Memory_PreviousInput_i = FmgcComputer_P.Logic_table_o[((((rtb_y_hy || (Memory_PreviousInput_k_tmp_tmp_0 || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) && (!rtb_y_ff)) + (static_cast(rtb_y_da) << @@ -2013,7 +2021,7 @@ void FmgcComputer::step() (!FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active) && rtb_y_ff))); FmgcComputer_MATLABFunction_a(rtb_y_da, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_mf, FmgcComputer_P.ConfirmNode_timeDelay_dw, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_mtz); - FmgcComputer_DWork.Memory_PreviousInput_el = FmgcComputer_P.Logic_table_c2[(((rtb_OR_bg || + FmgcComputer_DWork.Memory_PreviousInput_el = FmgcComputer_P.Logic_table_c2[(((rtb_y_hy || ((FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || @@ -2025,10 +2033,10 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active), FmgcComputer_P.PulseNode3_isRisingEdge_l, &rtb_y_nlq, &FmgcComputer_DWork.sf_MATLABFunction_gb); - rtb_AND12 = ((!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.vs_active) && - (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fpa_active)); + rtb_GreaterThan3_tmp = ((!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.vs_active) && + (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fpa_active)); rtb_y_me = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active; - rtb_GreaterThan3 = (rtb_AND12 && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active) && + rtb_GreaterThan3 = (rtb_GreaterThan3_tmp && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active) && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active) && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active) && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active) && rtb_y_me && @@ -2038,61 +2046,62 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_m((rtb_DataTypeConversion1_e != 0U), FmgcComputer_U.in.time.dt, &rtb_y_ff, FmgcComputer_P.MTrigNode_isRisingEdge_g, FmgcComputer_P.MTrigNode_retriggerable_f, FmgcComputer_P.MTrigNode_triggerDuration_bm, &FmgcComputer_DWork.sf_MATLABFunction_aw); - rtb_y_fd = (rtb_GreaterThan3_tmp && rtb_AND1_c0); - rtb_y_da = (rtb_y_c && rtb_y_nlq && (rtb_y_fd && rtb_NOT3_tmp_0 && rtb_appInop_idx_2) && rtb_GreaterThan3 && - (!rtb_y_ff)); + rtb_Compare_du = (rtb_GreaterThan3_tmp_0 && rtb_AND1_c0); + rtb_y_da = (rtb_y_a0_tmp && rtb_y_nlq && (rtb_Compare_du && rtb_NOT3_tmp_0 && + rtb_TmpSignalConversionAtSFunctionInport3_idx_0) && rtb_GreaterThan3 && (!rtb_y_ff)); FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active), FmgcComputer_P.PulseNode5_isRisingEdge_h, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_aj); - rtb_GreaterThan3_tmp = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active; + rtb_GreaterThan3_tmp_0 = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active; Memory_PreviousInput_k_tmp_tmp_0 = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active; rtb_GreaterThan3 = (rtb_GreaterThan3 && rtb_y_ff && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && - (rtb_y_fd && rtb_GreaterThan3_tmp && Memory_PreviousInput_k_tmp_tmp_0 && rtb_appInop_idx_2)); - rtb_y_fd = rtb_y_c; + (rtb_Compare_du && rtb_GreaterThan3_tmp_0 && Memory_PreviousInput_k_tmp_tmp_0 && + rtb_TmpSignalConversionAtSFunctionInport3_idx_0)); + rtb_Compare_a5 = rtb_y_a0_tmp; FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode2_isRisingEdge_b, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_at); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel5_bit_f, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_j, &rtb_y_fd, - &FmgcComputer_DWork.sf_MATLABFunction_o3); + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_j, + &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_o3); rtb_NOT3_tmp = !FmgcComputer_U.in.fms_inputs.lateral_flight_plan_valid; - rtb_Compare_bj = ((FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && rtb_NOT3_tmp && rtb_y_ai) || rtb_y_da - || rtb_GreaterThan3 || (rtb_y_c && rtb_NOT_c && rtb_y_ff) || + rtb_Compare_du = ((FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && rtb_NOT3_tmp && rtb_Compare_kg) || + rtb_y_da || rtb_GreaterThan3 || (rtb_y_a0_tmp && rtb_NOT_gj && rtb_y_ff) || (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active && rtb_y_fd)); + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active && rtb_Compare_a5)); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel_bit_pg, &rtb_DataTypeConversion1_e); - rtb_y_fd = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_a5 = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel1_bit_ok, &rtb_DataTypeConversion1_e); - rtb_y_fd = (rtb_y_fd || (rtb_DataTypeConversion1_e != 0U)); + rtb_Compare_a5 = (rtb_Compare_a5 || (rtb_DataTypeConversion1_e != 0U)); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel2_bit_i, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_i, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_di2); - rtb_GreaterThan3 = (rtb_y_hb && rtb_y_ff && rtb_appInop_idx_2 && (rtb_AND1_c0 || (rtb_raComputationData >= - FmgcComputer_P.CompareToConstant_const_a))); + rtb_GreaterThan3 = (rtb_y_hb && rtb_y_ff && rtb_TmpSignalConversionAtSFunctionInport3_idx_0 && (rtb_AND1_c0 || + (rtb_raComputationData >= FmgcComputer_P.CompareToConstant_const_a))); rtb_y_nlq = rtb_OR_m4; - FmgcComputer_MATLABFunction_g(apCondition, FmgcComputer_P.PulseNode4_isRisingEdge_e, &rtb_y_ff, + FmgcComputer_MATLABFunction_g(rtb_y_fd, FmgcComputer_P.PulseNode4_isRisingEdge_e, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_a5); - rtb_y_hy = !FmgcComputer_DWork.Delay_DSTATE.any_lateral_mode_engaged; - rtb_y_oi = (rtb_y_hy && rtb_OR2_l_tmp); - rtb_y_da = ((rtb_y_fd && rtb_OR2_l) || (rtb_y_e && (rtb_GreaterThan3 || (rtb_OR_m4 && rtb_y_ff && rtb_y_oi) || - rtb_Compare_bj))); + rtb_y_lh_tmp = !FmgcComputer_DWork.Delay_DSTATE.any_lateral_mode_engaged; + rtb_y_oi = (rtb_y_lh_tmp && rtb_y_c); + rtb_y_da = ((rtb_Compare_a5 && rtb_OR2_l) || (rtb_y_e && (rtb_GreaterThan3 || (rtb_OR_m4 && rtb_y_ff && rtb_y_oi) || + rtb_Compare_du))); FmgcComputer_MATLABFunction_a(rtb_y_da, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_a, FmgcComputer_P.ConfirmNode_timeDelay_a2, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_hdw); FmgcComputer_DWork.Memory_PreviousInput_f2 = FmgcComputer_P.Logic_table_i[(((((!rtb_y_ff) && (rtb_AND9 || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_OR_bg) + (static_cast(rtb_y_da) << 1)) + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_y_hy) + (static_cast(rtb_y_da) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_f2]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_k, &rtb_DataTypeConversion1_e); rtb_y_da = ((rtb_DataTypeConversion1_e != 0U) && FmgcComputer_DWork.Memory_PreviousInput_f2); rtb_AND9 = (FmgcComputer_DWork.Memory_PreviousInput_f2 && (rtb_DataTypeConversion1_e == 0U)); - rtb_OR2_l_tmp_0 = rtb_Compare_bj; + rtb_OR2_l_tmp_0 = rtb_Compare_du; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_fu, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel2_bit_m, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_j, &rtb_y_nlq, @@ -2107,10 +2116,10 @@ void FmgcComputer::step() FmgcComputer_U.in.time.dt, &rtb_y_oi, FmgcComputer_P.MTrigNode_isRisingEdge_i, FmgcComputer_P.MTrigNode_retriggerable_a, FmgcComputer_P.MTrigNode_triggerDuration_l, &FmgcComputer_DWork.sf_MATLABFunction_fi); - rtb_Compare_bj = ((rtb_Compare_bj && rtb_OR2_l) || (rtb_y_i2 && ((rtb_GreaterThan3_tmp && - Memory_PreviousInput_k_tmp_tmp_0 && rtb_appInop_idx_2 && rtb_y_nlq) || (rtb_y_p && rtb_NOT_b && (rtb_y_hy || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_loc_submode_active)) || rtb_y_ff || (rtb_y_oi && - rtb_GreaterThan3)))); + rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || (rtb_y_i2 && ((rtb_GreaterThan3_tmp_0 && + Memory_PreviousInput_k_tmp_tmp_0 && rtb_TmpSignalConversionAtSFunctionInport3_idx_0 && rtb_y_nlq) || (rtb_y_p && + rtb_NOT_b && (rtb_y_lh_tmp || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_loc_submode_active)) || rtb_y_ff || + (rtb_y_oi && rtb_GreaterThan3)))); FmgcComputer_MATLABFunction_g(FmgcComputer_DWork.Delay_DSTATE.hdg_trk_preset_available, FmgcComputer_P.PulseNode2_isRisingEdge_i, &rtb_y_nlq, &FmgcComputer_DWork.sf_MATLABFunction_h0); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, @@ -2124,26 +2133,27 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_g(FmgcComputer_DWork.Memory_PreviousInput_dv, FmgcComputer_P.PulseNode5_isRisingEdge_a, &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_ew); FmgcComputer_DWork.Memory_PreviousInput_i1 = FmgcComputer_P.Logic_table_g[(((rtb_y_nlq || rtb_y_oi || rtb_y_ff || - rtb_NOT3_tmp || rtb_GreaterThan3 || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || rtb_OR_bg) + ( - static_cast(rtb_Compare_bj) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_i1]; + rtb_NOT3_tmp || rtb_GreaterThan3 || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || + rtb_appCapability_idx_2) + (static_cast(rtb_Compare_du) << 1)) << 1) + + FmgcComputer_DWork.Memory_PreviousInput_i1]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel_bit_nk, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_m(FmgcComputer_U.in.fms_inputs.direct_to_nav_engage, FmgcComputer_U.in.time.dt, &rtb_y_ff, FmgcComputer_P.MTrigNode_isRisingEdge_h, FmgcComputer_P.MTrigNode_retriggerable_g, FmgcComputer_P.MTrigNode_triggerDuration_e, &FmgcComputer_DWork.sf_MATLABFunction_prl); - rtb_y_fd = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && + rtb_Compare_a5 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && FmgcComputer_U.in.fms_inputs.nav_capture_condition && (FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed || rtb_y_ff) && ((rtb_raComputationData >= FmgcComputer_P.CompareToConstant_const_oh) || rtb_dualRaFailure) && (rtb_AND1_c0 || (rtb_raComputationData >= FmgcComputer_P.CompareToConstant1_const_b)))); - FmgcComputer_MATLABFunction_a(rtb_y_fd, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_co, + FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_co, FmgcComputer_P.ConfirmNode_timeDelay_d1, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_ge4); - FmgcComputer_DWork.Memory_PreviousInput_ip = FmgcComputer_P.Logic_table_a[(((rtb_NOT3_tmp || rtb_OR_bg || + FmgcComputer_DWork.Memory_PreviousInput_ip = FmgcComputer_P.Logic_table_a[(((rtb_NOT3_tmp || rtb_y_hy || ((Memory_PreviousInput_d_tmp || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_ff))) + ( - static_cast(rtb_y_fd) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ip]; + static_cast(rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ip]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_o, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); - rtb_y_fd = rtb_y_e; + rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_a5 = rtb_y_e; FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active), FmgcComputer_P.PulseNode1_isRisingEdge_cs, &rtb_y_i2, &FmgcComputer_DWork.sf_MATLABFunction_ma); @@ -2151,39 +2161,38 @@ void FmgcComputer::step() FmgcComputer_P.BitfromLabel1_bit_ls, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode2_isRisingEdge_o, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_k4c); - rtb_NOT_b = rtb_appCapability_idx_0; - rtb_AND1_c0 = (rtb_y_ff && rtb_appCapability_idx_0 && (rtb_raComputationData >= - FmgcComputer_P.CompareToConstant_const_m) && ((FmgcComputer_P.EnumeratedConstant_Value_a != - FmgcComputer_U.in.fms_inputs.fms_flight_phase) && (FmgcComputer_U.in.fms_inputs.fms_flight_phase != - FmgcComputer_P.EnumeratedConstant1_Value_dg))); + rtb_NOT_b = rtb_OR_bg; + rtb_AND1_c0 = (rtb_y_ff && rtb_OR_bg && (rtb_raComputationData >= FmgcComputer_P.CompareToConstant_const_m) && + ((FmgcComputer_P.EnumeratedConstant_Value_a != FmgcComputer_U.in.fms_inputs.fms_flight_phase) && + (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant1_Value_dg))); FmgcComputer_MATLABFunction_a(rtb_AND1_c0, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_n, FmgcComputer_P.ConfirmNode_timeDelay_g, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_ah); FmgcComputer_MATLABFunction_g(FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed, - FmgcComputer_P.PulseNode_isRisingEdge_g, &rtb_y_fd, &FmgcComputer_DWork.sf_MATLABFunction_ol); - rtb_NOT_c = (rtb_NOT_c && rtb_y_ff && FmgcComputer_DWork.Delay_DSTATE.armed_modes.loc_armed); + FmgcComputer_P.PulseNode_isRisingEdge_g, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_ol); + rtb_NOT_gj = (rtb_NOT_gj && rtb_y_ff && FmgcComputer_DWork.Delay_DSTATE.armed_modes.loc_armed); FmgcComputer_MATLABFunction_g(FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed, FmgcComputer_P.PulseNode3_isRisingEdge_d, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_mne); - FmgcComputer_DWork.Memory_PreviousInput_a = FmgcComputer_P.Logic_table_ku[(((((!rtb_NOT_b) && rtb_y_fd) || + FmgcComputer_DWork.Memory_PreviousInput_a = FmgcComputer_P.Logic_table_ku[(((((!rtb_NOT_b) && rtb_Compare_a5) || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || rtb_NOT_c || rtb_y_ff) + (static_cast< - uint32_T>((rtb_Compare_bj && rtb_OR2_l) || (rtb_y_e && (rtb_y_i2 || rtb_AND1_c0))) << 1)) << 1) + + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || rtb_NOT_gj || rtb_y_ff) + ( + static_cast((rtb_Compare_du && rtb_OR2_l) || (rtb_y_e && (rtb_y_i2 || rtb_AND1_c0))) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_a]; - rtb_BusAssignment_k_logic_ir_computation_data_heading_magnetic_deg.SSM = + rtb_BusAssignment_kv_logic_ir_computation_data_heading_magnetic_deg.SSM = rtb_irComputationBus_heading_magnetic_deg_SSM; - rtb_BusAssignment_k_logic_ir_computation_data_heading_magnetic_deg.Data = + rtb_BusAssignment_kv_logic_ir_computation_data_heading_magnetic_deg.Data = rtb_irComputationBus_heading_magnetic_deg_Data; - rtb_BusAssignment_k_logic_ir_computation_data_roll_angle_deg.SSM = rtb_irComputationBus_roll_angle_deg_SSM; - rtb_BusAssignment_k_logic_ir_computation_data_roll_angle_deg.Data = rtb_irComputationBus_roll_angle_deg_Data; - rtb_BusAssignment_k_logic_ils_computation_data_localizer_deviation_deg.SSM = rtb_y; - rtb_BusAssignment_k_logic_ils_computation_data_localizer_deviation_deg.Data = rtb_DataTypeConversion2_bh; + rtb_BusAssignment_kv_logic_ir_computation_data_roll_angle_deg.SSM = rtb_irComputationBus_roll_angle_deg_SSM; + rtb_BusAssignment_kv_logic_ir_computation_data_roll_angle_deg.Data = rtb_irComputationBus_roll_angle_deg_Data; + rtb_BusAssignment_kv_logic_ils_computation_data_localizer_deviation_deg.SSM = rtb_y; + rtb_BusAssignment_kv_logic_ils_computation_data_localizer_deviation_deg.Data = rtb_DataTypeConversion2_bh; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel_bit_j, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction(&rtb_BusAssignment_k_logic_ir_computation_data_heading_magnetic_deg, + FmgcComputer_MATLABFunction(&rtb_BusAssignment_kv_logic_ir_computation_data_heading_magnetic_deg, FmgcComputer_P.A429ValueOrDefault2_defaultValue_j, &rtb_y_gtq); - FmgcComputer_MATLABFunction(&rtb_BusAssignment_k_logic_ils_computation_data_localizer_deviation_deg, + FmgcComputer_MATLABFunction(&rtb_BusAssignment_kv_logic_ils_computation_data_localizer_deviation_deg, FmgcComputer_P.A429ValueOrDefault_defaultValue_o, &rtb_y_fl); - FmgcComputer_MATLABFunction(&rtb_BusAssignment_k_logic_ir_computation_data_roll_angle_deg, + FmgcComputer_MATLABFunction(&rtb_BusAssignment_kv_logic_ir_computation_data_roll_angle_deg, FmgcComputer_P.A429ValueOrDefault1_defaultValue_o, &rtb_y_jq); rtb_DataTypeConversion2_kb = (rtb_y_gtq - static_cast(FmgcComputer_B.u_lyjj + 360.0)) + 360.0F; if (rtb_DataTypeConversion2_kb == 0.0F) { @@ -2224,7 +2233,7 @@ void FmgcComputer::step() guard1 = false; if (rtb_DataTypeConversion1_d > 5.0) { if (std::abs(rtb_y_jq) <= 5.0F) { - rtb_y_fd = true; + rtb_Compare_a5 = true; } else { if (rtb_y_jq < 0.0F) { absVsTarget = -1; @@ -2233,7 +2242,7 @@ void FmgcComputer::step() } if (low_ip1 != absVsTarget) { - rtb_y_fd = true; + rtb_Compare_a5 = true; } else { guard1 = true; } @@ -2249,10 +2258,10 @@ void FmgcComputer::step() absVsTarget = (rtb_y_jq > 0.0F); } - rtb_y_fd = ((rtb_DataTypeConversion1_d >= std::abs(rtb_y_jq)) && (low_ip1 == absVsTarget)); + rtb_Compare_a5 = ((rtb_DataTypeConversion1_d >= std::abs(rtb_y_jq)) && (low_ip1 == absVsTarget)); } } else { - rtb_y_fd = false; + rtb_Compare_a5 = false; } rtb_DataTypeConversion2_kb = std::abs(rtb_y_gtq); @@ -2264,31 +2273,32 @@ void FmgcComputer::step() low_ip1 = (rtb_y_fl > 0.0F); } - if (((rtb_DataTypeConversion2_kb > 25.0F) && ((rtb_y_jq < 10.0F) && ((high_i != low_ip1) && rtb_y_fd))) || + if (((rtb_DataTypeConversion2_kb > 25.0F) && ((rtb_y_jq < 10.0F) && ((high_i != low_ip1) && rtb_Compare_a5))) || (rtb_y_jq < 1.92)) { - rtb_y_fd = (rtb_y_fd || ((rtb_DataTypeConversion2_kb < 15.0F) && (rtb_y_jq < 1.1))); + rtb_Compare_a5 = (rtb_Compare_a5 || ((rtb_DataTypeConversion2_kb < 15.0F) && (rtb_y_jq < 1.1))); } else { - rtb_y_fd = false; + rtb_Compare_a5 = false; } } else { - rtb_y_fd = false; + rtb_Compare_a5 = false; } - FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_k_logic_ils_computation_data_localizer_deviation_deg, &rtb_AND1_c0); - rtb_y_fd = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && - FmgcComputer_DWork.Delay_DSTATE.armed_modes.loc_armed && rtb_y_fd && rtb_AND1_c0)); - FmgcComputer_MATLABFunction_a(rtb_y_fd, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_at, + FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_kv_logic_ils_computation_data_localizer_deviation_deg, + &rtb_AND1_c0); + rtb_Compare_a5 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && + FmgcComputer_DWork.Delay_DSTATE.armed_modes.loc_armed && rtb_Compare_a5 && rtb_AND1_c0)); + FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_at, FmgcComputer_P.ConfirmNode_timeDelay_h4, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_p4); - rtb_Compare_bj = (Memory_PreviousInput_d_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active); - FmgcComputer_DWork.Memory_PreviousInput_cv = FmgcComputer_P.Logic_table_g4[(((((!rtb_y_ff) && (rtb_Compare_bj || + rtb_Compare_du = (Memory_PreviousInput_d_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active); + FmgcComputer_DWork.Memory_PreviousInput_cv = FmgcComputer_P.Logic_table_g4[(((((!rtb_y_ff) && (rtb_Compare_du || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_OR_bg) + (static_cast(rtb_y_fd) << 1)) - << 1) + FmgcComputer_DWork.Memory_PreviousInput_cv]; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_y_hy) + (static_cast(rtb_Compare_a5) << + 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_cv]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel_bit_es, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction(&rtb_BusAssignment_k_logic_ils_computation_data_localizer_deviation_deg, + FmgcComputer_MATLABFunction(&rtb_BusAssignment_kv_logic_ils_computation_data_localizer_deviation_deg, FmgcComputer_P.A429ValueOrDefault_defaultValue_b, &rtb_y_gtq); if (rtb_y_gtq < 0.0F) { rtb_DataTypeConversion1_d = -rtb_y_gtq; @@ -2299,16 +2309,16 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_a((rtb_DataTypeConversion1_d < FmgcComputer_P.CompareToConstant1_const_n), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_nd, FmgcComputer_P.ConfirmNode_timeDelay_e, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_is); - rtb_y_fd = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && + rtb_Compare_a5 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active && rtb_y_ff)); - FmgcComputer_MATLABFunction_a(rtb_y_fd, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ea, + FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ea, FmgcComputer_P.ConfirmNode_timeDelay_es, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_pr); - FmgcComputer_DWork.Memory_PreviousInput_lq = FmgcComputer_P.Logic_table_j[(((((!rtb_y_ff) && (rtb_Compare_bj || + FmgcComputer_DWork.Memory_PreviousInput_lq = FmgcComputer_P.Logic_table_j[(((((!rtb_y_ff) && (rtb_Compare_du || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_OR_bg) + (static_cast(rtb_y_fd) << 1)) - << 1) + FmgcComputer_DWork.Memory_PreviousInput_lq]; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_y_hy) + (static_cast(rtb_Compare_a5) << + 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_lq]; rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft.SSM = rtb_adrComputationBus_altitude_corrected_ft_SSM; rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft.Data = @@ -2354,19 +2364,19 @@ void FmgcComputer::step() } rtb_y_nlq = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_hold_active; - rtb_appCapability_idx_0 = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active; + rtb_OR_bg = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active; Memory_PreviousInput_d_tmp_tmp = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active; rtb_AND1_c0 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active) && rtb_y_nlq && - Memory_PreviousInput_d_tmp_tmp && rtb_appCapability_idx_0 && rtb_y_ai && rtb_appInop_idx_2 && ((!rtb_y_ga) || - (rtb_AND12 && rtb_Compare_c1)) && ((!rtb_y_hy) || (rtb_DataTypeConversion2_kb <= - FmgcComputer_P.CompareToConstant2_const_jy)) && apCondition && FmgcComputer_DWork.Memory_PreviousInput_n)); + Memory_PreviousInput_d_tmp_tmp && rtb_OR_bg && rtb_Compare_kg && rtb_TmpSignalConversionAtSFunctionInport3_idx_0 && + ((!rtb_y_ga) || (rtb_GreaterThan3_tmp && rtb_Compare_b)) && ((!rtb_y_hy) || (rtb_DataTypeConversion2_kb <= + FmgcComputer_P.CompareToConstant2_const_jy)) && rtb_y_fd && FmgcComputer_DWork.Memory_PreviousInput_n)); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_ng, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_n, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_Compare_bj && (rtb_DataTypeConversion1_e != 0U)); + rtb_Compare_du = (rtb_Compare_du && (rtb_DataTypeConversion1_e != 0U)); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_f, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_m((rtb_DataTypeConversion1_e != 0U), FmgcComputer_U.in.time.dt, &rtb_y_ff, @@ -2413,34 +2423,35 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel7_bit_j, &rtb_DataTypeConversion1_e); rtb_y_oi = rtb_y_lh; - rtb_y_fd = ((rtb_Compare_bj && rtb_OR2_l) || (rtb_y_e && rtb_NOT_b && ((rtb_raComputationData >= - FmgcComputer_P.CompareToConstant_const_l5) || (rtb_OR2_l_tmp && rtb_TmpSignalConversionAtSFunctionInport3_idx_2)) && - (rtb_Compare_c1 || ((rtb_DataTypeConversion1_e == 0U) && (FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode == + rtb_Compare_a5 = ((rtb_Compare_du && rtb_OR2_l) || (rtb_y_e && rtb_NOT_b && ((rtb_raComputationData >= + FmgcComputer_P.CompareToConstant_const_l5) || (rtb_y_c && rtb_Compare_d0)) && (rtb_Compare_b || + ((rtb_DataTypeConversion1_e == 0U) && (FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode == FmgcComputer_P.EnumeratedConstant3_Value_l) && (!rtb_y_lh))))); - FmgcComputer_MATLABFunction_a(rtb_y_fd, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_hux, + FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_hux, FmgcComputer_P.ConfirmNode_timeDelay_lk, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_hw); - FmgcComputer_DWork.Memory_PreviousInput_ne = FmgcComputer_P.Logic_table_nz[(((rtb_OR_bg || ((absVsTarget_tmp || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_ff))) + (static_cast(rtb_y_fd) << - 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ne]; - rtb_NOT_c = rtb_NOT_b; + FmgcComputer_DWork.Memory_PreviousInput_ne = FmgcComputer_P.Logic_table_nz + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_AND12 || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_ff))) + (static_cast + (rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ne]; + rtb_NOT_gj = rtb_NOT_b; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_p2, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_fr, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_Compare_bj && (rtb_DataTypeConversion1_e != 0U)); + rtb_Compare_du = (rtb_Compare_du && (rtb_DataTypeConversion1_e != 0U)); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault1_defaultValue_g, &rtb_y_gtq); FmgcComputer_MATLABFunction_a((std::abs(rtb_altCstrOrFcu - rtb_y_gtq) < FmgcComputer_P.CompareToConstant_const_f), @@ -2448,36 +2459,37 @@ void FmgcComputer::step() &rtb_y_oi, &FmgcComputer_DWork.sf_MATLABFunction_ee); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel7_bit_k, &rtb_DataTypeConversion1_e); - rtb_y_fd = ((rtb_Compare_bj && rtb_OR2_l) || (rtb_y_e && - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active && rtb_y_oi && (rtb_Compare_c1 || + rtb_Compare_a5 = ((rtb_Compare_du && rtb_OR2_l) || (rtb_y_e && + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active && rtb_y_oi && (rtb_Compare_b || ((rtb_DataTypeConversion1_e == 0U) && (FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode == FmgcComputer_P.EnumeratedConstant3_Value_p) && raOwnInvalid)))); - FmgcComputer_MATLABFunction_a(rtb_y_fd, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_lj, + FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_lj, FmgcComputer_P.ConfirmNode_timeDelay_bd, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_dt); - FmgcComputer_DWork.Memory_PreviousInput_cb = FmgcComputer_P.Logic_table_ob[(((rtb_OR_bg || - ((Memory_PreviousInput_k_tmp_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_ff))) + (static_cast(rtb_y_fd) << - 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_cb]; + FmgcComputer_DWork.Memory_PreviousInput_cb = FmgcComputer_P.Logic_table_ob + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((Memory_PreviousInput_k_tmp_tmp_tmp || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_ff))) + (static_cast + (rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_cb]; FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault3_defaultValue_m, &rtb_y_gtq); - rtb_y_fd = rtb_y_nlq; + rtb_Compare_a5 = rtb_y_nlq; FmgcComputer_DWork.Memory_PreviousInput_no = FmgcComputer_P.Logic_table_ay[(((static_cast(std::abs (FmgcComputer_U.in.fms_inputs.cruise_alt_ft - rtb_y_gtq) < FmgcComputer_P.CompareToConstant1_const_a) << 1) + rtb_y_nlq) << 1) + FmgcComputer_DWork.Memory_PreviousInput_no]; - rtb_NOT3_tmp = !rtb_AND_iz; - rtb_Compare_c1 = (FmgcComputer_DWork.Memory_PreviousInput_cb && rtb_NOT3_tmp && - FmgcComputer_DWork.Memory_PreviousInput_no); + rtb_NOT3_tmp = !rtb_AND_j; + rtb_Compare_b = (FmgcComputer_DWork.Memory_PreviousInput_cb && rtb_NOT3_tmp && + FmgcComputer_DWork.Memory_PreviousInput_no); rtb_BusAssignment_o3_logic_adr_computation_data_airspeed_computed_kn.SSM = rtb_adrComputationBus_airspeed_computed_kn_SSM; rtb_BusAssignment_o3_logic_adr_computation_data_airspeed_computed_kn.Data = rtb_Max_a; @@ -2486,18 +2498,18 @@ void FmgcComputer::step() rtb_BusAssignment_o3_logic_chosen_fac_bus_v_max_kn.SSM = rtb_Switch_v_max_kn_SSM; rtb_BusAssignment_o3_logic_chosen_fac_bus_v_max_kn.Data = rtb_Switch_v_max_kn_Data; Memory_PreviousInput_k_tmp_tmp_tmp = rtb_y_oi; - rtb_Compare_bj = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || + rtb_Compare_du = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active); FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active), FmgcComputer_P.PulseNode3_isRisingEdge_n, &rtb_y_hy, &FmgcComputer_DWork.sf_MATLABFunction_fed); - rtb_AND12 = (rtb_Compare_bj && rtb_y_hy); + rtb_AND12 = (rtb_Compare_du && rtb_y_hy); FmgcComputer_MATLABFunction_g(FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active, - FmgcComputer_P.PulseNode4_isRisingEdge_f, &rtb_y_fd, &FmgcComputer_DWork.sf_MATLABFunction_bbb); + FmgcComputer_P.PulseNode4_isRisingEdge_f, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_bbb); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel6_bit_d, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode5_isRisingEdge_p, - &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_jc); + &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_jc); if (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active) { FmgcComputer_B.u_ly = rtb_altCstrOrFcu; } @@ -2518,33 +2530,34 @@ void FmgcComputer::step() FmgcComputer_P.BitfromLabel7_bit_o, &rtb_DataTypeConversion1_e); rtb_y_i2 = (rtb_y_lh || (FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode == FmgcComputer_P.EnumeratedConstant3_Value_ls)); - rtb_y_ff = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || + rtb_y_hy = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active); - rtb_NOT_b = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active); - rtb_y_ga = (rtb_NOT3_tmp_0 && rtb_GreaterThan3_tmp && Memory_PreviousInput_k_tmp_tmp_0); - rtb_Compare_bj = (rtb_AND12 || (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active && (rtb_y_fd || - rtb_Compare_bj)) || (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active && + rtb_y_ff = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active); + rtb_y_ga = (rtb_NOT3_tmp_0 && rtb_GreaterThan3_tmp_0 && Memory_PreviousInput_k_tmp_tmp_0); + rtb_Compare_du = (rtb_AND12 || (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active && + (rtb_Compare_a5 || rtb_Compare_du)) || (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active && ((FmgcComputer_P.EnumeratedConstant_Value_p == FmgcComputer_U.in.fms_inputs.fms_flight_phase) || (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant1_Value_m) || (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant2_Value) || rtb_y_ga || - rtb_Compare_f)) || (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active && (std::abs - (FmgcComputer_B.u_ly - rtb_altCstrOrFcu) >= FmgcComputer_P.CompareToConstant_const_omz)) || (rtb_y_ff && - (rtb_DataTypeConversion2_bh > FmgcComputer_P.CompareToConstant1_const_o)) || (rtb_NOT_b && - (rtb_DataTypeConversion2_bh < FmgcComputer_P.CompareToConstant2_const_g)) || ((rtb_y_ff || + rtb_OR2_l_tmp)) || (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active && (std::abs + (FmgcComputer_B.u_ly - rtb_altCstrOrFcu) >= FmgcComputer_P.CompareToConstant_const_omz)) || (rtb_y_hy && + (rtb_DataTypeConversion2_bh > FmgcComputer_P.CompareToConstant1_const_o)) || (rtb_y_ff && + (rtb_DataTypeConversion2_bh < FmgcComputer_P.CompareToConstant2_const_g)) || ((rtb_y_hy || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active) && (rtb_DataTypeConversion2_kb > rtb_y_jq) && - rtb_fmgcOppPriority_tmp && FmgcComputer_DWork.Delay_DSTATE_k && FmgcComputer_P.Constant_Value_m) || (rtb_NOT_b && + rtb_fmgcOppPriority_tmp && FmgcComputer_DWork.Delay_DSTATE_k && FmgcComputer_P.Constant_Value_m) || (rtb_y_ff && (rtb_y_jq > rtb_y_gtq + FmgcComputer_P.Bias1_Bias) && rtb_fmgcOppPriority_tmp && FmgcComputer_DWork.Delay_DSTATE_k && FmgcComputer_P.Constant_Value_m) || (((rtb_DataTypeConversion1_e == 0U) || rtb_y_lh) && FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active && rtb_y_i2)); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_ax, &rtb_DataTypeConversion1_e); - rtb_y_fd = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_a5 = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_k, &rtb_DataTypeConversion1_e); - rtb_y_fd = (rtb_y_fd || (rtb_DataTypeConversion1_e != 0U)); + rtb_Compare_a5 = (rtb_Compare_a5 || (rtb_DataTypeConversion1_e != 0U)); + rtb_NOT_b = rtb_y_e; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel4_bit_g, &rtb_DataTypeConversion1_e); rtb_GreaterThan3 = (rtb_DataTypeConversion1_e != 0U); @@ -2553,40 +2566,41 @@ void FmgcComputer::step() rtb_y_nlq = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_g((rtb_GreaterThan3 || (rtb_DataTypeConversion1_e != 0U)), FmgcComputer_P.PulseNode_isRisingEdge_d, &rtb_y_nlq, &FmgcComputer_DWork.sf_MATLABFunction_nd); - rtb_GreaterThan3 = (rtb_y_hb && rtb_y_nlq && rtb_appInop_idx_2); - FmgcComputer_MATLABFunction_g(apCondition, FmgcComputer_P.PulseNode1_isRisingEdge_ky, &rtb_y_i2, + FmgcComputer_MATLABFunction_g(rtb_y_fd, FmgcComputer_P.PulseNode1_isRisingEdge_ky, &rtb_y_i2, &FmgcComputer_DWork.sf_MATLABFunction_dsw); - rtb_y_hy = !FmgcComputer_DWork.Delay_DSTATE.any_longitudinal_mode_engaged; - rtb_y_oi = rtb_y_hy; + rtb_y_lh_tmp = !FmgcComputer_DWork.Delay_DSTATE.any_longitudinal_mode_engaged; + rtb_y_oi = rtb_y_lh_tmp; FmgcComputer_MATLABFunction_a(rtb_OR_m4, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ld, FmgcComputer_P.ConfirmNode_timeDelay_op, &rtb_y_oi, &FmgcComputer_DWork.sf_MATLABFunction_cz); - rtb_y_fd = ((rtb_y_fd && rtb_OR2_l) || (rtb_y_e && (rtb_GreaterThan3 || (rtb_OR_m4 && rtb_y_i2 && rtb_y_hy) || - (rtb_y_oi && rtb_y_hy) || rtb_Compare_bj))); - FmgcComputer_MATLABFunction_a(rtb_y_fd, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_lu, - FmgcComputer_P.ConfirmNode_timeDelay_ll, &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_gbq); - FmgcComputer_DWork.Memory_PreviousInput_fg = FmgcComputer_P.Logic_table_ny[(((rtb_OR_bg || ((rtb_AND_e_tmp || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_GreaterThan3))) + (static_cast - (rtb_y_fd) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_fg]; + rtb_Compare_a5 = ((rtb_Compare_a5 && rtb_OR2_l) || (rtb_y_e && ((rtb_y_hb && rtb_y_nlq && + rtb_TmpSignalConversionAtSFunctionInport3_idx_0) || (rtb_OR_m4 && rtb_y_i2 && rtb_y_lh_tmp) || (rtb_y_oi && + rtb_y_lh_tmp) || rtb_Compare_du))); + FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_lu, + FmgcComputer_P.ConfirmNode_timeDelay_ll, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_gbq); + FmgcComputer_DWork.Memory_PreviousInput_fg = FmgcComputer_P.Logic_table_ny + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_AND_e_tmp || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_NOT_b))) + (static_cast + (rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_fg]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_e, &rtb_DataTypeConversion1_e); rtb_AND12 = ((rtb_DataTypeConversion1_e != 0U) && FmgcComputer_DWork.Memory_PreviousInput_fg); - rtb_GreaterThan3_tmp = (FmgcComputer_DWork.Memory_PreviousInput_fg && (rtb_DataTypeConversion1_e == 0U)); - Memory_PreviousInput_k_tmp_tmp_0 = rtb_Compare_bj; + rtb_GreaterThan3_tmp_0 = (FmgcComputer_DWork.Memory_PreviousInput_fg && (rtb_DataTypeConversion1_e == 0U)); + Memory_PreviousInput_k_tmp_tmp_0 = rtb_Compare_du; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_jh, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_et, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, @@ -2598,12 +2612,12 @@ void FmgcComputer::step() &FmgcComputer_DWork.sf_MATLABFunction_p3z); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault5_defaultValue_c, &rtb_y_gtq); - rtb_y_i2 = (rtb_AND_e_tmp && rtb_AND_iz); + rtb_y_i2 = (rtb_AND_e_tmp && rtb_AND_j); rtb_NOT_b = (rtb_OR_m4 && ((FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant1_Value_f) && (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant2_Value_p)) && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && rtb_y_nlq && FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && (rtb_y_i2 || (rtb_y_ff && - rtb_AND_e_tmp && (rtb_AND_iz && (std::abs(rtb_altCstrOrFcu - rtb_y_gtq) <= + rtb_AND_e_tmp && (rtb_AND_j && (std::abs(rtb_altCstrOrFcu - rtb_y_gtq) <= FmgcComputer_P.CompareToConstant2_const_d))))); rtb_GreaterThan3 = (rtb_y_p || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active); @@ -2621,11 +2635,10 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault2_defaultValue_jt, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault3_defaultValue_os, &rtb_y_gtq); - Memory_PreviousInput_d_tmp = (Memory_PreviousInput_k_tmp_tmp || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active); + rtb_y_fd = (Memory_PreviousInput_k_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active); FmgcComputer_DWork.Memory_PreviousInput_ma = FmgcComputer_P.Logic_table_ns[((((rtb_GreaterThan3 && (!rtb_y_nlq)) || - (Memory_PreviousInput_d_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || + (rtb_y_fd || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || @@ -2634,17 +2647,20 @@ void FmgcComputer::step() ((FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_hold_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active) && rtb_NOT3_tmp) || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active) || (rtb_y_jq < rtb_y_gtq) || (rtb_AND_e_tmp && - (rtb_NOT3_tmp || rtb_NOT3_tmp_0 || rtb_Compare_f)) || ((FmgcComputer_U.in.fms_inputs.fms_flight_phase == + (rtb_NOT3_tmp || rtb_NOT3_tmp_0 || rtb_OR2_l_tmp)) || ((FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant3_Value) || (FmgcComputer_U.in.fms_inputs.fms_flight_phase == - FmgcComputer_P.EnumeratedConstant4_Value)) || rtb_OR_bg) + (static_cast((rtb_Compare_bj && rtb_OR2_l) || - (rtb_y_e && (rtb_NOT_b || (rtb_GreaterThan3 && rtb_y_nlq)))) << 1)) << 1) + + FmgcComputer_P.EnumeratedConstant4_Value)) || rtb_appCapability_idx_2) + (static_cast((rtb_Compare_du && + rtb_OR2_l) || (rtb_y_e && (rtb_NOT_b || (rtb_GreaterThan3 && rtb_y_nlq)))) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ma]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_g3, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_is, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_Compare_bj && (rtb_DataTypeConversion1_e == 0U)); + rtb_Compare_a5 = (rtb_DataTypeConversion1_e == 0U); + FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, + FmgcComputer_P.BitfromLabel4_bit_b, &rtb_DataTypeConversion1_e); + rtb_Compare_du = (rtb_Compare_du && rtb_Compare_a5 && (rtb_DataTypeConversion1_e == 0U)); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_h, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, @@ -2662,33 +2678,33 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault5_defaultValue_d, &rtb_y_gtq); rtb_y_hy = (rtb_NOT3_tmp || (std::abs(rtb_altCstrOrFcu - rtb_y_gtq) > FmgcComputer_P.CompareToConstant2_const_a)); - Memory_PreviousInput_k_tmp_tmp = (rtb_y_e && FmgcComputer_DWork.Delay_DSTATE.armed_modes.alt_acq_arm_possible && - rtb_y_hb); - rtb_y_fd = ((rtb_Compare_bj && rtb_OR2_l) || (Memory_PreviousInput_k_tmp_tmp && (rtb_appInop_idx_2 && - rtb_appCapability_idx_0) && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && + rtb_NOT_b = (rtb_y_e && FmgcComputer_DWork.Delay_DSTATE.armed_modes.alt_acq_arm_possible && rtb_y_hb); + rtb_Compare_a5 = ((rtb_Compare_du && rtb_OR2_l) || (rtb_NOT_b && (rtb_TmpSignalConversionAtSFunctionInport3_idx_0 && + rtb_OR_bg) && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && rtb_GreaterThan3 && ((FmgcComputer_P.EnumeratedConstant_Value_pq != FmgcComputer_U.in.fms_inputs.fms_flight_phase) && (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant1_Value_iv)) && ((FmgcComputer_DWork.Delay_DSTATE.armed_modes.clb_armed && rtb_y_oi) || (rtb_y_ff && ((!rtb_AND_e_tmp) || (rtb_AND_e_tmp && (!FmgcComputer_DWork.Delay_DSTATE.armed_modes.clb_armed) && rtb_y_hy)))))); - FmgcComputer_MATLABFunction_a(rtb_y_fd, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_fc, + FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_fc, FmgcComputer_P.ConfirmNode_timeDelay_nn, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_ir); - absVsTarget_tmp = (rtb_Compare_jz || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active); - FmgcComputer_DWork.Memory_PreviousInput_ec = FmgcComputer_P.Logic_table_kw[(((rtb_OR_bg || ((absVsTarget_tmp || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_ff))) + (static_cast(rtb_y_fd) << - 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ec]; + rtb_GreaterThan3_tmp = (absVsTarget_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active); + FmgcComputer_DWork.Memory_PreviousInput_ec = FmgcComputer_P.Logic_table_kw + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_GreaterThan3_tmp || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_ff))) + (static_cast + (rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ec]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_cq, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_nh, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, @@ -2700,16 +2716,16 @@ void FmgcComputer::step() &FmgcComputer_DWork.sf_MATLABFunction_mrk); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault5_defaultValue_k, &rtb_y_gtq); - rtb_Compare_bj = ((rtb_Compare_bj && rtb_OR2_l) || (rtb_y_e && ((FmgcComputer_U.in.fms_inputs.fms_flight_phase != + rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || (rtb_y_e && ((FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant1_Value_c) && (FmgcComputer_U.in.fms_inputs.fms_flight_phase != - FmgcComputer_P.EnumeratedConstant2_Value_pi) && rtb_GreaterThan3 && rtb_AND_e_tmp_0 && - FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && (rtb_y_i2 || (rtb_y_hy && rtb_AND_e_tmp && (rtb_AND_iz && + FmgcComputer_P.EnumeratedConstant2_Value_pi) && rtb_GreaterThan3 && rtb_y_ai && + FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && (rtb_y_i2 || (rtb_y_hy && rtb_AND_e_tmp && (rtb_AND_j && (std::abs(rtb_altCstrOrFcu - rtb_y_gtq) <= FmgcComputer_P.CompareToConstant2_const_e))))))); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault2_defaultValue_cj, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault3_defaultValue_b, &rtb_y_gtq); - FmgcComputer_DWork.Memory_PreviousInput_nt = FmgcComputer_P.Logic_table_he[(((Memory_PreviousInput_d_tmp || + FmgcComputer_DWork.Memory_PreviousInput_nt = FmgcComputer_P.Logic_table_he[(((rtb_y_fd || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || @@ -2720,15 +2736,18 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || (rtb_y_jq > rtb_y_gtq) || rtb_y_ga || ((FmgcComputer_P.EnumeratedConstant_Value_b == FmgcComputer_U.in.fms_inputs.fms_flight_phase) || (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant5_Value) || - (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant6_Value)) || rtb_Compare_f || - (rtb_AND_e_tmp && rtb_NOT3_tmp) || rtb_OR_bg) + (static_cast(rtb_Compare_bj) << 1)) << 1) + - FmgcComputer_DWork.Memory_PreviousInput_nt]; + (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant6_Value)) || rtb_OR2_l_tmp || + (rtb_AND_e_tmp && rtb_NOT3_tmp) || rtb_appCapability_idx_2) + (static_cast(rtb_Compare_du) << 1)) << 1) + + FmgcComputer_DWork.Memory_PreviousInput_nt]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_mi, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_j, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_Compare_bj && (rtb_DataTypeConversion1_e == 0U)); + rtb_Compare_a5 = (rtb_DataTypeConversion1_e == 0U); + FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, + FmgcComputer_P.BitfromLabel4_bit_f, &rtb_DataTypeConversion1_e); + rtb_Compare_du = (rtb_Compare_du && rtb_Compare_a5 && (rtb_DataTypeConversion1_e == 0U)); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_mo, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, @@ -2741,38 +2760,38 @@ void FmgcComputer::step() rtb_y_hy = !FmgcComputer_DWork.Delay_DSTATE.armed_modes.des_armed; FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault5_defaultValue_m, &rtb_y_gtq); - rtb_y_fd = ((rtb_Compare_bj && rtb_OR2_l) || (Memory_PreviousInput_k_tmp_tmp && (rtb_appCapability_idx_0 && - rtb_appInop_idx_2 && rtb_y_me && rtb_y_ai && rtb_OR2_l_tmp && rtb_TmpSignalConversionAtSFunctionInport3_idx_2) && - rtb_AND_e_tmp_0 && FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && rtb_y_nlq && + rtb_Compare_a5 = ((rtb_Compare_du && rtb_OR2_l) || (rtb_NOT_b && (rtb_OR_bg && + rtb_TmpSignalConversionAtSFunctionInport3_idx_0 && rtb_y_me && rtb_Compare_kg && rtb_y_c && rtb_Compare_d0) && + rtb_y_ai && FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && rtb_y_nlq && ((FmgcComputer_P.EnumeratedConstant_Value_m != FmgcComputer_U.in.fms_inputs.fms_flight_phase) && (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant1_Value_k) && (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant2_Value_pw)) && ((FmgcComputer_DWork.Delay_DSTATE.armed_modes.des_armed && (FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft != FmgcComputer_DWork.DelayInput1_DSTATE_n)) || (rtb_y_ff && ((!rtb_AND_e_tmp) || (rtb_AND_e_tmp && rtb_y_hy && (rtb_NOT3_tmp || (std::abs(rtb_altCstrOrFcu - rtb_y_gtq) > FmgcComputer_P.CompareToConstant2_const_l)))))))); - FmgcComputer_MATLABFunction_a(rtb_y_fd, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_j, + FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_j, FmgcComputer_P.ConfirmNode_timeDelay_dy, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_n5); - rtb_y_ga = (absVsTarget_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active); - rtb_NOT3_tmp = (rtb_y_ga || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active); - rtb_AND_e_tmp = (rtb_NOT3_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active); - FmgcComputer_DWork.Memory_PreviousInput_b3 = FmgcComputer_P.Logic_table_cv[(((rtb_OR_bg || ((rtb_AND_e_tmp || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_ff))) + (static_cast(rtb_y_fd) << - 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_b3]; + rtb_y_c = (absVsTarget_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active); + rtb_y_ga = (rtb_y_c || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active); + rtb_NOT3_tmp = (rtb_y_ga || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active); + FmgcComputer_DWork.Memory_PreviousInput_b3 = FmgcComputer_P.Logic_table_cv + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_NOT3_tmp || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_ff))) + (static_cast + (rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_b3]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_nv, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_i1, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_Compare_bj && (rtb_DataTypeConversion1_e != 0U)); - rtb_NOT_b = rtb_appInop_idx_2; + rtb_Compare_du = (rtb_Compare_du && (rtb_DataTypeConversion1_e != 0U)); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_ht, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, @@ -2782,7 +2801,7 @@ void FmgcComputer::step() FmgcComputer_P.BitfromLabel4_bit_d, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_n, &rtb_y_hy, &FmgcComputer_DWork.sf_MATLABFunction_f0h); - rtb_y_fd = rtb_Compare_f; + rtb_y_fd = rtb_OR2_l_tmp; rtb_y_oi = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active); @@ -2792,34 +2811,35 @@ void FmgcComputer::step() rtb_y_nlq = ((FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active && ((FmgcComputer_P.EnumeratedConstant_Value_c == FmgcComputer_U.in.fms_inputs.fms_flight_phase) || (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant1_Value_c5) || - rtb_NOT3_tmp_0 || rtb_Compare_f)) || rtb_y_oi); + rtb_NOT3_tmp_0 || rtb_OR2_l_tmp)) || rtb_y_oi); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault2_defaultValue_e, &rtb_y_gtq); FmgcComputer_MATLABFunction_g((rtb_y_gtq > FmgcComputer_U.in.fms_inputs.acceleration_alt_ft), FmgcComputer_P.PulseNode1_isRisingEdge_g, &rtb_y_fd, &FmgcComputer_DWork.sf_MATLABFunction_lva); - rtb_y_i2 = (rtb_NOT3_tmp_0 || rtb_Compare_f); + rtb_y_i2 = (rtb_NOT3_tmp_0 || rtb_OR2_l_tmp); rtb_y_oi = (rtb_y_hy || rtb_y_nlq || (rtb_y_fd && (FmgcComputer_U.in.fms_inputs.acceleration_alt_ft != FmgcComputer_P.CompareToConstant_const_od) && rtb_y_i2)); - rtb_y_fd = ((rtb_Compare_bj && rtb_OR2_l) || (Memory_PreviousInput_k_tmp_tmp && rtb_appInop_idx_2 && - rtb_GreaterThan3 && rtb_y_oi)); - FmgcComputer_MATLABFunction_a(rtb_y_fd, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ca, - FmgcComputer_P.ConfirmNode_timeDelay_ib, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_go); - FmgcComputer_DWork.Memory_PreviousInput_ae = FmgcComputer_P.Logic_table_jq[(((rtb_OR_bg || ((absVsTarget_tmp || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_NOT_b))) + (static_cast(rtb_y_fd) << - 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ae]; - rtb_OR2_l_tmp = (FmgcComputer_DWork.Memory_PreviousInput_ae && rtb_y_nlq); + rtb_NOT_b = (rtb_NOT_b && rtb_TmpSignalConversionAtSFunctionInport3_idx_0); + rtb_Compare_a5 = (rtb_NOT_b && rtb_GreaterThan3 && rtb_y_oi); + rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || rtb_Compare_a5); + FmgcComputer_MATLABFunction_a(rtb_Compare_du, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ca, + FmgcComputer_P.ConfirmNode_timeDelay_ib, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_go); + FmgcComputer_DWork.Memory_PreviousInput_ae = FmgcComputer_P.Logic_table_jq + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_GreaterThan3_tmp || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_Compare_a5))) + (static_cast + (rtb_Compare_du) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ae]; + rtb_y_hy = (FmgcComputer_DWork.Memory_PreviousInput_ae && rtb_y_nlq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_b, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_kr, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_Compare_bj && (rtb_DataTypeConversion1_e != 0U)); - rtb_NOT_b = rtb_appInop_idx_2; + rtb_Compare_du = (rtb_Compare_du && (rtb_DataTypeConversion1_e != 0U)); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_i, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, @@ -2833,24 +2853,24 @@ void FmgcComputer::step() FmgcComputer_P.ConfirmNode_isRisingEdge_fq, FmgcComputer_P.ConfirmNode_timeDelay_lp, &rtb_y_oi, &FmgcComputer_DWork.sf_MATLABFunction_hj); rtb_y_nlq = (rtb_y_nlq || rtb_y_oi); - rtb_y_fd = ((rtb_Compare_bj && rtb_OR2_l) || (Memory_PreviousInput_k_tmp_tmp && rtb_appInop_idx_2 && (rtb_y_jq < - rtb_y_gtq) && rtb_y_nlq)); - FmgcComputer_MATLABFunction_a(rtb_y_fd, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ep, - FmgcComputer_P.ConfirmNode_timeDelay_ob, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_khd); - FmgcComputer_DWork.Memory_PreviousInput_ev = FmgcComputer_P.Logic_table_lw[(((rtb_OR_bg || ((rtb_AND_e_tmp || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_NOT_b))) + (static_cast(rtb_y_fd) << - 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ev]; + rtb_Compare_a5 = (rtb_NOT_b && (rtb_y_jq < rtb_y_gtq) && rtb_y_nlq); + rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || rtb_Compare_a5); + FmgcComputer_MATLABFunction_a(rtb_Compare_du, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ep, + FmgcComputer_P.ConfirmNode_timeDelay_ob, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_khd); + FmgcComputer_DWork.Memory_PreviousInput_ev = FmgcComputer_P.Logic_table_lw + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_NOT3_tmp || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_Compare_a5))) + (static_cast + (rtb_Compare_du) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ev]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_nh, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_fro, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_Compare_bj && (rtb_DataTypeConversion1_e != 0U)); - rtb_NOT_b = rtb_appInop_idx_2; + rtb_Compare_du = (rtb_Compare_du && (rtb_DataTypeConversion1_e != 0U)); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_a, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, @@ -2859,30 +2879,30 @@ void FmgcComputer::step() FmgcComputer_P.BitfromLabel4_bit_e, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_az, &rtb_y_nlq, &FmgcComputer_DWork.sf_MATLABFunction_fl); - rtb_y_fd = ((rtb_Compare_bj && rtb_OR2_l) || (Memory_PreviousInput_k_tmp_tmp && rtb_appInop_idx_2 && (rtb_y_jq > - rtb_y_gtq) && rtb_y_nlq)); - FmgcComputer_MATLABFunction_a(rtb_y_fd, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_b, - FmgcComputer_P.ConfirmNode_timeDelay_io, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_dn1); - FmgcComputer_DWork.Memory_PreviousInput_mx = FmgcComputer_P.Logic_table_ao[(((rtb_OR_bg || ((rtb_Compare_jz || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_NOT_b))) + (static_cast(rtb_y_fd) << - 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_mx]; + rtb_Compare_a5 = (rtb_NOT_b && (rtb_y_jq > rtb_y_gtq) && rtb_y_nlq); + rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || rtb_Compare_a5); + FmgcComputer_MATLABFunction_a(rtb_Compare_du, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_b, + FmgcComputer_P.ConfirmNode_timeDelay_io, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_dn1); + FmgcComputer_DWork.Memory_PreviousInput_mx = FmgcComputer_P.Logic_table_ao + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((absVsTarget_tmp || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_Compare_a5))) + (static_cast + (rtb_Compare_du) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_mx]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_mz, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_b3, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_Compare_bj && (rtb_DataTypeConversion1_e != 0U)); - rtb_NOT_b = rtb_appInop_idx_2; + rtb_Compare_du = (rtb_Compare_du && (rtb_DataTypeConversion1_e != 0U)); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_aa, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, @@ -2891,33 +2911,34 @@ void FmgcComputer::step() FmgcComputer_P.BitfromLabel4_bit_kh, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_m, &rtb_y_nlq, &FmgcComputer_DWork.sf_MATLABFunction_a3); - rtb_y_fd = ((rtb_Compare_bj && rtb_OR2_l) || (Memory_PreviousInput_k_tmp_tmp && rtb_appInop_idx_2 && (rtb_y_jq < - rtb_y_gtq) && rtb_y_nlq)); - FmgcComputer_MATLABFunction_a(rtb_y_fd, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ef, - FmgcComputer_P.ConfirmNode_timeDelay_p, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_epf); - FmgcComputer_DWork.Memory_PreviousInput_o = FmgcComputer_P.Logic_table_om[(((rtb_OR_bg || ((rtb_y_ga || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_NOT_b))) + (static_cast(rtb_y_fd) << - 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_o]; + rtb_Compare_a5 = (rtb_NOT_b && (rtb_y_jq < rtb_y_gtq) && rtb_y_nlq); + rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || rtb_Compare_a5); + FmgcComputer_MATLABFunction_a(rtb_Compare_du, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ef, + FmgcComputer_P.ConfirmNode_timeDelay_p, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_epf); + FmgcComputer_DWork.Memory_PreviousInput_o = FmgcComputer_P.Logic_table_om + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_y_c || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_Compare_a5))) + (static_cast + (rtb_Compare_du) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_o]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_b, &rtb_DataTypeConversion1_e); - rtb_y_fd = rtb_y_e; + rtb_Compare_a5 = rtb_y_e; FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active), FmgcComputer_P.PulseNode1_isRisingEdge_b, &rtb_y_nlq, &FmgcComputer_DWork.sf_MATLABFunction_pe); FmgcComputer_MATLABFunction_g(FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed, - FmgcComputer_P.PulseNode_isRisingEdge_lz, &rtb_y_fd, &FmgcComputer_DWork.sf_MATLABFunction_iv); + FmgcComputer_P.PulseNode_isRisingEdge_lz, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_iv); FmgcComputer_DWork.Memory_PreviousInput_fm = FmgcComputer_P.Logic_table_dr[(((static_cast (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && (rtb_y_nlq && Memory_PreviousInput_d_tmp_tmp && - rtb_appCapability_idx_0))) << 1) + (rtb_y_fd || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || + rtb_OR_bg))) << 1) + (rtb_Compare_a5 || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_fm]; rtb_BusAssignment_b0_logic_ils_computation_data_glideslope_deviation_deg.SSM = @@ -2926,10 +2947,10 @@ void FmgcComputer::step() rtb_Switch_i_glideslope_deviation_deg_Data; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_n0, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_d, &rtb_DataTypeConversion1_e); - rtb_NOT_b = rtb_y_c; + rtb_NOT_b = rtb_y_a0_tmp; FmgcComputer_MATLABFunction(&rtb_BusAssignment_b0_logic_ils_computation_data_glideslope_deviation_deg, FmgcComputer_P.A429ValueOrDefault_defaultValue_g, &rtb_y_gtq); FmgcComputer_LagFilter(rtb_y_gtq, FmgcComputer_P.LagFilter_C1, FmgcComputer_U.in.time.dt, @@ -2940,30 +2961,31 @@ void FmgcComputer::step() rtb_Nosewheel_c = rtb_y_gtq; } - FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_b0_logic_ils_computation_data_glideslope_deviation_deg, &rtb_y_fd); - rtb_y_fd = (rtb_y_e && FmgcComputer_DWork.Delay_DSTATE.armed_modes.glide_armed && rtb_y_c && - (((rtb_DataTypeConversion2_kb < FmgcComputer_DWork.DelayInput1_DSTATE_b) && (rtb_Nosewheel_c < + FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_b0_logic_ils_computation_data_glideslope_deviation_deg, + &rtb_Compare_a5); + rtb_Compare_a5 = (rtb_y_e && FmgcComputer_DWork.Delay_DSTATE.armed_modes.glide_armed && rtb_y_a0_tmp && + (((rtb_DataTypeConversion2_kb < FmgcComputer_DWork.DelayInput1_DSTATE_b) && (rtb_Nosewheel_c < FmgcComputer_P.CompareToConstant1_const_n2)) || (rtb_Nosewheel_c < FmgcComputer_P.CompareToConstant2_const_iq)) && - rtb_y_fd); - rtb_Compare_bj = ((rtb_Compare_bj && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || rtb_y_fd); - FmgcComputer_MATLABFunction_a(rtb_Compare_bj, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_g, - FmgcComputer_P.ConfirmNode_timeDelay_a3g, &rtb_y_fd, &FmgcComputer_DWork.sf_MATLABFunction_bs); - rtb_y_ff = (rtb_NOT3_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active); - FmgcComputer_DWork.Memory_PreviousInput_nu = FmgcComputer_P.Logic_table_d3[(((((!rtb_y_fd) && (rtb_y_ff || + rtb_Compare_a5); + rtb_Compare_du = ((rtb_Compare_du && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || rtb_Compare_a5); + FmgcComputer_MATLABFunction_a(rtb_Compare_du, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_g, + FmgcComputer_P.ConfirmNode_timeDelay_a3g, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_bs); + rtb_y_fd = (rtb_y_ga || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active); + FmgcComputer_DWork.Memory_PreviousInput_nu = FmgcComputer_P.Logic_table_d3[(((((!rtb_Compare_a5) && (rtb_y_fd || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_OR_bg) + (static_cast(rtb_Compare_bj) - << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_nu]; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset) + + (static_cast(rtb_Compare_du) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_nu]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_nl, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_g, &rtb_DataTypeConversion1_e); - rtb_y_fd = rtb_y_e; + rtb_Compare_a5 = rtb_y_e; FmgcComputer_MATLABFunction_a(FmgcComputer_DWork.Memory_PreviousInput_nu, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_gr, FmgcComputer_P.ConfirmNode_timeDelay_m, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_muf); @@ -2975,47 +2997,47 @@ void FmgcComputer::step() rtb_DataTypeConversion1_d = rtb_y_gtq; } - rtb_Compare_bj = ((rtb_Compare_bj && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && rtb_NOT_b && + rtb_Compare_du = ((rtb_Compare_du && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && rtb_NOT_b && (rtb_DataTypeConversion1_d < FmgcComputer_P.CompareToConstant2_const_h))); - FmgcComputer_MATLABFunction_a(rtb_Compare_bj, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_o, - FmgcComputer_P.ConfirmNode_timeDelay_mu, &rtb_y_fd, &FmgcComputer_DWork.sf_MATLABFunction_db); - rtb_y_ff = (rtb_y_ff || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active); - FmgcComputer_DWork.Memory_PreviousInput_as = FmgcComputer_P.Logic_table_fi[(((((!rtb_y_fd) && (rtb_y_ff || + FmgcComputer_MATLABFunction_a(rtb_Compare_du, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_o, + FmgcComputer_P.ConfirmNode_timeDelay_mu, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_db); + rtb_y_fd = (rtb_y_fd || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active); + FmgcComputer_DWork.Memory_PreviousInput_as = FmgcComputer_P.Logic_table_fi[(((((!rtb_Compare_a5) && (rtb_y_fd || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_OR_bg) + (static_cast(rtb_Compare_bj) - << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_as]; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset) + + (static_cast(rtb_Compare_du) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_as]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_7, FmgcComputer_P.BitfromLabel_bit_h, &rtb_DataTypeConversion1_e); rtb_NOT_b = FmgcComputer_DWork.Memory_PreviousInput_n0; - rtb_y_fd = (rtb_y_e && raOwnInvalid); + rtb_Compare_a5 = (rtb_y_e && raOwnInvalid); FmgcComputer_DWork.Memory_PreviousInput_n0 = FmgcComputer_P.Logic_table_id[(((static_cast - (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_fd && + (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_Compare_a5 && FmgcComputer_U.in.discrete_inputs.tcas_ta_display)) << 1) + ((!FmgcComputer_U.in.discrete_inputs.tcas_ta_display) || rtb_y_lh || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_n0]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_7, FmgcComputer_P.BitfromLabel2_bit_g, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel1_bit_n4, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_i, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_owv); - rtb_y_fd = ((rtb_Compare_bj && rtb_OR2_l) || (rtb_y_fd && rtb_NOT_b)); - rtb_Compare_bj = rtb_OR_bg; - FmgcComputer_MATLABFunction_a(rtb_y_fd, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_jj, - FmgcComputer_P.ConfirmNode_timeDelay_ae, &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_jrd); - absVsTarget = static_cast(((((rtb_OR_bg || (rtb_y_ff || + rtb_Compare_a5 = (rtb_Compare_a5 && rtb_NOT_b); + rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || rtb_Compare_a5); + FmgcComputer_MATLABFunction_a(rtb_Compare_du, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_jj, + FmgcComputer_P.ConfirmNode_timeDelay_ae, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_jrd); + absVsTarget = static_cast(((((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || (rtb_y_fd || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) && (!rtb_Compare_bj)) + (static_cast - (rtb_y_fd) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_i5); + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) && (!rtb_Compare_a5)) + (static_cast + (rtb_Compare_du) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_i5); rtb_Logic_ac[0U] = FmgcComputer_P.Logic_table_fn[static_cast(absVsTarget)]; rtb_Logic_ac[1U] = FmgcComputer_P.Logic_table_fn[static_cast(absVsTarget) + 8U]; if (FmgcComputer_P.EnumeratedConstant_Value_g != FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode) { @@ -3024,14 +3046,14 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel3_bit_h, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = (rtb_DataTypeConversion1_e == 0U); - rtb_y_fd = !FmgcComputer_DWork.Delay_DSTATE.armed_modes.alt_acq_armed; + rtb_Compare_du = (rtb_DataTypeConversion1_e == 0U); + rtb_Compare_a5 = !FmgcComputer_DWork.Delay_DSTATE.armed_modes.alt_acq_armed; FmgcComputer_DWork.Memory_PreviousInput_h = FmgcComputer_P.Logic_table_oq[((((std::abs(FmgcComputer_B.u_lyj - - rtb_altCstrOrFcu) >= FmgcComputer_P.CompareToConstant_const_gh) || rtb_Compare_bj || rtb_y_fd) + - (static_cast(rtb_NOT_c) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_h]; + rtb_altCstrOrFcu) >= FmgcComputer_P.CompareToConstant_const_gh) || rtb_Compare_du || rtb_Compare_a5) + ( + static_cast(rtb_NOT_gj) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_h]; FmgcComputer_DWork.Memory_PreviousInput_cp = FmgcComputer_P.Logic_table_dj[(((static_cast ((FmgcComputer_P.EnumeratedConstant1_Value_eq == FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode) && - Memory_PreviousInput_k_tmp_tmp_tmp) << 1) + (rtb_y_fd || rtb_Compare_bj)) << 1) + + Memory_PreviousInput_k_tmp_tmp_tmp) << 1) + (rtb_Compare_a5 || rtb_Compare_du)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_cp]; if (FmgcComputer_DWork.Memory_PreviousInput_h) { rtb_mode = tcas_submode::ALT_ACQ; @@ -3056,13 +3078,14 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction(&rtb_BusAssignment_kc_logic_chosen_fac_bus_v_ls_kn, FmgcComputer_P.A429ValueOrDefault4_defaultValue_e, &rtb_y_gtq); rtb_NOT_b = (rtb_y_jq < rtb_y_gtq + FmgcComputer_P.Bias1_Bias_c); - rtb_y_hy = (FmgcComputer_DWork.Memory_PreviousInput_b3 || FmgcComputer_DWork.Memory_PreviousInput_ev || - FmgcComputer_DWork.Memory_PreviousInput_o); - rtb_GreaterThan3 = rtb_y_hy; - rtb_y_fd = (rtb_fmgcOppPriority_tmp && FmgcComputer_DWork.Delay_DSTATE_k); + rtb_GreaterThan3_tmp = (FmgcComputer_DWork.Memory_PreviousInput_b3 || FmgcComputer_DWork.Memory_PreviousInput_ev || + FmgcComputer_DWork.Memory_PreviousInput_o); + rtb_GreaterThan3 = rtb_GreaterThan3_tmp; + rtb_Compare_a5 = (rtb_fmgcOppPriority_tmp && FmgcComputer_DWork.Delay_DSTATE_k); rtb_fmgcOppPriority_tmp = (FmgcComputer_DWork.Memory_PreviousInput_ec || FmgcComputer_DWork.Memory_PreviousInput_ae || FmgcComputer_DWork.Memory_PreviousInput_mx); - rtb_y_fd = ((rtb_y_fd && rtb_fmgcOppPriority_tmp && (rtb_y_fl < rtb_y_jq)) || (rtb_y_fd && rtb_NOT_b && rtb_y_hy)); + rtb_Compare_a5 = ((rtb_Compare_a5 && rtb_fmgcOppPriority_tmp && (rtb_y_fl < rtb_y_jq)) || (rtb_Compare_a5 && + rtb_NOT_b && rtb_GreaterThan3_tmp)); rtb_BusAssignment_ds_logic_ir_computation_data_flight_path_angle_deg.SSM = rtb_irComputationBus_flight_path_angle_deg_SSM; rtb_BusAssignment_ds_logic_ir_computation_data_flight_path_angle_deg.Data = @@ -3071,7 +3094,7 @@ void FmgcComputer::step() rtb_irComputationBus_inertial_vertical_speed_ft_s_SSM; rtb_BusAssignment_ds_logic_ir_computation_data_inertial_vertical_speed_ft_s.Data = rtb_irComputationBus_inertial_vertical_speed_ft_s_Data; - rtb_y_lh = rtb_y_fd; + rtb_y_lh = rtb_Compare_a5; FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_fpa_deg, FmgcComputer_P.A429ValueOrDefault1_defaultValue_hd, &rtb_DataTypeConversion2_bh); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ds_logic_ir_computation_data_flight_path_angle_deg, @@ -3086,7 +3109,7 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault4_defaultValue_b, &rtb_y_fl); FmgcComputer_MATLABFunction(&rtb_BusAssignment_kc_logic_adr_computation_data_airspeed_computed_kn, FmgcComputer_P.A429ValueOrDefault5_defaultValue_f, &rtb_y_jq); - rtb_appInop_idx_2 = (rtb_AND12 || rtb_GreaterThan3_tmp); + rtb_TmpSignalConversionAtSFunctionInport3_idx_0 = (rtb_AND12 || rtb_GreaterThan3_tmp_0); if (rtb_AND12) { rtb_DataTypeConversion2_bh = rtb_y_cf - rtb_y_d; rtb_Phi_c_deg = 50.0; @@ -3095,68 +3118,69 @@ void FmgcComputer::step() rtb_Phi_c_deg = 0.1; } - rtb_Compare_bj = (rtb_Logic_a2[0] && rtb_appInop_idx_2); - rtb_y_c = ((rtb_Compare_bj && (rtb_y_jq < rtb_y_gtq + 3.0F) && (rtb_DataTypeConversion2_bh < -rtb_Phi_c_deg)) || - (rtb_Compare_bj && (rtb_y_jq > rtb_y_fl - 3.0F) && (rtb_DataTypeConversion2_bh > rtb_Phi_c_deg))); - FmgcComputer_MATLABFunction_m((rtb_y_c || rtb_y_fd || rtb_OR2_l_tmp || Memory_PreviousInput_k_tmp_tmp_0 || + rtb_Compare_du = (rtb_Logic_a2[0] && rtb_TmpSignalConversionAtSFunctionInport3_idx_0); + rtb_y_c = ((rtb_Compare_du && (rtb_y_jq < rtb_y_gtq + 3.0F) && (rtb_DataTypeConversion2_bh < -rtb_Phi_c_deg)) || + (rtb_Compare_du && (rtb_y_jq > rtb_y_fl - 3.0F) && (rtb_DataTypeConversion2_bh > rtb_Phi_c_deg))); + FmgcComputer_MATLABFunction_m((rtb_y_c || rtb_Compare_a5 || rtb_y_hy || Memory_PreviousInput_k_tmp_tmp_0 || rtb_OR2_l_tmp_0), FmgcComputer_U.in.time.dt, &rtb_NOT_b, FmgcComputer_P.MTrigNode2_isRisingEdge_p, FmgcComputer_P.MTrigNode2_retriggerable_i, FmgcComputer_P.MTrigNode2_triggerDuration_f, &FmgcComputer_DWork.sf_MATLABFunction_hdx); - FmgcComputer_MATLABFunction_g(apCondition, FmgcComputer_P.PulseNode_isRisingEdge_fo, &rtb_y_fd, + FmgcComputer_MATLABFunction_g(apCondition, FmgcComputer_P.PulseNode_isRisingEdge_fo, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_h0f); rtb_NOT3_tmp = !rtb_Logic_ac[0]; - rtb_Compare_bj = (rtb_y_fd && rtb_NOT3_tmp); - FmgcComputer_MATLABFunction_m((Memory_PreviousInput_k_tmp_tmp_0 || rtb_Compare_bj), FmgcComputer_U.in.time.dt, - &rtb_y_fd, FmgcComputer_P.MTrigNode_isRisingEdge_jn, FmgcComputer_P.MTrigNode_retriggerable_n, + rtb_Compare_du = (rtb_Compare_a5 && rtb_NOT3_tmp); + FmgcComputer_MATLABFunction_m((Memory_PreviousInput_k_tmp_tmp_0 || rtb_Compare_du), FmgcComputer_U.in.time.dt, + &rtb_Compare_a5, FmgcComputer_P.MTrigNode_isRisingEdge_jn, FmgcComputer_P.MTrigNode_retriggerable_n, FmgcComputer_P.MTrigNode_triggerDuration_c, &FmgcComputer_DWork.sf_MATLABFunction_ppo); - FmgcComputer_MATLABFunction_m((rtb_OR2_l_tmp_0 || rtb_Compare_bj), FmgcComputer_U.in.time.dt, &rtb_Compare_bj, + FmgcComputer_MATLABFunction_m((rtb_OR2_l_tmp_0 || rtb_Compare_du), FmgcComputer_U.in.time.dt, &rtb_Compare_du, FmgcComputer_P.MTrigNode1_isRisingEdge_g, FmgcComputer_P.MTrigNode1_retriggerable_h, FmgcComputer_P.MTrigNode1_triggerDuration_m, &FmgcComputer_DWork.sf_MATLABFunction_hd1); rtb_NOT3_tmp_0 = rtb_NOT_b; - rtb_AND_e_tmp = rtb_y_fd; - rtb_AND_e_tmp_0 = rtb_Compare_bj; - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_hdg_deg, &rtb_y_fd); - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_trk_deg, &rtb_Compare_bj); + rtb_y_a0_tmp = rtb_Compare_a5; + rtb_AND_e_tmp = rtb_Compare_du; + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_hdg_deg, &rtb_Compare_a5); + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_trk_deg, &rtb_Compare_du); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel2_bit_gy, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_m((rtb_y_fd || rtb_Compare_bj || (rtb_DataTypeConversion1_e != 0U)), + FmgcComputer_MATLABFunction_m((rtb_Compare_a5 || rtb_Compare_du || (rtb_DataTypeConversion1_e != 0U)), FmgcComputer_U.in.time.dt, &rtb_GreaterThan3, FmgcComputer_P.MTrigNode1_isRisingEdge_p, FmgcComputer_P.MTrigNode1_retriggerable_o, FmgcComputer_P.MTrigNode1_triggerDuration_g, &FmgcComputer_DWork.sf_MATLABFunction_dln); FmgcComputer_MATLABFunction_a(FmgcComputer_DWork.Memory_PreviousInput_i1, FmgcComputer_U.in.time.dt, - FmgcComputer_P.ConfirmNode1_isRisingEdge_a, FmgcComputer_P.ConfirmNode1_timeDelay_b, &rtb_y_fd, + FmgcComputer_P.ConfirmNode1_isRisingEdge_a, FmgcComputer_P.ConfirmNode1_timeDelay_b, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_k4v); - rtb_Compare_bj = (FmgcComputer_DWork.Memory_PreviousInput_cv || FmgcComputer_DWork.Memory_PreviousInput_lq || + rtb_Compare_du = (FmgcComputer_DWork.Memory_PreviousInput_cv || FmgcComputer_DWork.Memory_PreviousInput_lq || FmgcComputer_DWork.Memory_PreviousInput_d || rtb_Logic_b[0] || FmgcComputer_DWork.Memory_PreviousInput_el || FmgcComputer_DWork.Memory_PreviousInput_b); - rtb_y_fd = (rtb_y_fd || rtb_Compare_bj); + rtb_Compare_a5 = (rtb_Compare_a5 || rtb_Compare_du); rtb_NOT_b = rtb_OR1_j; - rtb_Compare_bj = (rtb_Compare_bj || rtb_y_p || ((rtb_raComputationData < FmgcComputer_P.CompareToConstant_const_c) && + rtb_Compare_du = (rtb_Compare_du || rtb_y_p || ((rtb_raComputationData < FmgcComputer_P.CompareToConstant_const_c) && rtb_OR1_j)); - rtb_y_fd = (rtb_GreaterThan3 && rtb_y_fd && rtb_Compare_bj); + rtb_Compare_a5 = (rtb_GreaterThan3 && rtb_Compare_a5 && rtb_Compare_du); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel1_bit_pq, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_m((rtb_DataTypeConversion1_e != 0U), FmgcComputer_U.in.time.dt, &rtb_NOT_b, FmgcComputer_P.MTrigNode_isRisingEdge_l, FmgcComputer_P.MTrigNode_retriggerable_e, FmgcComputer_P.MTrigNode_triggerDuration_c0, &FmgcComputer_DWork.sf_MATLABFunction_ppu); - FmgcComputer_MATLABFunction_a(rtb_OR_bg, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_nz, - FmgcComputer_P.ConfirmNode_timeDelay_a5, &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_k0); - FmgcComputer_DWork.Memory_PreviousInput_bw = FmgcComputer_P.Logic_table_bs[((((!rtb_Compare_bj) || rtb_y_da || + FmgcComputer_MATLABFunction_a(rtb_appCapability_idx_2, FmgcComputer_U.in.time.dt, + FmgcComputer_P.ConfirmNode_isRisingEdge_nz, FmgcComputer_P.ConfirmNode_timeDelay_a5, &rtb_GreaterThan3, + &FmgcComputer_DWork.sf_MATLABFunction_k0); + FmgcComputer_DWork.Memory_PreviousInput_bw = FmgcComputer_P.Logic_table_bs[((((!rtb_Compare_du) || rtb_y_da || rtb_AND9 || FmgcComputer_DWork.Memory_PreviousInput_ip || rtb_NOT_b || rtb_GreaterThan3) + (static_cast - (rtb_y_fd) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_bw]; + (rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_bw]; rtb_BusAssignment_ks_logic_adr_computation_data_altitude_corrected_ft.SSM = rtb_adrComputationBus_altitude_corrected_ft_SSM; rtb_BusAssignment_ks_logic_adr_computation_data_altitude_corrected_ft.Data = rtb_adrComputationBus_altitude_corrected_ft_Data; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_5, FmgcComputer_P.BitfromLabel1_bit_aw, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = ((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l); - rtb_y_fd = rtb_y_e; + rtb_Compare_du = ((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l); + rtb_Compare_a5 = rtb_y_e; FmgcComputer_MATLABFunction_a(rtb_OR_m4, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge_b4, FmgcComputer_P.ConfirmNode1_timeDelay_h, &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_hjm); FmgcComputer_MATLABFunction_g(rtb_GreaterThan3, FmgcComputer_P.PulseNode3_isRisingEdge_ko, &rtb_y_fd, &FmgcComputer_DWork.sf_MATLABFunction_od); - rtb_NOT_b = rtb_OR_bg; + rtb_NOT_b = rtb_appCapability_idx_2; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_gv, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode2_isRisingEdge_f, @@ -3166,43 +3190,43 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault3_defaultValue_a, &rtb_y_gtq); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_mh, &rtb_y_jq); - rtb_appCapability_idx_0 = !FmgcComputer_DWork.Memory_PreviousInput_k; - rtb_GreaterThan3 = (FmgcComputer_U.in.fms_inputs.preset_spd_mach_activate && (rtb_appCapability_idx_0 || (rtb_y_gtq <= - rtb_y_jq))); + rtb_OR_bg = !FmgcComputer_DWork.Memory_PreviousInput_k; + rtb_GreaterThan3 = (FmgcComputer_U.in.fms_inputs.preset_spd_mach_activate && (rtb_OR_bg || (rtb_y_gtq <= rtb_y_jq))); FmgcComputer_MATLABFunction_g((FmgcComputer_U.in.fms_inputs.v_managed_kts == FmgcComputer_P.CompareToConstant1_const_e), FmgcComputer_P.PulseNode4_isRisingEdge_a, &rtb_y_i2, &FmgcComputer_DWork.sf_MATLABFunction_aag); rtb_y_nlq = rtb_OR_m4; rtb_y_ff = !FmgcComputer_DWork.Memory_PreviousInput_i; - rtb_y_oi = (rtb_appCapability_idx_0 && rtb_y_ff && (!FmgcComputer_DWork.Memory_PreviousInput_nu) && + rtb_y_oi = (rtb_OR_bg && rtb_y_ff && (!FmgcComputer_DWork.Memory_PreviousInput_nu) && (!FmgcComputer_DWork.Memory_PreviousInput_as) && (!FmgcComputer_DWork.Memory_PreviousInput_d)); FmgcComputer_MATLABFunction_g(rtb_Logic_ac[0], FmgcComputer_P.PulseNode7_isRisingEdge, &rtb_y_nlq, &FmgcComputer_DWork.sf_MATLABFunction_itu); - rtb_OR1_j = (rtb_Compare_bj || (rtb_y_e && ((FmgcComputer_DWork.Delay_DSTATE_fe && rtb_OR_m4) || + rtb_OR1_j = (rtb_Compare_du || (rtb_y_e && ((FmgcComputer_DWork.Delay_DSTATE_fe && rtb_OR_m4) || ((FmgcComputer_U.in.fms_inputs.v_managed_kts == FmgcComputer_P.CompareToConstant_const_dy) && rtb_y_fd && rtb_y_oi) - || (rtb_OR_bg && (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant_Value_ad)) || - rtb_NOT_b || rtb_GreaterThan3 || (rtb_y_i2 && rtb_OR_m4 && rtb_y_oi) || rtb_y_nlq))); + || (rtb_appCapability_idx_2 && (FmgcComputer_U.in.fms_inputs.fms_flight_phase != + FmgcComputer_P.EnumeratedConstant_Value_ad)) || rtb_NOT_b || rtb_GreaterThan3 || (rtb_y_i2 && rtb_OR_m4 && + rtb_y_oi) || rtb_y_nlq))); FmgcComputer_MATLABFunction_a(rtb_OR1_j, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ch, - FmgcComputer_P.ConfirmNode_timeDelay_ht, &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_jcu); + FmgcComputer_P.ConfirmNode_timeDelay_ht, &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_jcu); FmgcComputer_MATLABFunction_g(rtb_BusAssignment_h_logic_engine_running, FmgcComputer_P.PulseNode6_isRisingEdge_j, - &rtb_y_fd, &FmgcComputer_DWork.sf_MATLABFunction_abn); + &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_abn); FmgcComputer_MATLABFunction_g(apCondition, FmgcComputer_P.PulseNode5_isRisingEdge_i, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_kzm); FmgcComputer_DWork.Memory_PreviousInput_cu = FmgcComputer_P.Logic_table_kg - [((((FmgcComputer_DWork.Delay_DSTATE.auto_spd_control_active && (!rtb_Compare_bj)) || (rtb_y_p && (rtb_y_fd || + [((((FmgcComputer_DWork.Delay_DSTATE.auto_spd_control_active && (!rtb_Compare_du)) || (rtb_y_p && (rtb_Compare_a5 || rtb_NOT_b))) + (static_cast(rtb_OR1_j) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_cu]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_5, FmgcComputer_P.BitfromLabel_bit_kq, &rtb_DataTypeConversion1_e); - rtb_Compare_bj = ((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l); + rtb_Compare_du = ((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l); FmgcComputer_MATLABFunction_g(apCondition, FmgcComputer_P.PulseNode1_isRisingEdge_n, &rtb_y_nlq, &FmgcComputer_DWork.sf_MATLABFunction_ab); - rtb_y_fd = (FmgcComputer_U.in.fms_inputs.v_2_kts != FmgcComputer_P.CompareToConstant_const_e); + rtb_Compare_a5 = (FmgcComputer_U.in.fms_inputs.v_2_kts != FmgcComputer_P.CompareToConstant_const_e); FmgcComputer_MATLABFunction_g(rtb_BusAssignment_h_logic_engine_running, FmgcComputer_P.PulseNode5_isRisingEdge_b, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_hkc); - FmgcComputer_MATLABFunction_g(rtb_y_fd, FmgcComputer_P.PulseNode2_isRisingEdge_iu, &rtb_GreaterThan3, + FmgcComputer_MATLABFunction_g(rtb_Compare_a5, FmgcComputer_P.PulseNode2_isRisingEdge_iu, &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_ft); rtb_GreaterThan3 = (apCondition && rtb_GreaterThan3); - rtb_OR1_j = ((rtb_y_nlq && rtb_y_fd) || (rtb_NOT_b && rtb_y_fd && apCondition) || rtb_GreaterThan3); + rtb_OR1_j = ((rtb_y_nlq && rtb_Compare_a5) || (rtb_NOT_b && rtb_Compare_a5 && apCondition) || rtb_GreaterThan3); rtb_y_ga = (FmgcComputer_DWork.Memory_PreviousInput_i || FmgcComputer_DWork.Memory_PreviousInput_k); FmgcComputer_MATLABFunction_g(rtb_y_ga, FmgcComputer_P.PulseNode3_isRisingEdge_i, &rtb_y_nlq, &FmgcComputer_DWork.sf_MATLABFunction_mrn); @@ -3213,21 +3237,21 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Memory_PreviousInput_mx || FmgcComputer_DWork.Memory_PreviousInput_o), FmgcComputer_P.PulseNode4_isRisingEdge_n, &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_lr); - rtb_y_fd = ((rtb_y_p && rtb_OR1_j) || (rtb_y_nlq || rtb_y_oi || rtb_GreaterThan3)); + rtb_Compare_a5 = ((rtb_y_p && rtb_OR1_j) || (rtb_y_nlq || rtb_y_oi || rtb_GreaterThan3)); rtb_NOT_b = (FmgcComputer_U.in.fms_inputs.v_managed_kts != FmgcComputer_P.CompareToConstant2_const_m); rtb_GreaterThan3 = (FmgcComputer_U.in.fms_inputs.v_2_kts != FmgcComputer_P.CompareToConstant3_const_j); - rtb_y_fd = (rtb_Compare_bj || (rtb_y_e && rtb_y_fd && (rtb_NOT_b || rtb_GreaterThan3))); - FmgcComputer_MATLABFunction_a(rtb_y_fd, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_h2, - FmgcComputer_P.ConfirmNode_timeDelay_gz, &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_j3h); + rtb_Compare_a5 = (rtb_Compare_du || (rtb_y_e && rtb_Compare_a5 && (rtb_NOT_b || rtb_GreaterThan3))); + FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_h2, + FmgcComputer_P.ConfirmNode_timeDelay_gz, &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_j3h); FmgcComputer_MATLABFunction_g((FmgcComputer_U.in.fms_inputs.v_managed_kts == FmgcComputer_P.CompareToConstant4_const_n), FmgcComputer_P.PulseNode6_isRisingEdge_k, &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_dq); FmgcComputer_MATLABFunction_g((FmgcComputer_U.in.fms_inputs.v_2_kts == FmgcComputer_P.CompareToConstant5_const_h), FmgcComputer_P.PulseNode7_isRisingEdge_c, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_hpe); FmgcComputer_DWork.Memory_PreviousInput_hk = FmgcComputer_P.Logic_table_ds - [((((FmgcComputer_DWork.Delay_DSTATE.manual_spd_control_active && (!rtb_Compare_bj)) || (rtb_y_p && (rtb_y_ff && - rtb_appCapability_idx_0 && rtb_y_j5) && (rtb_GreaterThan3 || rtb_NOT_b))) + (static_cast(rtb_y_fd) - << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_hk]; + [((((FmgcComputer_DWork.Delay_DSTATE.manual_spd_control_active && (!rtb_Compare_du)) || (rtb_y_p && (rtb_y_ff && + rtb_OR_bg && rtb_y_j5) && (rtb_GreaterThan3 || rtb_NOT_b))) + (static_cast(rtb_Compare_a5) << 1)) << + 1) + FmgcComputer_DWork.Memory_PreviousInput_hk]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel_bit_as, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_c2, @@ -3354,7 +3378,7 @@ void FmgcComputer::step() rtb_Switch_e[1] = rtb_y_jq; } - rtb_Compare_bj = (FmgcComputer_DWork.Memory_PreviousInput_cb && (FmgcComputer_U.in.fms_inputs.fms_flight_phase == + rtb_Compare_du = (FmgcComputer_DWork.Memory_PreviousInput_cb && (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant_Value_a4) && FmgcComputer_DWork.Delay_DSTATE_c && FmgcComputer_DWork.Delay_DSTATE_k); rtb_Phi_c_deg = std::abs(rtb_Switch_e[0] - rtb_Max_a); @@ -3369,23 +3393,23 @@ void FmgcComputer::step() rtb_Phi_c_deg = rtb_y_mw; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_mz, &rtb_DataTypeConversion1_e); - rtb_y_fd = ((!rtb_Compare_bj) || rtb_y_ff || rtb_y_me || (rtb_Max_a > rtb_y_mw + FmgcComputer_P.Bias_Bias) || - (rtb_DataTypeConversion1_e != 0U)); - FmgcComputer_MATLABFunction_a((rtb_Compare_bj && (!rtb_OR1_j) && (!rtb_y_fd)), FmgcComputer_U.in.time.dt, + rtb_Compare_a5 = ((!rtb_Compare_du) || rtb_y_ff || rtb_y_me || (rtb_Max_a > rtb_y_mw + FmgcComputer_P.Bias_Bias) || + (rtb_DataTypeConversion1_e != 0U)); + FmgcComputer_MATLABFunction_a((rtb_Compare_du && (!rtb_OR1_j) && (!rtb_Compare_a5)), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_dh, FmgcComputer_P.ConfirmNode_timeDelay_mf, &rtb_y_me, &FmgcComputer_DWork.sf_MATLABFunction_nj); - absVsTarget = static_cast((((static_cast(rtb_y_me) << 1) + rtb_y_fd) << 1) + + absVsTarget = static_cast((((static_cast(rtb_y_me) << 1) + rtb_Compare_a5) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ak); rtb_Logic_hq[0U] = FmgcComputer_P.Logic_table_am[static_cast(absVsTarget)]; rtb_Logic_hq[1U] = FmgcComputer_P.Logic_table_am[static_cast(absVsTarget) + 8U]; - rtb_y_fd = (rtb_appInop_idx_2 || FmgcComputer_DWork.Memory_PreviousInput_cb || - FmgcComputer_DWork.Memory_PreviousInput_ne || FmgcComputer_DWork.Memory_PreviousInput_ec || - FmgcComputer_DWork.Memory_PreviousInput_b3 || FmgcComputer_DWork.Memory_PreviousInput_mx || - FmgcComputer_DWork.Memory_PreviousInput_o || rtb_Logic_b[0] || - FmgcComputer_DWork.Memory_PreviousInput_nu || FmgcComputer_DWork.Memory_PreviousInput_as || - FmgcComputer_DWork.Memory_PreviousInput_ae || FmgcComputer_DWork.Memory_PreviousInput_ev || - FmgcComputer_DWork.Memory_PreviousInput_i || FmgcComputer_DWork.Memory_PreviousInput_k || rtb_Logic_ac[0] - || FmgcComputer_DWork.Memory_PreviousInput_d); + rtb_Compare_a5 = (rtb_TmpSignalConversionAtSFunctionInport3_idx_0 || FmgcComputer_DWork.Memory_PreviousInput_cb || + FmgcComputer_DWork.Memory_PreviousInput_ne || FmgcComputer_DWork.Memory_PreviousInput_ec || + FmgcComputer_DWork.Memory_PreviousInput_b3 || FmgcComputer_DWork.Memory_PreviousInput_mx || + FmgcComputer_DWork.Memory_PreviousInput_o || rtb_Logic_b[0] || + FmgcComputer_DWork.Memory_PreviousInput_nu || FmgcComputer_DWork.Memory_PreviousInput_as || + FmgcComputer_DWork.Memory_PreviousInput_ae || FmgcComputer_DWork.Memory_PreviousInput_ev || + FmgcComputer_DWork.Memory_PreviousInput_i || FmgcComputer_DWork.Memory_PreviousInput_k || + rtb_Logic_ac[0] || FmgcComputer_DWork.Memory_PreviousInput_d); rtb_active_lateral_law = lateral_law::NONE; rtb_active_longitudinal_law = vertical_law::NONE; if (FmgcComputer_DWork.Memory_PreviousInput_m || FmgcComputer_DWork.Memory_PreviousInput_c) { @@ -3409,7 +3433,7 @@ void FmgcComputer::step() rtb_active_longitudinal_law = vertical_law::GS; } else if (FmgcComputer_DWork.Memory_PreviousInput_k || FmgcComputer_DWork.Memory_PreviousInput_i) { rtb_active_longitudinal_law = vertical_law::SRS; - } else if (rtb_GreaterThan3_tmp) { + } else if (rtb_GreaterThan3_tmp_0) { rtb_active_longitudinal_law = vertical_law::FPA; } else if (rtb_AND12 || (rtb_Logic_ac[0] && (rtb_mode == tcas_submode::VS))) { rtb_active_longitudinal_law = vertical_law::VS; @@ -3448,38 +3472,38 @@ void FmgcComputer::step() FmgcComputer_DWork.Memory_PreviousInput_ip || FmgcComputer_DWork.Memory_PreviousInput_d); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_i, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, &rtb_Compare_bj); - rtb_Compare_bj = ((rtb_DataTypeConversion1_e != 0U) && rtb_Compare_bj); + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, &rtb_Compare_du); + rtb_Compare_du = ((rtb_DataTypeConversion1_e != 0U) && rtb_Compare_du); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_4, FmgcComputer_P.BitfromLabel1_bit_i5, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_4, &rtb_y_ga); - rtb_Compare_bj = ((rtb_Compare_bj || ((rtb_DataTypeConversion1_e != 0U) && rtb_y_ga)) && + rtb_Compare_du = ((rtb_Compare_du || ((rtb_DataTypeConversion1_e != 0U) && rtb_y_ga)) && FmgcComputer_U.in.discrete_inputs.ap_opp_engaged); rtb_y_ga = (rtb_Logic_a2[0] && (FmgcComputer_DWork.Memory_PreviousInput_l || FmgcComputer_DWork.Memory_PreviousInput_d)); - rtb_GreaterThan3 = ((!rtb_ap_inop_tmp) && (FmgcComputer_U.in.discrete_inputs.fwc_own_valid || + rtb_y_i2 = ((!rtb_ap_inop_tmp) && (FmgcComputer_U.in.discrete_inputs.fwc_own_valid || FmgcComputer_U.in.discrete_inputs.fwc_opp_valid) && FmgcComputer_U.in.discrete_inputs.pfd_own_valid && - FmgcComputer_U.in.discrete_inputs.pfd_opp_valid && rtb_BusAssignment_o_logic_both_ils_valid); - rtb_y_me = (rtb_GreaterThan3 && (!rtb_ap_inop_tmp_tmp) && rtb_bothRaValid); + FmgcComputer_U.in.discrete_inputs.pfd_opp_valid && rtb_BusAssignment_o_logic_both_ils_valid); + rtb_GreaterThan3 = (rtb_y_i2 && (!rtb_ap_inop_tmp_tmp) && rtb_bothRaValid); rtb_y_ff = (FmgcComputer_U.in.discrete_inputs.fwc_own_valid && FmgcComputer_U.in.discrete_inputs.fwc_opp_valid && FmgcComputer_U.in.discrete_inputs.powersupply_split && FmgcComputer_U.in.discrete_inputs.pfd_own_valid && - FmgcComputer_U.in.discrete_inputs.pfd_opp_valid && rtb_TmpSignalConversionAtSFunctionInport3_idx_0 && - rtb_TmpSignalConversionAtSFunctionInport3_idx_1 && rtb_bothRaValid && + FmgcComputer_U.in.discrete_inputs.pfd_opp_valid && rtb_TmpSignalConversionAtSFunctionInport3_idx_1 && + rtb_TmpSignalConversionAtSFunctionInport3_idx_2 && rtb_bothRaValid && rtb_BusAssignment_o_logic_both_ils_valid && rtb_adrOppInvalid && rtb_adrOwnInvalid && FmgcComputer_U.in.discrete_inputs.bscu_own_valid && FmgcComputer_U.in.discrete_inputs.bscu_opp_valid && rtb_irOwnInvalid); - rtb_NOT_b = (FmgcComputer_DWork.pLand3FailOp || (rtb_y_ff && rtb_y_ga && rtb_Compare_bj && + rtb_appCapability_idx_2 = (FmgcComputer_DWork.pLand3FailOp || (rtb_y_ff && rtb_y_ga && rtb_Compare_du && FmgcComputer_DWork.Delay_DSTATE_k)); - rtb_appCapability_idx_0 = !rtb_NOT_b; - rtb_y_i2 = (FmgcComputer_DWork.pLand3FailPass || (rtb_y_me && rtb_y_ga && FmgcComputer_DWork.Delay_DSTATE_k && - rtb_appCapability_idx_0)); - rtb_appCapability_idx_0 = (rtb_GreaterThan3 && rtb_y_ga && (!rtb_y_i2) && rtb_appCapability_idx_0); + rtb_NOT_b = !rtb_appCapability_idx_2; + rtb_y_fd = (FmgcComputer_DWork.pLand3FailPass || (rtb_GreaterThan3 && rtb_y_ga && FmgcComputer_DWork.Delay_DSTATE_k && + rtb_NOT_b)); + rtb_NOT_b = (rtb_y_i2 && rtb_y_ga && (!rtb_y_fd) && rtb_NOT_b); + rtb_y_i2 = !rtb_y_i2; rtb_GreaterThan3 = !rtb_GreaterThan3; - rtb_y_me = !rtb_y_me; - rtb_appInop_idx_2 = !rtb_y_ff; - if ((rtb_raComputationData < 100.0F) && (rtb_y_ga || rtb_Compare_bj)) { - FmgcComputer_DWork.pLand3FailOp = rtb_NOT_b; - FmgcComputer_DWork.pLand3FailPass = rtb_y_i2; + rtb_y_me = !rtb_y_ff; + if ((rtb_raComputationData < 100.0F) && (rtb_y_ga || rtb_Compare_du)) { + FmgcComputer_DWork.pLand3FailOp = rtb_appCapability_idx_2; + FmgcComputer_DWork.pLand3FailPass = rtb_y_fd; } else { FmgcComputer_DWork.pLand3FailOp = false; FmgcComputer_DWork.pLand3FailPass = false; @@ -3487,24 +3511,24 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_4, FmgcComputer_P.BitfromLabel2_bit_o, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_4, &rtb_Compare_bj); - rtb_TmpSignalConversionAtSFunctionInport3_idx_0 = ((rtb_DataTypeConversion1_e != 0U) && rtb_Compare_bj); + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_4, &rtb_Compare_du); + rtb_TmpSignalConversionAtSFunctionInport3_idx_0 = ((rtb_DataTypeConversion1_e != 0U) && rtb_Compare_du); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_4, FmgcComputer_P.BitfromLabel3_bit_l, &rtb_DataTypeConversion1_e); - rtb_TmpSignalConversionAtSFunctionInport3_idx_1 = ((rtb_DataTypeConversion1_e != 0U) && rtb_Compare_bj); + rtb_TmpSignalConversionAtSFunctionInport3_idx_1 = ((rtb_DataTypeConversion1_e != 0U) && rtb_Compare_du); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_4, - FmgcComputer_P.BitfromLabel4_bit_f, &rtb_DataTypeConversion1_e); - rtb_TmpSignalConversionAtSFunctionInport3_idx_2 = ((rtb_DataTypeConversion1_e != 0U) && rtb_Compare_bj); + FmgcComputer_P.BitfromLabel4_bit_fw, &rtb_DataTypeConversion1_e); + rtb_TmpSignalConversionAtSFunctionInport3_idx_2 = ((rtb_DataTypeConversion1_e != 0U) && rtb_Compare_du); if (rtb_Logic_a2[0] && FmgcComputer_U.in.discrete_inputs.ap_opp_engaged) { if (FmgcComputer_U.in.discrete_inputs.is_unit_1) { - rtb_TmpSignalConversionAtSFunctionInport3_idx_0 = rtb_appCapability_idx_0; - rtb_TmpSignalConversionAtSFunctionInport3_idx_1 = rtb_y_i2; - rtb_TmpSignalConversionAtSFunctionInport3_idx_2 = rtb_NOT_b; + rtb_TmpSignalConversionAtSFunctionInport3_idx_0 = rtb_NOT_b; + rtb_TmpSignalConversionAtSFunctionInport3_idx_1 = rtb_y_fd; + rtb_TmpSignalConversionAtSFunctionInport3_idx_2 = rtb_appCapability_idx_2; } } else if (!rtb_y_k3) { - rtb_TmpSignalConversionAtSFunctionInport3_idx_0 = rtb_appCapability_idx_0; - rtb_TmpSignalConversionAtSFunctionInport3_idx_1 = rtb_y_i2; - rtb_TmpSignalConversionAtSFunctionInport3_idx_2 = rtb_NOT_b; + rtb_TmpSignalConversionAtSFunctionInport3_idx_0 = rtb_NOT_b; + rtb_TmpSignalConversionAtSFunctionInport3_idx_1 = rtb_y_fd; + rtb_TmpSignalConversionAtSFunctionInport3_idx_2 = rtb_appCapability_idx_2; } rtb_BusAssignment_jm_logic_ir_computation_data_track_angle_magnetic_deg.SSM = @@ -3520,7 +3544,7 @@ void FmgcComputer::step() rtb_Switch_i_glideslope_deviation_deg_SSM; rtb_BusAssignment_jm_logic_ils_computation_data_glideslope_deviation_deg.Data = rtb_Switch_i_glideslope_deviation_deg_Data; - FmgcComputer_DWork.Delay_DSTATE.any_longitudinal_mode_engaged = rtb_y_fd; + FmgcComputer_DWork.Delay_DSTATE.any_longitudinal_mode_engaged = rtb_Compare_a5; rtb_DataTypeConversion_cm = rtb_irComputationBus_pitch_angle_deg_Data; rtb_DataTypeConversion1_d = rtb_irComputationBus_roll_angle_deg_Data; rtb_DataTypeConversion8 = rtb_irComputationBus_pitch_att_rate_deg_s_Data; @@ -3564,16 +3588,16 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_hdg_deg, FmgcComputer_P.A429ValueOrDefault3_defaultValue_j, &rtb_y_gtq); rtb_DataTypeConversion39 = rtb_y_gtq; - rtb_Compare_bj = (FmgcComputer_DWork.Memory_PreviousInput_el || FmgcComputer_DWork.Memory_PreviousInput_b); + rtb_Compare_du = (FmgcComputer_DWork.Memory_PreviousInput_el || FmgcComputer_DWork.Memory_PreviousInput_b); FmgcComputer_MATLABFunction(&rtb_BusAssignment_jm_logic_ir_computation_data_track_angle_magnetic_deg, FmgcComputer_P.A429ValueOrDefault8_defaultValue, &rtb_DataTypeConversion2_bh); - if (!rtb_Compare_bj) { + if (!rtb_Compare_du) { FmgcComputer_B.u_lyjjl = rtb_DataTypeConversion2_bh; } FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_trk_deg, FmgcComputer_P.A429ValueOrDefault7_defaultValue_a, &rtb_DataTypeConversion2_bh); - if (rtb_Compare_bj) { + if (rtb_Compare_du) { rtb_DataTypeConversion10 = FmgcComputer_B.u_lyjjl; } else { rtb_DataTypeConversion10 = rtb_DataTypeConversion2_bh; @@ -3616,7 +3640,7 @@ void FmgcComputer::step() &rtb_DataTypeConversion39, &rtb_DataTypeConversion10, &rtb_altCstrOrFcu, &rtb_Switch1, &rtb_Switch3, &(&rtb_Switch_e[0])[0], &(&rtb_Logic_hq[0])[0], &(&rtb_Logic_ac[0])[0], &(&rtb_Logic_b[0])[0], &rtb_y_ga, &rtb_Phi_loc_c, &rtb_Nosewheel_c, &rtb_Theta_c_deg, &rtb_Phi_c_deg, &rtb_Beta_c_deg, - &rtb_Product_p2, &rtb_Switch1_a, &rtb_Beta_c_deg_e, &rtb_Compare_bj, &rtb_H_dot_radio_fpm, + &rtb_Product_p2, &rtb_Switch1_a, &rtb_Beta_c_deg_e, &rtb_Compare_du, &rtb_H_dot_radio_fpm, &rtb_H_dot_c_fpm, &rtb_delta_Theta_H_dot_deg, &rtb_delta_Theta_bz_deg, &rtb_delta_Theta_bx_deg, &rtb_delta_Theta_beta_c_deg); rtb_BusAssignment_fo_logic_chosen_fac_bus_discrete_word_5.SSM = rtb_Switch_discrete_word_5_SSM; @@ -3653,14 +3677,14 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_flex_temp_deg, &rtb_y_ai); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault2_defaultValue_k, &rtb_y_jq); - rtb_Compare_jz = (rtb_y_jq > FmgcComputer_P.CompareToConstant4_const_p); - rtb_Compare_f = (rtb_y_jq <= FmgcComputer_P.CompareToConstant6_const_h); + rtb_Compare_d0 = (rtb_y_jq > FmgcComputer_P.CompareToConstant4_const_p); + rtb_Compare_kg = (rtb_y_jq <= FmgcComputer_P.CompareToConstant6_const_h); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault3_defaultValue_l, &rtb_y_jq); rtb_DataTypeConversion_cm = rtb_Product_p2; rtb_y_nlq = (FmgcComputer_DWork.Delay_DSTATE_k && (FmgcComputer_DWork.Memory_PreviousInput_hu || (rtb_y_j5 && rtb_y_ga && rtb_y_ff && rtb_y_nlq) || ((!rtb_y_oi) && (!rtb_y_ai) && rtb_BusAssignment_h_logic_one_engine_out && - (rtb_Compare_jz && rtb_Compare_f && (rtb_y_jq > FmgcComputer_P.CompareToConstant5_const_av) && (rtb_y_jq <= + (rtb_Compare_d0 && rtb_Compare_kg && (rtb_y_jq > FmgcComputer_P.CompareToConstant5_const_av) && (rtb_y_jq <= FmgcComputer_P.CompareToConstant7_const))))); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault4_defaultValue_m, &rtb_y_jq); @@ -3720,18 +3744,18 @@ void FmgcComputer::step() rtb_BusAssignment_i2_logic_chosen_fac_bus_v_max_kn.Data = rtb_Switch_v_max_kn_Data; rtb_BusAssignment_i2_logic_chosen_fac_bus_discrete_word_5.SSM = rtb_Switch_discrete_word_5_SSM; rtb_BusAssignment_i2_logic_chosen_fac_bus_discrete_word_5.Data = rtb_Switch_discrete_word_5_Data; - rtb_OR_m4 = (rtb_y_hy || rtb_Logic_b[0]); + rtb_OR_m4 = (rtb_GreaterThan3_tmp || rtb_Logic_b[0]); FmgcComputer_DWork.Memory_PreviousInput_kr = FmgcComputer_P.Logic_table_b3[(((static_cast (((rtb_adrComputationBus_altitude_corrected_ft_Data >= FmgcComputer_U.in.fms_inputs.thrust_reduction_alt_ft) || FmgcComputer_DWork.Memory_PreviousInput_ne || FmgcComputer_DWork.Memory_PreviousInput_cb || rtb_AND12 || - rtb_GreaterThan3_tmp) && rtb_OR_bg) << 1) + (rtb_BusAssignment_h_logic_one_engine_out || rtb_y_p || + rtb_GreaterThan3_tmp_0) && rtb_OR_bg) << 1) + (rtb_BusAssignment_h_logic_one_engine_out || rtb_y_p || ((FmgcComputer_P.EnumeratedConstant_Value_by == FmgcComputer_U.in.fms_inputs.fms_flight_phase) && (rtb_adrComputationBus_altitude_corrected_ft_Data < FmgcComputer_U.in.fms_inputs.thrust_reduction_alt_ft)))) << 1) + FmgcComputer_DWork.Memory_PreviousInput_kr]; FmgcComputer_DWork.Memory_PreviousInput_km = FmgcComputer_P.Logic_table_mj[(((static_cast (((rtb_adrComputationBus_altitude_corrected_ft_Data >= FmgcComputer_U.in.fms_inputs.thrust_reduction_alt_ft) || FmgcComputer_DWork.Memory_PreviousInput_ne || FmgcComputer_DWork.Memory_PreviousInput_cb || rtb_AND12 || - rtb_GreaterThan3_tmp) && rtb_BusAssignment_h_logic_one_engine_out) << 1) + (rtb_OR_bg || rtb_y_p || + rtb_GreaterThan3_tmp_0) && rtb_BusAssignment_h_logic_one_engine_out) << 1) + (rtb_OR_bg || rtb_y_p || ((FmgcComputer_P.EnumeratedConstant1_Value_e == FmgcComputer_U.in.fms_inputs.fms_flight_phase) && (rtb_adrComputationBus_altitude_corrected_ft_Data < FmgcComputer_U.in.fms_inputs.thrust_reduction_alt_ft)))) << 1) + FmgcComputer_DWork.Memory_PreviousInput_km]; @@ -4059,7 +4083,7 @@ void FmgcComputer::step() rtb_VectorConcatenate[10] = FmgcComputer_P.Constant10_Value; rtb_VectorConcatenate[11] = FmgcComputer_P.Constant10_Value; rtb_VectorConcatenate[12] = FmgcComputer_P.Constant10_Value; - rtb_VectorConcatenate[13] = rtb_AND_e_tmp; + rtb_VectorConcatenate[13] = rtb_y_a0_tmp; rtb_VectorConcatenate[14] = FmgcComputer_P.Constant10_Value; rtb_VectorConcatenate[15] = FmgcComputer_P.Constant10_Value; rtb_VectorConcatenate[16] = FmgcComputer_P.Constant10_Value; @@ -4072,13 +4096,13 @@ void FmgcComputer::step() rtb_VectorConcatenate[2] = rtb_NOT1_i; rtb_VectorConcatenate[3] = FmgcComputer_DWork.Memory_PreviousInput_d; rtb_VectorConcatenate[4] = FmgcComputer_P.Constant3_Value; - rtb_VectorConcatenate[5] = rtb_appCapability_idx_0; - rtb_VectorConcatenate[6] = rtb_y_i2; - rtb_VectorConcatenate[7] = rtb_NOT_b; + rtb_VectorConcatenate[5] = rtb_NOT_b; + rtb_VectorConcatenate[6] = rtb_y_fd; + rtb_VectorConcatenate[7] = rtb_appCapability_idx_2; rtb_VectorConcatenate[8] = rtb_ap_inop_tmp; - rtb_VectorConcatenate[9] = rtb_GreaterThan3; - rtb_VectorConcatenate[10] = rtb_y_me; - rtb_VectorConcatenate[11] = rtb_appInop_idx_2; + rtb_VectorConcatenate[9] = rtb_y_i2; + rtb_VectorConcatenate[10] = rtb_GreaterThan3; + rtb_VectorConcatenate[11] = rtb_y_me; rtb_VectorConcatenate[12] = rtb_TmpSignalConversionAtSFunctionInport3_idx_0; rtb_VectorConcatenate[13] = rtb_TmpSignalConversionAtSFunctionInport3_idx_1; rtb_VectorConcatenate[14] = rtb_TmpSignalConversionAtSFunctionInport3_idx_2; @@ -4149,14 +4173,14 @@ void FmgcComputer::step() rtb_VectorConcatenate_bw[18] = FmgcComputer_P.Constant6_Value; FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate_bw, &rtb_y_fl); rtb_VectorConcatenate_f[0] = rtb_fmgcOppPriority_tmp; - rtb_VectorConcatenate_f[1] = rtb_y_hy; + rtb_VectorConcatenate_f[1] = rtb_GreaterThan3_tmp; rtb_VectorConcatenate_f[2] = FmgcComputer_P.Constant7_Value; rtb_VectorConcatenate_f[3] = (FmgcComputer_DWork.Memory_PreviousInput_ae || FmgcComputer_DWork.Memory_PreviousInput_ev); rtb_VectorConcatenate_f[4] = FmgcComputer_DWork.Memory_PreviousInput_k; rtb_VectorConcatenate_f[5] = FmgcComputer_DWork.Memory_PreviousInput_i; rtb_VectorConcatenate_f[6] = rtb_AND12; - rtb_VectorConcatenate_f[7] = rtb_GreaterThan3_tmp; + rtb_VectorConcatenate_f[7] = rtb_GreaterThan3_tmp_0; rtb_VectorConcatenate_f[8] = (FmgcComputer_DWork.Memory_PreviousInput_ne || FmgcComputer_DWork.Memory_PreviousInput_cb); rtb_VectorConcatenate_f[9] = (FmgcComputer_DWork.Memory_PreviousInput_cb || @@ -4169,7 +4193,7 @@ void FmgcComputer::step() rtb_VectorConcatenate_f[13] = (FmgcComputer_DWork.Memory_PreviousInput_o || FmgcComputer_DWork.Memory_PreviousInput_mx); rtb_VectorConcatenate_f[14] = rtb_y_j; - rtb_VectorConcatenate_f[15] = rtb_Compare_c1; + rtb_VectorConcatenate_f[15] = rtb_Compare_b; rtb_VectorConcatenate_f[16] = ((FmgcComputer_U.in.fms_inputs.preset_mach > FmgcComputer_P.CompareToConstant3_const_p) || (FmgcComputer_U.in.fms_inputs.preset_spd_kts > FmgcComputer_P.CompareToConstant4_const_ny)); rtb_VectorConcatenate_f[17] = FmgcComputer_P.Constant7_Value; @@ -4189,10 +4213,10 @@ void FmgcComputer::step() rtb_VectorConcatenate_f[11] = FmgcComputer_P.Constant8_Value; rtb_VectorConcatenate_f[12] = FmgcComputer_DWork.Memory_PreviousInput_b; rtb_VectorConcatenate_f[13] = FmgcComputer_P.Constant8_Value; - rtb_VectorConcatenate_f[14] = rtb_NOT_k; + rtb_VectorConcatenate_f[14] = rtb_NOT_c; rtb_VectorConcatenate_f[15] = FmgcComputer_DWork.Memory_PreviousInput_m; rtb_VectorConcatenate_f[16] = FmgcComputer_P.Constant8_Value; - rtb_VectorConcatenate_f[17] = rtb_AND_e_tmp_0; + rtb_VectorConcatenate_f[17] = rtb_AND_e_tmp; rtb_VectorConcatenate_f[18] = FmgcComputer_P.Constant8_Value; FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate_f, &rtb_y_gtq); rtb_VectorConcatenate_f[0] = FmgcComputer_P.Constant9_Value; @@ -4237,7 +4261,7 @@ void FmgcComputer::step() rtb_VectorConcatenate_f[13] = rtb_NOT3; rtb_VectorConcatenate_f[14] = rtb_y_g; rtb_VectorConcatenate_f[15] = FmgcComputer_P.Constant1_Value_a; - rtb_VectorConcatenate_f[16] = rtb_NOT_m; + rtb_VectorConcatenate_f[16] = rtb_NOT_oj; rtb_VectorConcatenate_f[17] = (rtb_BusAssignment_hk_ap_fd_logic_tcas_vs_target > FmgcComputer_P.CompareToConstant5_const_hr); rtb_VectorConcatenate_f[18] = (rtb_BusAssignment_hk_ap_fd_logic_tcas_vs_target < @@ -4363,7 +4387,7 @@ void FmgcComputer::step() FmgcComputer_Y.out.ap_fd_logic.lateral_modes.rwy_loc_submode_active = FmgcComputer_DWork.Memory_PreviousInput_c; FmgcComputer_Y.out.ap_fd_logic.lateral_modes.rwy_trk_submode_active = FmgcComputer_DWork.Memory_PreviousInput_b; FmgcComputer_Y.out.ap_fd_logic.lateral_modes.land_active = FmgcComputer_DWork.Memory_PreviousInput_d; - FmgcComputer_Y.out.ap_fd_logic.lateral_modes.align_submode_active = rtb_NOT_k; + FmgcComputer_Y.out.ap_fd_logic.lateral_modes.align_submode_active = rtb_NOT_c; FmgcComputer_Y.out.ap_fd_logic.lateral_modes.rollout_submode_active = FmgcComputer_DWork.Memory_PreviousInput_m; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.clb_active = FmgcComputer_DWork.Memory_PreviousInput_ec; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.des_active = FmgcComputer_DWork.Memory_PreviousInput_b3; @@ -4374,10 +4398,10 @@ void FmgcComputer::step() FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.pitch_takeoff_active = FmgcComputer_DWork.Memory_PreviousInput_k; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.pitch_goaround_active = FmgcComputer_DWork.Memory_PreviousInput_i; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.vs_active = rtb_AND12; - FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.fpa_active = rtb_GreaterThan3_tmp; + FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.fpa_active = rtb_GreaterThan3_tmp_0; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.alt_acq_active = FmgcComputer_DWork.Memory_PreviousInput_ne; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.alt_hold_active = FmgcComputer_DWork.Memory_PreviousInput_cb; - FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.fma_dash_display = rtb_Compare_c1; + FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.fma_dash_display = rtb_Compare_b; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.gs_capt_active = FmgcComputer_DWork.Memory_PreviousInput_nu; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.gs_trk_active = FmgcComputer_DWork.Memory_PreviousInput_as; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.final_des_active = rtb_Logic_b[0]; @@ -4402,37 +4426,39 @@ void FmgcComputer::step() FmgcComputer_Y.out.ap_fd_logic.mach_control_active = FmgcComputer_DWork.Delay_DSTATE_c; FmgcComputer_Y.out.ap_fd_logic.spd_target_kts = rtb_Switch_e[0]; FmgcComputer_Y.out.ap_fd_logic.pfd_spd_target_kts = rtb_Switch_e[1]; - FmgcComputer_Y.out.ap_fd_logic.alt_cstr_applicable = rtb_AND_iz; + FmgcComputer_Y.out.ap_fd_logic.alt_cstr_applicable = rtb_AND_j; FmgcComputer_Y.out.ap_fd_logic.alt_sel_or_cstr = rtb_altCstrOrFcu; FmgcComputer_Y.out.ap_fd_logic.fmgc_opp_mode_sync = rtb_OR2_l; FmgcComputer_Y.out.ap_fd_logic.any_ap_fd_engaged = apCondition; FmgcComputer_Y.out.ap_fd_logic.any_lateral_mode_engaged = rtb_OR1_j; - FmgcComputer_Y.out.ap_fd_logic.any_longitudinal_mode_engaged = rtb_y_fd; + FmgcComputer_Y.out.ap_fd_logic.any_longitudinal_mode_engaged = rtb_Compare_a5; + FmgcComputer_Y.out.ap_fd_logic.lateral_mode_reset = rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset; + FmgcComputer_Y.out.ap_fd_logic.longitudinal_mode_reset = rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset; FmgcComputer_Y.out.ap_fd_logic.hdg_trk_preset_available = FmgcComputer_DWork.Memory_PreviousInput_bw; FmgcComputer_Y.out.ap_fd_logic.alt_soft_mode_active = rtb_Logic_hq[0]; FmgcComputer_Y.out.ap_fd_logic.fd_auto_disengage = rtb_y_lh; FmgcComputer_Y.out.ap_fd_logic.ap_fd_mode_reversion = rtb_NOT3_tmp_0; FmgcComputer_Y.out.ap_fd_logic.lateral_mode_reversion = rtb_OR2_l_tmp_0; FmgcComputer_Y.out.ap_fd_logic.longitudinal_mode_reversion_vs = Memory_PreviousInput_k_tmp_tmp_0; - FmgcComputer_Y.out.ap_fd_logic.longitudinal_mode_reversion_op_clb = rtb_OR2_l_tmp; - FmgcComputer_Y.out.ap_fd_logic.pitch_fd_bars_flashing = rtb_AND_e_tmp; - FmgcComputer_Y.out.ap_fd_logic.roll_fd_bars_flashing = rtb_AND_e_tmp_0; + FmgcComputer_Y.out.ap_fd_logic.longitudinal_mode_reversion_op_clb = rtb_y_hy; + FmgcComputer_Y.out.ap_fd_logic.pitch_fd_bars_flashing = rtb_y_a0_tmp; + FmgcComputer_Y.out.ap_fd_logic.roll_fd_bars_flashing = rtb_AND_e_tmp; FmgcComputer_Y.out.ap_fd_logic.loc_bc_selection = rtP_fmgc_ap_fd_logic_output_MATLABStruct.loc_bc_selection; FmgcComputer_Y.out.ap_fd_logic.vs_target_not_held = rtb_y_c; FmgcComputer_Y.out.ap_fd_logic.tcas_vs_target = rtb_BusAssignment_hk_ap_fd_logic_tcas_vs_target; - FmgcComputer_Y.out.ap_fd_logic.tcas_ra_corrective = rtb_NOT_m; + FmgcComputer_Y.out.ap_fd_logic.tcas_ra_corrective = rtb_NOT_oj; FmgcComputer_Y.out.ap_fd_logic.active_tcas_submode = rtb_mode; - FmgcComputer_Y.out.ap_fd_logic.tcas_alt_acq_cond = rtb_NOT_c; + FmgcComputer_Y.out.ap_fd_logic.tcas_alt_acq_cond = rtb_NOT_gj; FmgcComputer_Y.out.ap_fd_logic.tcas_alt_hold_cond = Memory_PreviousInput_k_tmp_tmp_tmp; FmgcComputer_Y.out.ap_fd_logic.tcas_ra_inhibited = rtb_NOT3; FmgcComputer_Y.out.ap_fd_logic.trk_fpa_deselected = rtb_y_g; FmgcComputer_Y.out.ap_fd_logic.longi_large_box_tcas = rtb_BusAssignment_hk_ap_fd_logic_longi_large_box_tcas; - FmgcComputer_Y.out.ap_fd_logic.land_2_capability = rtb_appCapability_idx_0; - FmgcComputer_Y.out.ap_fd_logic.land_3_fail_passive_capability = rtb_y_i2; - FmgcComputer_Y.out.ap_fd_logic.land_3_fail_op_capability = rtb_NOT_b; - FmgcComputer_Y.out.ap_fd_logic.land_2_inop = rtb_GreaterThan3; - FmgcComputer_Y.out.ap_fd_logic.land_3_fail_passive_inop = rtb_y_me; - FmgcComputer_Y.out.ap_fd_logic.land_3_fail_op_inop = rtb_appInop_idx_2; + FmgcComputer_Y.out.ap_fd_logic.land_2_capability = rtb_NOT_b; + FmgcComputer_Y.out.ap_fd_logic.land_3_fail_passive_capability = rtb_y_fd; + FmgcComputer_Y.out.ap_fd_logic.land_3_fail_op_capability = rtb_appCapability_idx_2; + FmgcComputer_Y.out.ap_fd_logic.land_2_inop = rtb_y_i2; + FmgcComputer_Y.out.ap_fd_logic.land_3_fail_passive_inop = rtb_GreaterThan3; + FmgcComputer_Y.out.ap_fd_logic.land_3_fail_op_inop = rtb_y_me; FmgcComputer_Y.out.ap_fd_logic.land_2_capacity = rtb_TmpSignalConversionAtSFunctionInport3_idx_0; FmgcComputer_Y.out.ap_fd_logic.land_3_fail_passive_capacity = rtb_TmpSignalConversionAtSFunctionInport3_idx_1; FmgcComputer_Y.out.ap_fd_logic.land_3_fail_op_capacity = rtb_TmpSignalConversionAtSFunctionInport3_idx_2; @@ -4444,7 +4470,7 @@ void FmgcComputer::step() FmgcComputer_Y.out.ap_fd_outer_loops.autopilot.Theta_c_deg = rtb_DataTypeConversion_cm; FmgcComputer_Y.out.ap_fd_outer_loops.autopilot.Phi_c_deg = rtb_BusAssignment_b_logic_ra_computation_data_ft; FmgcComputer_Y.out.ap_fd_outer_loops.autopilot.Beta_c_deg = rtb_Beta_c_deg_e; - FmgcComputer_Y.out.ap_fd_outer_loops.flare_law.condition_Flare = rtb_Compare_bj; + FmgcComputer_Y.out.ap_fd_outer_loops.flare_law.condition_Flare = rtb_Compare_du; FmgcComputer_Y.out.ap_fd_outer_loops.flare_law.H_dot_radio_fpm = rtb_H_dot_radio_fpm; FmgcComputer_Y.out.ap_fd_outer_loops.flare_law.H_dot_c_fpm = rtb_H_dot_c_fpm; FmgcComputer_Y.out.ap_fd_outer_loops.flare_law.delta_Theta_H_dot_deg = rtb_delta_Theta_H_dot_deg; @@ -4516,7 +4542,7 @@ void FmgcComputer::step() } FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.roll_fd_command.Data = static_cast(rtb_Phi_c_deg); - if (rtb_y_fd && rtb_y_j5) { + if (rtb_Compare_a5 && rtb_y_j5) { FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.pitch_fd_command.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); } else { @@ -4525,7 +4551,7 @@ void FmgcComputer::step() } FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.pitch_fd_command.Data = static_cast(rtb_Theta_c_deg); - if (FmgcComputer_DWork.Memory_PreviousInput_c || rtb_NOT_k || FmgcComputer_DWork.Memory_PreviousInput_m) { + if (FmgcComputer_DWork.Memory_PreviousInput_c || rtb_NOT_c || FmgcComputer_DWork.Memory_PreviousInput_m) { FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.yaw_fd_command.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); } else { @@ -4539,7 +4565,7 @@ void FmgcComputer::step() FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.discrete_word_4.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.discrete_word_4.Data = rtb_DataTypeConversion2_bh; - if (rtb_AND_iz) { + if (rtb_AND_j) { FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.fm_alt_constraint_ft.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); } else { @@ -4693,7 +4719,7 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_loc_submode_active = FmgcComputer_DWork.Memory_PreviousInput_c; FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_trk_submode_active = FmgcComputer_DWork.Memory_PreviousInput_b; FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active = FmgcComputer_DWork.Memory_PreviousInput_d; - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.align_submode_active = rtb_NOT_k; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.align_submode_active = rtb_NOT_c; FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rollout_submode_active = FmgcComputer_DWork.Memory_PreviousInput_m; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active = FmgcComputer_DWork.Memory_PreviousInput_ec; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active = FmgcComputer_DWork.Memory_PreviousInput_b3; @@ -4704,10 +4730,10 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active = FmgcComputer_DWork.Memory_PreviousInput_k; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active = FmgcComputer_DWork.Memory_PreviousInput_i; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.vs_active = rtb_AND12; - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fpa_active = rtb_GreaterThan3_tmp; + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fpa_active = rtb_GreaterThan3_tmp_0; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active = FmgcComputer_DWork.Memory_PreviousInput_ne; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_hold_active = FmgcComputer_DWork.Memory_PreviousInput_cb; - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fma_dash_display = rtb_Compare_c1; + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fma_dash_display = rtb_Compare_b; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active = FmgcComputer_DWork.Memory_PreviousInput_nu; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active = FmgcComputer_DWork.Memory_PreviousInput_as; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active = rtb_Logic_b[0]; @@ -4732,36 +4758,38 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.mach_control_active = FmgcComputer_DWork.Delay_DSTATE_c; FmgcComputer_DWork.Delay_DSTATE.spd_target_kts = rtb_Switch_e[0]; FmgcComputer_DWork.Delay_DSTATE.pfd_spd_target_kts = rtb_Switch_e[1]; - FmgcComputer_DWork.Delay_DSTATE.alt_cstr_applicable = rtb_AND_iz; + FmgcComputer_DWork.Delay_DSTATE.alt_cstr_applicable = rtb_AND_j; FmgcComputer_DWork.Delay_DSTATE.alt_sel_or_cstr = rtb_altCstrOrFcu; FmgcComputer_DWork.Delay_DSTATE.fmgc_opp_mode_sync = rtb_OR2_l; FmgcComputer_DWork.Delay_DSTATE.any_ap_fd_engaged = apCondition; FmgcComputer_DWork.Delay_DSTATE.any_lateral_mode_engaged = rtb_OR1_j; + FmgcComputer_DWork.Delay_DSTATE.lateral_mode_reset = rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset; + FmgcComputer_DWork.Delay_DSTATE.longitudinal_mode_reset = rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset; FmgcComputer_DWork.Delay_DSTATE.hdg_trk_preset_available = FmgcComputer_DWork.Memory_PreviousInput_bw; FmgcComputer_DWork.Delay_DSTATE.alt_soft_mode_active = rtb_Logic_hq[0]; FmgcComputer_DWork.Delay_DSTATE.fd_auto_disengage = rtb_y_lh; FmgcComputer_DWork.Delay_DSTATE.ap_fd_mode_reversion = rtb_NOT3_tmp_0; FmgcComputer_DWork.Delay_DSTATE.lateral_mode_reversion = rtb_OR2_l_tmp_0; FmgcComputer_DWork.Delay_DSTATE.longitudinal_mode_reversion_vs = Memory_PreviousInput_k_tmp_tmp_0; - FmgcComputer_DWork.Delay_DSTATE.longitudinal_mode_reversion_op_clb = rtb_OR2_l_tmp; - FmgcComputer_DWork.Delay_DSTATE.pitch_fd_bars_flashing = rtb_AND_e_tmp; - FmgcComputer_DWork.Delay_DSTATE.roll_fd_bars_flashing = rtb_AND_e_tmp_0; + FmgcComputer_DWork.Delay_DSTATE.longitudinal_mode_reversion_op_clb = rtb_y_hy; + FmgcComputer_DWork.Delay_DSTATE.pitch_fd_bars_flashing = rtb_y_a0_tmp; + FmgcComputer_DWork.Delay_DSTATE.roll_fd_bars_flashing = rtb_AND_e_tmp; FmgcComputer_DWork.Delay_DSTATE.loc_bc_selection = rtP_fmgc_ap_fd_logic_output_MATLABStruct.loc_bc_selection; FmgcComputer_DWork.Delay_DSTATE.vs_target_not_held = rtb_y_c; FmgcComputer_DWork.Delay_DSTATE.tcas_vs_target = rtb_BusAssignment_hk_ap_fd_logic_tcas_vs_target; - FmgcComputer_DWork.Delay_DSTATE.tcas_ra_corrective = rtb_NOT_m; + FmgcComputer_DWork.Delay_DSTATE.tcas_ra_corrective = rtb_NOT_oj; FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode = rtb_mode; - FmgcComputer_DWork.Delay_DSTATE.tcas_alt_acq_cond = rtb_NOT_c; + FmgcComputer_DWork.Delay_DSTATE.tcas_alt_acq_cond = rtb_NOT_gj; FmgcComputer_DWork.Delay_DSTATE.tcas_alt_hold_cond = Memory_PreviousInput_k_tmp_tmp_tmp; FmgcComputer_DWork.Delay_DSTATE.tcas_ra_inhibited = rtb_NOT3; FmgcComputer_DWork.Delay_DSTATE.trk_fpa_deselected = rtb_y_g; FmgcComputer_DWork.Delay_DSTATE.longi_large_box_tcas = rtb_BusAssignment_hk_ap_fd_logic_longi_large_box_tcas; - FmgcComputer_DWork.Delay_DSTATE.land_2_capability = rtb_appCapability_idx_0; - FmgcComputer_DWork.Delay_DSTATE.land_3_fail_passive_capability = rtb_y_i2; - FmgcComputer_DWork.Delay_DSTATE.land_3_fail_op_capability = rtb_NOT_b; - FmgcComputer_DWork.Delay_DSTATE.land_2_inop = rtb_GreaterThan3; - FmgcComputer_DWork.Delay_DSTATE.land_3_fail_passive_inop = rtb_y_me; - FmgcComputer_DWork.Delay_DSTATE.land_3_fail_op_inop = rtb_appInop_idx_2; + FmgcComputer_DWork.Delay_DSTATE.land_2_capability = rtb_NOT_b; + FmgcComputer_DWork.Delay_DSTATE.land_3_fail_passive_capability = rtb_y_fd; + FmgcComputer_DWork.Delay_DSTATE.land_3_fail_op_capability = rtb_appCapability_idx_2; + FmgcComputer_DWork.Delay_DSTATE.land_2_inop = rtb_y_i2; + FmgcComputer_DWork.Delay_DSTATE.land_3_fail_passive_inop = rtb_GreaterThan3; + FmgcComputer_DWork.Delay_DSTATE.land_3_fail_op_inop = rtb_y_me; FmgcComputer_DWork.Delay_DSTATE.land_2_capacity = rtb_TmpSignalConversionAtSFunctionInport3_idx_0; FmgcComputer_DWork.Delay_DSTATE.land_3_fail_passive_capacity = rtb_TmpSignalConversionAtSFunctionInport3_idx_1; FmgcComputer_DWork.Delay_DSTATE.land_3_fail_op_capacity = rtb_TmpSignalConversionAtSFunctionInport3_idx_2; @@ -4774,7 +4802,7 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay2_DSTATE.flight_director.Phi_c_deg = rtb_Phi_c_deg; FmgcComputer_DWork.Delay2_DSTATE.flight_director.Beta_c_deg = rtb_Beta_c_deg; FmgcComputer_DWork.Delay2_DSTATE.autopilot.Beta_c_deg = rtb_Beta_c_deg_e; - FmgcComputer_DWork.Delay2_DSTATE.flare_law.condition_Flare = rtb_Compare_bj; + FmgcComputer_DWork.Delay2_DSTATE.flare_law.condition_Flare = rtb_Compare_du; FmgcComputer_DWork.Delay2_DSTATE.flare_law.H_dot_radio_fpm = rtb_H_dot_radio_fpm; FmgcComputer_DWork.Delay2_DSTATE.flare_law.H_dot_c_fpm = rtb_H_dot_c_fpm; FmgcComputer_DWork.Delay2_DSTATE.flare_law.delta_Theta_H_dot_deg = rtb_delta_Theta_H_dot_deg; diff --git a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.h b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.h index 6f94bff4c75..a7feaf05606 100644 --- a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.h +++ b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.h @@ -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; @@ -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; @@ -449,7 +452,7 @@ 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; @@ -884,6 +887,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; diff --git a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_data.cpp b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_data.cpp index 4e4bed05e3c..b842ed20beb 100644 --- a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_data.cpp +++ b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_data.cpp @@ -74,6 +74,8 @@ base_fmgc_ap_fd_logic_outputs rtP_fmgc_ap_fd_logic_output_MATLABStruct{ false, false, false, + false, + false, 0.0, false, tcas_submode::VS, @@ -248,11 +250,13 @@ FmgcComputer::Parameters_FmgcComputer_T FmgcComputer::FmgcComputer_P{ 17.0, 11.0, 14.0, + 24.0, 17.0, 25.0, 17.0, 12.0, 14.0, + 24.0, 17.0, 11.0, 14.0, @@ -261,10 +265,10 @@ FmgcComputer::Parameters_FmgcComputer_T FmgcComputer::FmgcComputer_P{ 14.0, 18.0, 11.0, - 14.0, + 24.0, 22.0, 12.0, - 14.0, + 24.0, 22.0, 22.0, 21.0, @@ -727,6 +731,7 @@ FmgcComputer::Parameters_FmgcComputer_T FmgcComputer::FmgcComputer_P{ true, true, true, + true, false, true, true, @@ -2772,6 +2777,8 @@ FmgcComputer::Parameters_FmgcComputer_T FmgcComputer::FmgcComputer_P{ false, false, false, + false, + false, 0.0, false, tcas_submode::VS, @@ -3846,6 +3853,8 @@ FmgcComputer::Parameters_FmgcComputer_T FmgcComputer::FmgcComputer_P{ false, false, false, + false, + false, 0.0, false, tcas_submode::VS, diff --git a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_types.h b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_types.h index 2a635795872..a6624521673 100644 --- a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_types.h +++ b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_types.h @@ -92,49 +92,6 @@ struct base_ils_bus #endif -#ifndef DEFINED_TYPEDEF_FOR_base_fmgc_a_bus_ -#define DEFINED_TYPEDEF_FOR_base_fmgc_a_bus_ - -struct base_fmgc_a_bus -{ - base_arinc_429 pfd_sel_spd_kts; - base_arinc_429 runway_hdg_memorized_deg; - base_arinc_429 preset_mach_from_mcdu; - base_arinc_429 preset_speed_from_mcdu_kts; - base_arinc_429 roll_fd_command; - base_arinc_429 pitch_fd_command; - base_arinc_429 yaw_fd_command; - base_arinc_429 discrete_word_5; - base_arinc_429 discrete_word_4; - base_arinc_429 fm_alt_constraint_ft; - base_arinc_429 altitude_ft; - base_arinc_429 mach; - base_arinc_429 cas_kts; - base_arinc_429 flx_to_temp_deg_c; - base_arinc_429 ats_discrete_word; - base_arinc_429 ats_fma_discrete_word; - base_arinc_429 discrete_word_3; - base_arinc_429 discrete_word_1; - base_arinc_429 discrete_word_2; - base_arinc_429 discrete_word_6; - base_arinc_429 synchro_spd_mach_value; - base_arinc_429 low_target_speed_margin_kts; - base_arinc_429 high_target_speed_margin_kts; - base_arinc_429 delta_p_ail_voted_cmd_deg; - base_arinc_429 delta_p_splr_voted_cmd_deg; - base_arinc_429 delta_r_voted_cmd_deg; - base_arinc_429 delta_nosewheel_voted_cmd_deg; - base_arinc_429 delta_q_voted_cmd_deg; - base_arinc_429 track_deg; - base_arinc_429 heading_deg; - base_arinc_429 fpa_deg; - base_arinc_429 n1_command_percent; - base_arinc_429 vertical_speed_ft_min; - base_arinc_429 discrete_word_7; -}; - -#endif - #ifndef DEFINED_TYPEDEF_FOR_base_fmgc_discrete_inputs_ #define DEFINED_TYPEDEF_FOR_base_fmgc_discrete_inputs_ @@ -206,6 +163,49 @@ struct base_fmgc_b_bus #endif +#ifndef DEFINED_TYPEDEF_FOR_base_fmgc_a_bus_ +#define DEFINED_TYPEDEF_FOR_base_fmgc_a_bus_ + +struct base_fmgc_a_bus +{ + base_arinc_429 pfd_sel_spd_kts; + base_arinc_429 runway_hdg_memorized_deg; + base_arinc_429 preset_mach_from_mcdu; + base_arinc_429 preset_speed_from_mcdu_kts; + base_arinc_429 roll_fd_command; + base_arinc_429 pitch_fd_command; + base_arinc_429 yaw_fd_command; + base_arinc_429 discrete_word_5; + base_arinc_429 discrete_word_4; + base_arinc_429 fm_alt_constraint_ft; + base_arinc_429 altitude_ft; + base_arinc_429 mach; + base_arinc_429 cas_kts; + base_arinc_429 flx_to_temp_deg_c; + base_arinc_429 ats_discrete_word; + base_arinc_429 ats_fma_discrete_word; + base_arinc_429 discrete_word_3; + base_arinc_429 discrete_word_1; + base_arinc_429 discrete_word_2; + base_arinc_429 discrete_word_6; + base_arinc_429 synchro_spd_mach_value; + base_arinc_429 low_target_speed_margin_kts; + base_arinc_429 high_target_speed_margin_kts; + base_arinc_429 delta_p_ail_voted_cmd_deg; + base_arinc_429 delta_p_splr_voted_cmd_deg; + base_arinc_429 delta_r_voted_cmd_deg; + base_arinc_429 delta_nosewheel_voted_cmd_deg; + base_arinc_429 delta_q_voted_cmd_deg; + base_arinc_429 track_deg; + base_arinc_429 heading_deg; + base_arinc_429 fpa_deg; + base_arinc_429 n1_command_percent; + base_arinc_429 vertical_speed_ft_min; + base_arinc_429 discrete_word_7; +}; + +#endif + #ifndef DEFINED_TYPEDEF_FOR_base_time_ #define DEFINED_TYPEDEF_FOR_base_time_ @@ -654,6 +654,8 @@ struct base_fmgc_ap_fd_logic_outputs boolean_T any_ap_fd_engaged; boolean_T any_lateral_mode_engaged; boolean_T any_longitudinal_mode_engaged; + boolean_T lateral_mode_reset; + boolean_T longitudinal_mode_reset; boolean_T hdg_trk_preset_available; boolean_T alt_soft_mode_active; boolean_T fd_auto_disengage; diff --git a/fbw-a32nx/src/wasm/fbw_a320/src/recording/FlightDataRecorder.h b/fbw-a32nx/src/wasm/fbw_a320/src/recording/FlightDataRecorder.h index c2919f1e6b9..0323246dfa5 100644 --- a/fbw-a32nx/src/wasm/fbw_a320/src/recording/FlightDataRecorder.h +++ b/fbw-a32nx/src/wasm/fbw_a320/src/recording/FlightDataRecorder.h @@ -14,7 +14,7 @@ class FlightDataRecorder { public: // IMPORTANT: this constant needs to increased with every interface change - const uint64_t INTERFACE_VERSION = 3200002; + const uint64_t INTERFACE_VERSION = 3200003; const uint32_t NUMBER_OF_ELAC_TO_WRITE = 2; const uint32_t NUMBER_OF_SEC_TO_WRITE = 3; From 7da587e389ad3ec2c8aeefa6cc90dd577e64c5f8 Mon Sep 17 00:00:00 2001 From: Lukas Michels Date: Thu, 26 Dec 2024 21:03:00 +0100 Subject: [PATCH 02/17] fix(fmgc): CAT 1 when no RA is NO --- .../wasm/fbw_a320/src/model/FmgcComputer.cpp | 1533 +++++++++-------- .../wasm/fbw_a320/src/model/FmgcComputer.h | 58 +- .../fbw_a320/src/model/FmgcComputer_data.cpp | 47 +- .../fbw_a320/src/model/FmgcComputer_types.h | 142 +- 4 files changed, 911 insertions(+), 869 deletions(-) diff --git a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.cpp b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.cpp index 3d59f4cb908..a2be9c8b1ad 100644 --- a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.cpp +++ b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.cpp @@ -94,6 +94,11 @@ void FmgcComputer::FmgcComputer_MATLABFunction_ie(const base_arinc_429 *rtu_u, b *rty_y = (rtu_u->SSM == static_cast(SignStatusMatrix::NormalOperation)); } +void FmgcComputer::FmgcComputer_MATLABFunction_c(const base_arinc_429 *rtu_u, real32_T *rty_y) +{ + *rty_y = rtu_u->Data; +} + void FmgcComputer::FmgcComputer_LeadLagFilter_Reset(rtDW_LeadLagFilter_FmgcComputer_T *localDW) { localDW->pY_not_empty = false; @@ -148,7 +153,7 @@ void FmgcComputer::FmgcComputer_LagFilter(real32_T rtu_U, real_T rtu_C1, real_T localDW->pU = rtu_U; } -void FmgcComputer::FmgcComputer_MATLABFunction_o_Reset(rtDW_MATLABFunction_FmgcComputer_f_T *localDW) +void FmgcComputer::FmgcComputer_MATLABFunction_oh_Reset(rtDW_MATLABFunction_FmgcComputer_f_T *localDW) { localDW->previousInput = false; localDW->remainingTriggerTime = 0.0; @@ -202,6 +207,8 @@ void FmgcComputer::step() real_T rtb_delta_Theta_beta_c_deg; base_arinc_429 rtb_BusAssignment_b0_logic_ils_computation_data_glideslope_deviation_deg; base_arinc_429 rtb_BusAssignment_b_logic_ir_computation_data_heading_true_deg; + base_arinc_429 rtb_BusAssignment_be_logic_ra_computation_data_radio_height_ft; + base_arinc_429 rtb_BusAssignment_cp_logic_ra_computation_data_radio_height_ft; base_arinc_429 rtb_BusAssignment_dc_logic_adr_computation_data_airspeed_computed_kn; base_arinc_429 rtb_BusAssignment_dc_logic_adr_computation_data_corrected_average_static_pressure; base_arinc_429 rtb_BusAssignment_dc_logic_chosen_fac_bus_v_3_kn; @@ -222,6 +229,8 @@ void FmgcComputer::step() base_arinc_429 rtb_BusAssignment_gk_logic_ir_computation_data_pitch_angle_deg; base_arinc_429 rtb_BusAssignment_gk_logic_ir_computation_data_roll_angle_deg; base_arinc_429 rtb_BusAssignment_gt_logic_ir_computation_data_inertial_vertical_speed_ft_s; + base_arinc_429 rtb_BusAssignment_gt_logic_ra_computation_data_radio_height_ft; + base_arinc_429 rtb_BusAssignment_hz_logic_ra_computation_data_radio_height_ft; base_arinc_429 rtb_BusAssignment_i2_logic_adr_computation_data_airspeed_computed_kn; base_arinc_429 rtb_BusAssignment_i2_logic_chosen_fac_bus_discrete_word_5; base_arinc_429 rtb_BusAssignment_i2_logic_chosen_fac_bus_v_max_kn; @@ -241,6 +250,7 @@ void FmgcComputer::step() base_arinc_429 rtb_BusAssignment_jm_logic_chosen_fac_bus_v_max_kn; base_arinc_429 rtb_BusAssignment_jm_logic_ils_computation_data_glideslope_deviation_deg; base_arinc_429 rtb_BusAssignment_jm_logic_ir_computation_data_track_angle_magnetic_deg; + base_arinc_429 rtb_BusAssignment_jm_logic_ra_computation_data_radio_height_ft; base_arinc_429 rtb_BusAssignment_kc_logic_adr_computation_data_airspeed_computed_kn; base_arinc_429 rtb_BusAssignment_kc_logic_chosen_fac_bus_v_ls_kn; base_arinc_429 rtb_BusAssignment_kc_logic_chosen_fac_bus_v_max_kn; @@ -255,12 +265,13 @@ void FmgcComputer::step() base_arinc_429 rtb_BusAssignment_lz_logic_chosen_fac_bus_v_max_kn; base_arinc_429 rtb_BusAssignment_m_logic_adr_computation_data_vertical_speed_ft_min; base_arinc_429 rtb_BusAssignment_n_logic_chosen_fac_bus_discrete_word_5; + base_arinc_429 rtb_BusAssignment_na_logic_ra_computation_data_radio_height_ft; base_arinc_429 rtb_BusAssignment_o3_logic_adr_computation_data_airspeed_computed_kn; base_arinc_429 rtb_BusAssignment_o3_logic_chosen_fac_bus_v_ls_kn; base_arinc_429 rtb_BusAssignment_o3_logic_chosen_fac_bus_v_max_kn; + base_arinc_429 rtb_BusAssignment_o_logic_ra_computation_data_radio_height_ft; base_arinc_429 rtb_BusAssignment_pw_logic_ils_computation_data_runway_heading_deg; - real_T rtb_Switch_e[2]; - real_T rtb_BusAssignment_b_logic_ra_computation_data_ft; + real_T rtb_Switch_of[2]; real_T rtb_BusAssignment_hk_ap_fd_logic_tcas_vs_target; real_T rtb_DataTypeConversion10; real_T rtb_DataTypeConversion11; @@ -274,6 +285,7 @@ void FmgcComputer::step() real_T rtb_DataTypeConversion21; real_T rtb_DataTypeConversion22; real_T rtb_DataTypeConversion23; + real_T rtb_DataTypeConversion24; real_T rtb_DataTypeConversion25; real_T rtb_DataTypeConversion26; real_T rtb_DataTypeConversion27; @@ -340,20 +352,20 @@ void FmgcComputer::step() real32_T rtb_irComputationBus_pitch_att_rate_deg_s_Data; real32_T rtb_irComputationBus_roll_angle_deg_Data; real32_T rtb_irComputationBus_track_angle_true_deg_Data; - real32_T rtb_raComputationData; + real32_T rtb_raComputationData_radio_height_ft_Data; real32_T rtb_y_cf; - real32_T rtb_y_d; real32_T rtb_y_fl; + real32_T rtb_y_g; real32_T rtb_y_gtq; real32_T rtb_y_jq; real32_T rtb_y_mw; uint32_T rtb_DataTypeConversion1_e; uint32_T rtb_DataTypeConversion1_j; + uint32_T rtb_Switch9; uint32_T rtb_Switch_center_of_gravity_pos_percent_SSM; uint32_T rtb_Switch_discrete_word_5_SSM; uint32_T rtb_Switch_estimated_sideslip_deg_SSM; uint32_T rtb_Switch_i_glideslope_deviation_deg_SSM; - uint32_T rtb_Switch_m; uint32_T rtb_Switch_total_weight_lbs_SSM; uint32_T rtb_Switch_v_3_kn_SSM; uint32_T rtb_Switch_v_4_kn_SSM; @@ -372,6 +384,7 @@ void FmgcComputer::step() uint32_T rtb_irComputationBus_pitch_angle_deg_SSM; uint32_T rtb_irComputationBus_roll_angle_deg_SSM; uint32_T rtb_irComputationBus_track_angle_magnetic_deg_SSM; + uint32_T rtb_raComputationData_radio_height_ft_SSM; uint32_T rtb_y; uint32_T rtb_y_jm; int8_T rtb_handleIndex; @@ -384,12 +397,15 @@ void FmgcComputer::step() boolean_T rtb_Logic_hq[2]; boolean_T apCondition; boolean_T fdOppOff; + boolean_T fdOwnOff; boolean_T raOppInvalid; boolean_T raOwnInvalid; boolean_T rtb_AND12; boolean_T rtb_AND1_c0; + boolean_T rtb_AND8; boolean_T rtb_AND9; boolean_T rtb_AND_j; + boolean_T rtb_BusAssignment_b_logic_ils_tune_inhibit; boolean_T rtb_BusAssignment_gk_logic_ap_fd_common_condition; boolean_T rtb_BusAssignment_h_logic_engine_running; boolean_T rtb_BusAssignment_h_logic_fcu_failure; @@ -401,12 +417,13 @@ void FmgcComputer::step() boolean_T rtb_BusAssignment_o_logic_both_ils_valid; boolean_T rtb_BusAssignment_o_logic_ils_failure; boolean_T rtb_Compare_a5; - boolean_T rtb_Compare_b; - boolean_T rtb_Compare_d0; + boolean_T rtb_Compare_bm; + boolean_T rtb_Compare_d2; boolean_T rtb_Compare_du; - boolean_T rtb_Compare_kg; + boolean_T rtb_Compare_fn; + boolean_T rtb_Compare_gc; + boolean_T rtb_Compare_mh; boolean_T rtb_GreaterThan3; - boolean_T rtb_GreaterThan3_tmp; boolean_T rtb_NOT1_i; boolean_T rtb_NOT3; boolean_T rtb_NOT_b; @@ -415,7 +432,6 @@ void FmgcComputer::step() boolean_T rtb_NOT_oj; boolean_T rtb_OR1_j; boolean_T rtb_OR2_l; - boolean_T rtb_OR_bg; boolean_T rtb_OR_m4; boolean_T rtb_TmpSignalConversionAtSFunctionInport3_idx_0; boolean_T rtb_TmpSignalConversionAtSFunctionInport3_idx_1; @@ -426,36 +442,33 @@ void FmgcComputer::step() boolean_T rtb_ap_inop_tmp; boolean_T rtb_ap_inop_tmp_tmp; boolean_T rtb_appCapability_idx_2; - boolean_T rtb_bothRaValid; + boolean_T rtb_appInop_idx_2; boolean_T rtb_doubleAdrFault; - boolean_T rtb_dualRaFailure; - boolean_T rtb_fmgcOppPriority_tmp; boolean_T rtb_ir3Invalid; boolean_T rtb_irOwnInvalid; boolean_T rtb_y_ai; - boolean_T rtb_y_c; + boolean_T rtb_y_cj; + boolean_T rtb_y_cq; boolean_T rtb_y_da; + boolean_T rtb_y_dm; boolean_T rtb_y_e; boolean_T rtb_y_fd; boolean_T rtb_y_ff; - boolean_T rtb_y_fi; - boolean_T rtb_y_g; - boolean_T rtb_y_ga; - boolean_T rtb_y_hb; + boolean_T rtb_y_h; + boolean_T rtb_y_hh; boolean_T rtb_y_hy; boolean_T rtb_y_i2; boolean_T rtb_y_j; - boolean_T rtb_y_j5; boolean_T rtb_y_k3; + boolean_T rtb_y_km; boolean_T rtb_y_lh; boolean_T rtb_y_me; - boolean_T rtb_y_mp; - boolean_T rtb_y_nlq; + boolean_T rtb_y_n; boolean_T rtb_y_o; boolean_T rtb_y_oi; boolean_T rtb_y_p; athr_fma_message rtb_y_nf; - athr_fma_mode rtb_y_jr; + athr_fma_mode rtb_y_d; lateral_law rtb_active_lateral_law; tcas_submode rtb_mode; vertical_law rtb_active_longitudinal_law; @@ -472,15 +485,15 @@ void FmgcComputer::step() boolean_T Memory_PreviousInput_k_tmp_tmp; boolean_T Memory_PreviousInput_k_tmp_tmp_0; boolean_T Memory_PreviousInput_k_tmp_tmp_tmp; + boolean_T Memory_PreviousInput_l_tmp; boolean_T absVsTarget_tmp; + boolean_T absVsTarget_tmp_0; boolean_T absVsTarget_tmp_tmp; boolean_T guard1; boolean_T rtb_AND_e_tmp; - boolean_T rtb_GreaterThan3_tmp_0; boolean_T rtb_NOT3_tmp; boolean_T rtb_NOT3_tmp_0; boolean_T rtb_OR2_l_tmp; - boolean_T rtb_OR2_l_tmp_0; boolean_T rtb_y_a0_tmp; boolean_T rtb_y_lh_tmp; if (FmgcComputer_U.in.sim_data.computer_running) { @@ -555,7 +568,7 @@ void FmgcComputer::step() FmgcComputer_DWork.icLoad = true; FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_fw); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_kv); - FmgcComputer_MATLABFunction_o_Reset(&FmgcComputer_DWork.sf_MATLABFunction_m3); + FmgcComputer_MATLABFunction_oh_Reset(&FmgcComputer_DWork.sf_MATLABFunction_m3); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_bv); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_il); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_jp); @@ -572,10 +585,10 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_ag); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_dx); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_p2o); - FmgcComputer_MATLABFunction_o_Reset(&FmgcComputer_DWork.sf_MATLABFunction_an); + FmgcComputer_MATLABFunction_oh_Reset(&FmgcComputer_DWork.sf_MATLABFunction_an); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_bz); - FmgcComputer_MATLABFunction_o_Reset(&FmgcComputer_DWork.sf_MATLABFunction_g0); - FmgcComputer_MATLABFunction_o_Reset(&FmgcComputer_DWork.sf_MATLABFunction_pl4); + FmgcComputer_MATLABFunction_oh_Reset(&FmgcComputer_DWork.sf_MATLABFunction_g0); + FmgcComputer_MATLABFunction_oh_Reset(&FmgcComputer_DWork.sf_MATLABFunction_pl4); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_hz); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_gk); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_fx); @@ -583,7 +596,7 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_fm); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_jl); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_fh); - FmgcComputer_MATLABFunction_o_Reset(&FmgcComputer_DWork.sf_MATLABFunction_mnt); + FmgcComputer_MATLABFunction_oh_Reset(&FmgcComputer_DWork.sf_MATLABFunction_mnt); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_kz1); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_hh); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_ha); @@ -604,11 +617,11 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_mm); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_hvs); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_fn5); - FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_lm); - FmgcComputer_MATLABFunction_o_Reset(&FmgcComputer_DWork.sf_MATLABFunction_e3); + FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_lml); + FmgcComputer_MATLABFunction_oh_Reset(&FmgcComputer_DWork.sf_MATLABFunction_e3); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_mtz); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_gb); - FmgcComputer_MATLABFunction_o_Reset(&FmgcComputer_DWork.sf_MATLABFunction_aw); + FmgcComputer_MATLABFunction_oh_Reset(&FmgcComputer_DWork.sf_MATLABFunction_aw); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_aj); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_at); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_o3); @@ -618,12 +631,12 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_m1w); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_hu); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_idz); - FmgcComputer_MATLABFunction_o_Reset(&FmgcComputer_DWork.sf_MATLABFunction_fi); + FmgcComputer_MATLABFunction_oh_Reset(&FmgcComputer_DWork.sf_MATLABFunction_fi); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_h0); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_jle); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_jd); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_ew); - FmgcComputer_MATLABFunction_o_Reset(&FmgcComputer_DWork.sf_MATLABFunction_prl); + FmgcComputer_MATLABFunction_oh_Reset(&FmgcComputer_DWork.sf_MATLABFunction_prl); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_ge4); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_ma); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_k4c); @@ -633,7 +646,7 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_p4); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_is); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_pr); - FmgcComputer_MATLABFunction_o_Reset(&FmgcComputer_DWork.sf_MATLABFunction_bq); + FmgcComputer_MATLABFunction_oh_Reset(&FmgcComputer_DWork.sf_MATLABFunction_bq); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_hw); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_ee); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_dt); @@ -667,16 +680,16 @@ void FmgcComputer::step() FmgcComputer_LagFilter_Reset(&FmgcComputer_DWork.sf_LagFilter_k); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_bs); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_muf); - FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_db); + FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_dba); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_owv); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_jrd); - FmgcComputer_MATLABFunction_o_Reset(&FmgcComputer_DWork.sf_MATLABFunction_hdx); + FmgcComputer_MATLABFunction_oh_Reset(&FmgcComputer_DWork.sf_MATLABFunction_hdx); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_h0f); - FmgcComputer_MATLABFunction_o_Reset(&FmgcComputer_DWork.sf_MATLABFunction_ppo); - FmgcComputer_MATLABFunction_o_Reset(&FmgcComputer_DWork.sf_MATLABFunction_hd1); - FmgcComputer_MATLABFunction_o_Reset(&FmgcComputer_DWork.sf_MATLABFunction_dln); + FmgcComputer_MATLABFunction_oh_Reset(&FmgcComputer_DWork.sf_MATLABFunction_ppo); + FmgcComputer_MATLABFunction_oh_Reset(&FmgcComputer_DWork.sf_MATLABFunction_hd1); + FmgcComputer_MATLABFunction_oh_Reset(&FmgcComputer_DWork.sf_MATLABFunction_dln); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_k4v); - FmgcComputer_MATLABFunction_o_Reset(&FmgcComputer_DWork.sf_MATLABFunction_ppu); + FmgcComputer_MATLABFunction_oh_Reset(&FmgcComputer_DWork.sf_MATLABFunction_ppu); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_k0); FmgcComputer_MATLABFunction_j_Reset(&FmgcComputer_DWork.sf_MATLABFunction_hjm); FmgcComputer_MATLABFunction_p_Reset(&FmgcComputer_DWork.sf_MATLABFunction_od); @@ -748,9 +761,9 @@ void FmgcComputer::step() (SignStatusMatrix::FailureWarning))); rtb_doubleAdrFault = ((rtb_adrOwnInvalid && rtb_adrOppInvalid) || (rtb_adrOwnInvalid && rtb_adr3Invalid) || (rtb_adrOppInvalid && rtb_adr3Invalid)); - rtb_dualRaFailure = !rtb_adrOwnInvalid; - rtb_bothRaValid = !rtb_adr3Invalid; - rtb_adrOppInvalid = (rtb_dualRaFailure && (!rtb_adrOppInvalid) && rtb_bothRaValid); + raOwnInvalid = !rtb_adrOwnInvalid; + raOppInvalid = !rtb_adr3Invalid; + rtb_adrOppInvalid = (raOwnInvalid && (!rtb_adrOppInvalid) && raOppInvalid); rtb_irOwnInvalid = ((FmgcComputer_U.in.bus_inputs.ir_own_bus.body_yaw_rate_deg_s.SSM != static_cast (SignStatusMatrix::NormalOperation)) || (FmgcComputer_U.in.bus_inputs.ir_own_bus.body_lat_accel_g.SSM != static_cast @@ -802,7 +815,7 @@ void FmgcComputer::step() rtb_irOwnInvalid = !rtb_irOwnInvalid; rtb_ir3Invalid = !rtb_ir3Invalid; rtb_adrOwnInvalid = (rtb_irOwnInvalid && (!rtb_adrOwnInvalid) && rtb_ir3Invalid); - if (rtb_dualRaFailure) { + if (raOwnInvalid) { FmgcComputer_Y.out.logic.adr_computation_data.altitude_standard_ft.SSM = FmgcComputer_U.in.bus_inputs.adr_own_bus.altitude_standard_ft.SSM; rtb_adrComputationBus_altitude_standard_ft_Data = @@ -829,7 +842,7 @@ void FmgcComputer::step() FmgcComputer_U.in.bus_inputs.adr_own_bus.corrected_average_static_pressure.SSM; rtb_adrComputationBus_corrected_average_static_pressure_Data = FmgcComputer_U.in.bus_inputs.adr_own_bus.corrected_average_static_pressure.Data; - } else if (rtb_bothRaValid) { + } else if (raOppInvalid) { FmgcComputer_Y.out.logic.adr_computation_data.altitude_standard_ft.SSM = FmgcComputer_U.in.bus_inputs.adr_3_bus.altitude_standard_ft.SSM; rtb_adrComputationBus_altitude_standard_ft_Data = FmgcComputer_U.in.bus_inputs.adr_3_bus.altitude_standard_ft.Data; @@ -1122,24 +1135,27 @@ void FmgcComputer::step() (SignStatusMatrix::FailureWarning)); raOppInvalid = (FmgcComputer_U.in.bus_inputs.ra_opp_bus.radio_height_ft.SSM == static_cast (SignStatusMatrix::FailureWarning)); - rtb_y_j5 = !raOppInvalid; - rtb_y_ga = !raOwnInvalid; - rtb_OR_bg = (rtb_y_ga && rtb_y_j5); - if (rtb_OR_bg) { - rtb_raComputationData = FmgcComputer_U.in.bus_inputs.ra_own_bus.radio_height_ft.Data; - } else if (raOwnInvalid && rtb_y_j5) { - rtb_raComputationData = FmgcComputer_U.in.bus_inputs.ra_opp_bus.radio_height_ft.Data; - } else if (rtb_y_ga && raOppInvalid) { - rtb_raComputationData = FmgcComputer_U.in.bus_inputs.ra_own_bus.radio_height_ft.Data; + rtb_y_n = !raOppInvalid; + rtb_OR1_j = !raOwnInvalid; + if (rtb_OR1_j && rtb_y_n) { + rtb_raComputationData_radio_height_ft_SSM = FmgcComputer_U.in.bus_inputs.ra_own_bus.radio_height_ft.SSM; + rtb_raComputationData_radio_height_ft_Data = FmgcComputer_U.in.bus_inputs.ra_own_bus.radio_height_ft.Data; + } else if (raOwnInvalid && rtb_y_n) { + rtb_raComputationData_radio_height_ft_SSM = FmgcComputer_U.in.bus_inputs.ra_opp_bus.radio_height_ft.SSM; + rtb_raComputationData_radio_height_ft_Data = FmgcComputer_U.in.bus_inputs.ra_opp_bus.radio_height_ft.Data; + } else if (rtb_OR1_j && raOppInvalid) { + rtb_raComputationData_radio_height_ft_SSM = FmgcComputer_U.in.bus_inputs.ra_own_bus.radio_height_ft.SSM; + rtb_raComputationData_radio_height_ft_Data = FmgcComputer_U.in.bus_inputs.ra_own_bus.radio_height_ft.Data; } else { - rtb_raComputationData = 250.0F; + rtb_raComputationData_radio_height_ft_SSM = FmgcComputer_U.in.bus_inputs.ra_own_bus.radio_height_ft.SSM; + rtb_raComputationData_radio_height_ft_Data = 250.0F; } - rtb_dualRaFailure = (raOwnInvalid && raOppInvalid); - rtb_bothRaValid = ((FmgcComputer_U.in.bus_inputs.ra_own_bus.radio_height_ft.SSM == static_cast - (SignStatusMatrix::NormalOperation)) && - (FmgcComputer_U.in.bus_inputs.ra_opp_bus.radio_height_ft.SSM == static_cast - (SignStatusMatrix::NormalOperation))); + raOwnInvalid = (raOwnInvalid && raOppInvalid); + raOppInvalid = ((FmgcComputer_U.in.bus_inputs.ra_own_bus.radio_height_ft.SSM == static_cast + (SignStatusMatrix::NormalOperation)) && + (FmgcComputer_U.in.bus_inputs.ra_opp_bus.radio_height_ft.SSM == static_cast + (SignStatusMatrix::NormalOperation))); if (FmgcComputer_U.in.discrete_inputs.fac_own_healthy) { FmgcComputer_Y.out.logic.chosen_fac_bus.discrete_word_1 = FmgcComputer_U.in.bus_inputs.fac_own_bus.discrete_word_1; FmgcComputer_Y.out.logic.chosen_fac_bus.gamma_a_deg = FmgcComputer_U.in.bus_inputs.fac_own_bus.gamma_a_deg; @@ -1295,13 +1311,13 @@ void FmgcComputer::step() FmgcComputer_P.BitfromLabel2_bit_p, &rtb_y_jm); rtb_y_hy = (rtb_y_jm == 0U); FmgcComputer_MATLABFunction_f(&rtb_BusAssignment_n_logic_chosen_fac_bus_discrete_word_5, &rtb_y_j); - rtb_y_p = (rtb_y_i2 && rtb_y_fd && rtb_y_hy && rtb_y_j); + rtb_y_km = (rtb_y_i2 && rtb_y_fd && rtb_y_hy && rtb_y_j); rtb_y_o = ((!rtb_y_j) || (!rtb_y_hy)); - rtb_OR_m4 = !rtb_y_p; + rtb_OR_m4 = !rtb_y_km; FmgcComputer_MATLABFunction_a(rtb_OR_m4, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge, FmgcComputer_P.ConfirmNode1_timeDelay, &rtb_y_j, &FmgcComputer_DWork.sf_MATLABFunction_fw); - rtb_y_hb = ((FmgcComputer_U.in.discrete_inputs.eng_opp_stop && FmgcComputer_U.in.discrete_inputs.eng_own_stop && - rtb_y_p) || rtb_y_j); + rtb_y_e = ((FmgcComputer_U.in.discrete_inputs.eng_opp_stop && FmgcComputer_U.in.discrete_inputs.eng_own_stop && + rtb_y_km) || rtb_y_j); FmgcComputer_MATLABFunction_i(&rtb_BusAssignment_n_logic_chosen_fac_bus_discrete_word_5, FmgcComputer_P.BitfromLabel8_bit, &rtb_DataTypeConversion1_j); FmgcComputer_MATLABFunction_i(&rtb_BusAssignment_n_logic_chosen_fac_bus_discrete_word_5, @@ -1311,7 +1327,7 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_i(&rtb_BusAssignment_n_logic_chosen_fac_bus_discrete_word_5, FmgcComputer_P.BitfromLabel11_bit, &rtb_y); FmgcComputer_MATLABFunction_i(&rtb_BusAssignment_n_logic_chosen_fac_bus_discrete_word_5, - FmgcComputer_P.BitfromLabel12_bit, &rtb_Switch_m); + FmgcComputer_P.BitfromLabel12_bit, &rtb_Switch9); if (rtb_DataTypeConversion1_j != 0U) { rtb_handleIndex = 1; } else if (rtb_DataTypeConversion1_e != 0U) { @@ -1320,7 +1336,7 @@ void FmgcComputer::step() rtb_handleIndex = 3; } else if (rtb_y != 0U) { rtb_handleIndex = 4; - } else if (rtb_Switch_m != 0U) { + } else if (rtb_Switch9 != 0U) { rtb_handleIndex = 5; } else { rtb_handleIndex = 0; @@ -1345,7 +1361,7 @@ void FmgcComputer::step() rtb_BusAssignment_o_logic_ils_failure = ((!rtb_y_i2) && (!rtb_y_fd)); rtb_BusAssignment_o_logic_both_ils_valid = (rtb_y_i2 && rtb_y_fd); if (rtb_y_fd) { - rtb_Switch_m = FmgcComputer_U.in.bus_inputs.ils_own_bus.runway_heading_deg.SSM; + rtb_Switch9 = FmgcComputer_U.in.bus_inputs.ils_own_bus.runway_heading_deg.SSM; rtb_Switch_i_runway_heading_deg_Data = FmgcComputer_U.in.bus_inputs.ils_own_bus.runway_heading_deg.Data; FmgcComputer_Y.out.logic.ils_computation_data.ils_frequency_mhz = FmgcComputer_U.in.bus_inputs.ils_own_bus.ils_frequency_mhz; @@ -1355,7 +1371,7 @@ void FmgcComputer::step() rtb_Switch_i_glideslope_deviation_deg_Data = FmgcComputer_U.in.bus_inputs.ils_own_bus.glideslope_deviation_deg.Data; } else { - rtb_Switch_m = FmgcComputer_U.in.bus_inputs.ils_opp_bus.runway_heading_deg.SSM; + rtb_Switch9 = FmgcComputer_U.in.bus_inputs.ils_opp_bus.runway_heading_deg.SSM; rtb_Switch_i_runway_heading_deg_Data = FmgcComputer_U.in.bus_inputs.ils_opp_bus.runway_heading_deg.Data; FmgcComputer_Y.out.logic.ils_computation_data.ils_frequency_mhz = FmgcComputer_U.in.bus_inputs.ils_opp_bus.ils_frequency_mhz; @@ -1370,69 +1386,62 @@ void FmgcComputer::step() rtb_DataTypeConversion2_bh *= FmgcComputer_P.Gain_Gain_f; } + rtb_BusAssignment_o_logic_ra_computation_data_radio_height_ft.SSM = rtb_raComputationData_radio_height_ft_SSM; + rtb_BusAssignment_o_logic_ra_computation_data_radio_height_ft.Data = rtb_raComputationData_radio_height_ft_Data; FmgcComputer_MATLABFunction_f(&FmgcComputer_U.in.bus_inputs.tcas_bus.sensitivity_level, &rtb_y_j); + FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_o_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.sensitivity_level, FmgcComputer_P.BitfromLabel8_bit_c, &rtb_DataTypeConversion1_e); rtb_NOT1_i = (rtb_DataTypeConversion1_e == 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.sensitivity_level, FmgcComputer_P.BitfromLabel1_bit_aq, &rtb_DataTypeConversion1_e); - rtb_y_hy = (rtb_DataTypeConversion1_e != 0U); + rtb_y_fd = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.sensitivity_level, FmgcComputer_P.BitfromLabel2_bit_f, &rtb_DataTypeConversion1_e); - if (rtb_OR_bg) { - rtb_DataTypeConversion2_kb = FmgcComputer_U.in.bus_inputs.ra_own_bus.radio_height_ft.Data; - } else if (raOwnInvalid && rtb_y_j5) { - rtb_DataTypeConversion2_kb = FmgcComputer_U.in.bus_inputs.ra_opp_bus.radio_height_ft.Data; - } else if (rtb_y_ga && raOppInvalid) { - rtb_DataTypeConversion2_kb = FmgcComputer_U.in.bus_inputs.ra_own_bus.radio_height_ft.Data; - } else { - rtb_DataTypeConversion2_kb = 250.0F; - } - - raOwnInvalid = (rtb_y_j && (rtb_DataTypeConversion2_kb > FmgcComputer_P.CompareToConstant_const) && rtb_NOT1_i && - rtb_y_hy && (rtb_DataTypeConversion1_e != 0U)); - rtb_BusAssignment_f_logic_ils_computation_data_runway_heading_deg.SSM = rtb_Switch_m; + rtb_NOT1_i = (rtb_y_j && (rtb_y_gtq > FmgcComputer_P.CompareToConstant_const_n) && rtb_NOT1_i && rtb_y_fd && + (rtb_DataTypeConversion1_e != 0U)); + rtb_BusAssignment_f_logic_ils_computation_data_runway_heading_deg.SSM = rtb_Switch9; rtb_BusAssignment_f_logic_ils_computation_data_runway_heading_deg.Data = rtb_Switch_i_runway_heading_deg_Data; FmgcComputer_Y.out.logic.tcas_failure = !rtb_y_j; + FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_o_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); rtb_y_i2 = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_loc_submode_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active || - (FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed && (rtb_raComputationData <= - FmgcComputer_P.CompareToConstant_const_o))); + (FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed && (rtb_y_gtq <= + FmgcComputer_P.CompareToConstant_const_o2))); FmgcComputer_MATLABFunction(&rtb_BusAssignment_f_logic_ils_computation_data_runway_heading_deg, FmgcComputer_P.A429ValueOrDefault3_defaultValue, &rtb_y_gtq); - rtb_y_j5 = !rtb_y_i2; - if (rtb_y_j5) { + rtb_y_n = !rtb_y_i2; + if (rtb_y_n) { FmgcComputer_B.u_lyjj = rtb_y_gtq; } rtb_BusAssignment_b_logic_ir_computation_data_heading_true_deg.SSM = rtb_irComputationBus_heading_true_deg_SSM; rtb_BusAssignment_b_logic_ir_computation_data_heading_true_deg.Data = rtb_irComputationBus_heading_true_deg_Data; - rtb_BusAssignment_b_logic_ra_computation_data_ft = rtb_raComputationData; - raOppInvalid = rtb_y_i2; - rtb_y_oi = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active || + rtb_BusAssignment_b_logic_ils_tune_inhibit = rtb_y_i2; + rtb_y_hh = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active); - FmgcComputer_MATLABFunction_a(((!rtb_doubleAdrFault) && (!rtb_adr3Invalid) && ((!rtb_y_o) || rtb_y_oi) && - (FmgcComputer_U.in.fms_inputs.fm_valid || rtb_y_oi || - (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active && (rtb_raComputationData < 700.0F)))), - FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge_b, FmgcComputer_P.ConfirmNode1_timeDelay_e, - &rtb_y_j, &FmgcComputer_DWork.sf_MATLABFunction_kv); + FmgcComputer_MATLABFunction_a(((!rtb_doubleAdrFault) && (!rtb_adr3Invalid) && ((!rtb_y_o) || rtb_y_hh) && + (FmgcComputer_U.in.fms_inputs.fm_valid || rtb_y_hh || + (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active && (rtb_raComputationData_radio_height_ft_Data < + 700.0F)))), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge_b, + FmgcComputer_P.ConfirmNode1_timeDelay_e, &rtb_y_j, &FmgcComputer_DWork.sf_MATLABFunction_kv); FmgcComputer_MATLABFunction(&rtb_BusAssignment_b_logic_ir_computation_data_heading_true_deg, FmgcComputer_P.A429ValueOrDefault_defaultValue, &rtb_y_gtq); FmgcComputer_MATLABFunction_m((FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rollout_submode_active && (std::abs - (FmgcComputer_B.u_lyjj - rtb_y_gtq) > FmgcComputer_P.CompareToConstant_const_g)), FmgcComputer_U.in.time.dt, + (FmgcComputer_B.u_lyjj - rtb_y_gtq) > FmgcComputer_P.CompareToConstant_const)), FmgcComputer_U.in.time.dt, &rtb_y_k3, FmgcComputer_P.MTrigNode_isRisingEdge, FmgcComputer_P.MTrigNode_retriggerable, FmgcComputer_P.MTrigNode_triggerDuration, &FmgcComputer_DWork.sf_MATLABFunction_m3); - rtb_y_ga = !rtb_BusAssignment_h_logic_fcu_failure; - rtb_OR_bg = !rtb_BusAssignment_n_logic_fac_speeds_failure; - rtb_OR1_j = !rtb_dualRaFailure; + rtb_OR1_j = !rtb_BusAssignment_h_logic_fcu_failure; + rtb_GreaterThan3 = !rtb_BusAssignment_n_logic_fac_speeds_failure; + rtb_Compare_mh = !raOwnInvalid; FmgcComputer_MATLABFunction_a((((!rtb_BusAssignment_n_logic_fac_weights_failure) || (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active)) && (rtb_OR_bg || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (rtb_OR1_j || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active)) && (rtb_GreaterThan3 || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (rtb_Compare_mh || ((!FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed) && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active) && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active) && - (!FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active))) && (rtb_y_ga || + (!FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active))) && (rtb_OR1_j || (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active)) && (!rtb_y_k3)), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge, FmgcComputer_P.ConfirmNode_timeDelay, @@ -1442,14 +1451,14 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel1_bit_i, &rtb_DataTypeConversion1_e); if (FmgcComputer_U.in.discrete_inputs.is_unit_1) { - rtb_NOT1_i = (rtb_DataTypeConversion1_j != 0U); + fdOwnOff = (rtb_DataTypeConversion1_j != 0U); fdOppOff = (rtb_DataTypeConversion1_e != 0U); } else { - rtb_NOT1_i = (rtb_DataTypeConversion1_e != 0U); + fdOwnOff = (rtb_DataTypeConversion1_e != 0U); fdOppOff = (rtb_DataTypeConversion1_j != 0U); } - rtb_NOT1_i = (rtb_y_j && rtb_y_k3 && ((!rtb_NOT1_i) || ((!fdOppOff) && + fdOwnOff = (rtb_y_j && rtb_y_k3 && ((!fdOwnOff) || ((!fdOppOff) && (!FmgcComputer_U.in.discrete_inputs.fd_opp_engaged)))); fdOppOff = rtb_y_j; rtb_BusAssignment_gk_logic_ap_fd_common_condition = rtb_y_k3; @@ -1470,11 +1479,11 @@ void FmgcComputer::step() &rtb_y_k3, &FmgcComputer_DWork.sf_MATLABFunction_jp); FmgcComputer_MATLABFunction_g(FmgcComputer_U.in.discrete_inputs.ap_opp_engaged, FmgcComputer_P.PulseNode2_isRisingEdge, &rtb_y_j, &FmgcComputer_DWork.sf_MATLABFunction_cb); - rtb_y_c = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active; - rtb_TmpSignalConversionAtSFunctionInport3_idx_0 = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active; - rtb_OR2_l_tmp_0 = !FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed; - rtb_NOT_gj = (rtb_OR2_l_tmp_0 && rtb_TmpSignalConversionAtSFunctionInport3_idx_0); - rtb_OR2_l = (rtb_NOT_gj && rtb_y_c); + rtb_y_h = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active; + rtb_appInop_idx_2 = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active; + rtb_OR2_l_tmp = !FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed; + rtb_NOT_gj = (rtb_OR2_l_tmp && rtb_appInop_idx_2); + rtb_OR2_l = (rtb_NOT_gj && rtb_y_h); FmgcComputer_MATLABFunction_g(rtb_OR2_l, FmgcComputer_P.PulseNode1_isRisingEdge, &rtb_y_me, &FmgcComputer_DWork.sf_MATLABFunction_hp); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg, @@ -1494,23 +1503,23 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction(&rtb_BusAssignment_gk_logic_ir_computation_data_roll_angle_deg, FmgcComputer_P.A429ValueOrDefault6_defaultValue, &rtb_y_gtq); rtb_NOT_c = !rtb_ir3Invalid; - rtb_TmpSignalConversionAtSFunctionInport3_idx_1 = !FmgcComputer_U.in.discrete_inputs.elac_own_ap_disc; - rtb_TmpSignalConversionAtSFunctionInport3_idx_2 = !FmgcComputer_U.in.discrete_inputs.elac_opp_ap_disc; + rtb_TmpSignalConversionAtSFunctionInport3_idx_0 = !FmgcComputer_U.in.discrete_inputs.elac_own_ap_disc; + rtb_TmpSignalConversionAtSFunctionInport3_idx_1 = !FmgcComputer_U.in.discrete_inputs.elac_opp_ap_disc; apCondition = ((!FmgcComputer_U.in.discrete_inputs.ap_instinctive_disc) && - (rtb_TmpSignalConversionAtSFunctionInport3_idx_1 || rtb_TmpSignalConversionAtSFunctionInport3_idx_2) && + (rtb_TmpSignalConversionAtSFunctionInport3_idx_0 || rtb_TmpSignalConversionAtSFunctionInport3_idx_1) && rtb_NOT_c); rtb_ap_inop_tmp_tmp = !fdOppOff; rtb_ap_inop_tmp = (rtb_ap_inop_tmp_tmp || (!rtb_BusAssignment_gk_logic_ap_fd_common_condition) || (!apCondition)); rtb_y_hy = !FmgcComputer_U.in.discrete_inputs.is_unit_1; FmgcComputer_DWork.Memory_PreviousInput = FmgcComputer_P.Logic_table[(((static_cast(rtb_y_da && - (!FmgcComputer_DWork.Delay_DSTATE_p) && rtb_y_hb && rtb_BusAssignment_gk_logic_ap_fd_common_condition && fdOppOff && + (!FmgcComputer_DWork.Delay_DSTATE_p) && rtb_y_e && rtb_BusAssignment_gk_logic_ap_fd_common_condition && fdOppOff && apCondition && ((rtb_y_mw >= rtb_y_cf) && (rtb_y_cf >= rtb_y_fl) && (rtb_y_jq >= FmgcComputer_P.CompareToConstant_const_hu) && (rtb_y_jq <= FmgcComputer_P.CompareToConstant1_const_bt) && (std:: abs(rtb_y_gtq) <= FmgcComputer_P.CompareToConstant2_const_c))) << 1) + (rtb_ap_inop_tmp || (rtb_y_da && FmgcComputer_DWork.Delay_DSTATE_p) || FmgcComputer_U.in.discrete_inputs.ap_instinctive_disc || ((rtb_y_j && - rtb_OR2_l) || (FmgcComputer_U.in.discrete_inputs.ap_opp_engaged && rtb_y_me && rtb_y_hy)) || (rtb_y_p && + rtb_OR2_l) || (FmgcComputer_U.in.discrete_inputs.ap_opp_engaged && rtb_y_me && rtb_y_hy)) || (rtb_y_km && (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || rtb_y_i2 || (rtb_Phi_c_deg >= - FmgcComputer_P.CompareToConstant5_const))) || (rtb_y_k3 && rtb_y_p))) << 1) + + FmgcComputer_P.CompareToConstant5_const))) || (rtb_y_k3 && rtb_y_km))) << 1) + FmgcComputer_DWork.Memory_PreviousInput]; FmgcComputer_MATLABFunction_a(FmgcComputer_DWork.Memory_PreviousInput, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_k, FmgcComputer_P.ConfirmNode_timeDelay_b, &rtb_y_k3, @@ -1537,7 +1546,7 @@ void FmgcComputer::step() &FmgcComputer_DWork.sf_MATLABFunction_jt); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault_defaultValue_n, &rtb_y_gtq); - rtb_y_k3 = (rtb_y_gtq < FmgcComputer_P.CompareToConstant_const_om); + rtb_y_k3 = (rtb_y_gtq < FmgcComputer_P.CompareToConstant_const_o); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault1_defaultValue_p, &rtb_y_gtq); FmgcComputer_MATLABFunction_g((rtb_y_k3 && (rtb_y_gtq < FmgcComputer_P.CompareToConstant1_const)), @@ -1561,32 +1570,32 @@ void FmgcComputer::step() &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_dx); rtb_y_k3 = ((FmgcComputer_DWork.Delay_DSTATE.manual_spd_control_active || FmgcComputer_DWork.Delay_DSTATE.auto_spd_control_active) && - (!FmgcComputer_DWork.Memory_PreviousInput_g1) && rtb_y_ga && rtb_OR_bg); + (!FmgcComputer_DWork.Memory_PreviousInput_g1) && rtb_OR1_j && rtb_GreaterThan3); rtb_ap_inop_tmp_tmp = (rtb_ap_inop_tmp_tmp || (!rtb_y_k3)); FmgcComputer_DWork.Delay_DSTATE_k = FmgcComputer_P.Logic_table_n[(((static_cast(fdOppOff && rtb_y_k3 && - ((rtb_Compare_a5 && ((rtb_raComputationData > 100.0F) || rtb_dualRaFailure)) || rtb_Compare_du || rtb_y_da || - rtb_y_j)) << 1) + (rtb_ap_inop_tmp_tmp || rtb_y_me || (FmgcComputer_DWork.Delay_DSTATE_k && rtb_Compare_a5 && - (!rtP_fmgc_ap_fd_logic_output_MATLABStruct.lateral_modes.land_active)) || - FmgcComputer_U.in.discrete_inputs.athr_instinctive_disc || rtb_y_ff || rtb_NOT_b)) << 1) + + ((rtb_Compare_a5 && ((rtb_raComputationData_radio_height_ft_Data > 100.0F) || raOwnInvalid)) || rtb_Compare_du || + rtb_y_da || rtb_y_j)) << 1) + (rtb_ap_inop_tmp_tmp || rtb_y_me || (FmgcComputer_DWork.Delay_DSTATE_k && + rtb_Compare_a5 && (!rtP_fmgc_ap_fd_logic_output_MATLABStruct.lateral_modes.land_active)) || + FmgcComputer_U.in.discrete_inputs.athr_instinctive_disc || rtb_y_ff || rtb_NOT_b)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_p]; - rtb_fmgcOppPriority_tmp = !rtb_Logic_a2[0]; - rtb_y_k3 = !rtb_NOT1_i; - rtb_y_mp = !FmgcComputer_DWork.Delay_DSTATE_k; + rtb_Compare_fn = !rtb_Logic_a2[0]; + rtb_y_k3 = !fdOwnOff; + rtb_y_p = !FmgcComputer_DWork.Delay_DSTATE_k; rtb_y_j = (FmgcComputer_U.in.discrete_inputs.ap_opp_engaged || FmgcComputer_U.in.discrete_inputs.fd_opp_engaged); rtb_y_da = (rtb_y_j || FmgcComputer_U.in.discrete_inputs.athr_opp_engaged); - rtb_y_k3 = ((rtb_y_hy || (rtb_fmgcOppPriority_tmp && (FmgcComputer_U.in.discrete_inputs.ap_opp_engaged || rtb_y_k3) && - (rtb_y_j || rtb_y_mp) && rtb_y_da)) && (FmgcComputer_U.in.discrete_inputs.is_unit_1 || ((rtb_fmgcOppPriority_tmp || - FmgcComputer_U.in.discrete_inputs.ap_opp_engaged) && (rtb_y_j || rtb_y_k3) && (rtb_y_da || rtb_y_mp) && - (rtb_Logic_a2[0] || rtb_NOT1_i || FmgcComputer_DWork.Delay_DSTATE_k || + rtb_y_k3 = ((rtb_y_hy || (rtb_Compare_fn && (FmgcComputer_U.in.discrete_inputs.ap_opp_engaged || rtb_y_k3) && + (rtb_y_j || rtb_y_p) && rtb_y_da)) && (FmgcComputer_U.in.discrete_inputs.is_unit_1 || ((rtb_Compare_fn || + FmgcComputer_U.in.discrete_inputs.ap_opp_engaged) && (rtb_y_j || rtb_y_k3) && (rtb_y_da || rtb_y_p) && + (rtb_Logic_a2[0] || fdOwnOff || FmgcComputer_DWork.Delay_DSTATE_k || (!FmgcComputer_U.in.discrete_inputs.fmgc_opp_healthy))))); - rtb_OR2_l_tmp = !FmgcComputer_U.in.discrete_inputs.ap_opp_engaged; - rtb_OR2_l = (rtb_y_k3 && (rtb_fmgcOppPriority_tmp || rtb_OR2_l_tmp)); - rtb_y_fd = (rtb_Logic_a2[0] || FmgcComputer_U.in.discrete_inputs.ap_opp_engaged || rtb_NOT1_i || + rtb_y_oi = !FmgcComputer_U.in.discrete_inputs.ap_opp_engaged; + rtb_OR2_l = (rtb_y_k3 && (rtb_Compare_fn || rtb_y_oi)); + rtb_y_fd = (rtb_Logic_a2[0] || FmgcComputer_U.in.discrete_inputs.ap_opp_engaged || fdOwnOff || FmgcComputer_U.in.discrete_inputs.fd_opp_engaged); FmgcComputer_MATLABFunction_g(rtb_BusAssignment_h_logic_engine_running, FmgcComputer_P.PulseNode3_isRisingEdge_f, &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_p2o); rtb_appCapability_idx_2 = !rtb_y_fd; - rtb_y_hy = (rtb_appCapability_idx_2 || (rtb_Compare_du && rtb_y_p)); + rtb_y_hy = (rtb_appCapability_idx_2 || (rtb_Compare_du && rtb_y_km)); rtb_BusAssignment_m_logic_adr_computation_data_vertical_speed_ft_min.SSM = rtb_adrComputationBus_vertical_speed_ft_min_SSM; rtb_BusAssignment_m_logic_adr_computation_data_vertical_speed_ft_min.Data = @@ -1627,8 +1636,8 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault3_defaultValue_c, &rtb_y_mw); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel5_bit_b, &rtb_DataTypeConversion1_e); - rtb_y_ga = !rtb_y_i2; - if (rtb_y_ga || (rtb_DataTypeConversion1_e == 0U)) { + rtb_OR1_j = !rtb_y_i2; + if (rtb_OR1_j || (rtb_DataTypeConversion1_e == 0U)) { FmgcComputer_B.u_lyjjlj = rtb_y_mw; } @@ -1642,7 +1651,7 @@ void FmgcComputer::step() rtb_Phi_c_deg = FmgcComputer_B.u_lyjjlj; } - rtb_y_lh = !raOwnInvalid; + rtb_y_lh = !rtb_NOT1_i; FmgcComputer_MATLABFunction_m((FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active && rtb_y_lh), FmgcComputer_U.in.time.dt, &rtb_NOT_b, FmgcComputer_P.MTrigNode_isRisingEdge_j, FmgcComputer_P.MTrigNode_retriggerable_o, FmgcComputer_P.MTrigNode_triggerDuration_b, @@ -1654,8 +1663,8 @@ void FmgcComputer::step() FmgcComputer_DWork.Memory_PreviousInput_e = FmgcComputer_P.Logic_table_l[(((static_cast (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active && rtb_Compare_du) << 1) + FmgcComputer_DWork.Delay_DSTATE_o) << 1) + FmgcComputer_DWork.Memory_PreviousInput_e]; - rtb_Compare_b = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active; - FmgcComputer_DWork.Delay_DSTATE_o = (FmgcComputer_DWork.Memory_PreviousInput_e && rtb_Compare_b); + rtb_Compare_gc = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active; + FmgcComputer_DWork.Delay_DSTATE_o = (FmgcComputer_DWork.Memory_PreviousInput_e && rtb_Compare_gc); FmgcComputer_MATLABFunction_m(FmgcComputer_DWork.Delay_DSTATE_o, FmgcComputer_U.in.time.dt, &rtb_Compare_a5, FmgcComputer_P.MTrigNode1_isRisingEdge, FmgcComputer_P.MTrigNode1_retriggerable, FmgcComputer_P.MTrigNode1_triggerDuration, &FmgcComputer_DWork.sf_MATLABFunction_g0); @@ -1677,24 +1686,25 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault1_defaultValue_c, &rtb_y_gtq); rtb_AND_e_tmp = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_hold_active); - rtb_y_ai = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active); - rtb_AND_j = (rtb_AND_e_tmp && FmgcComputer_DWork.Delay_DSTATE.alt_cstr_applicable && rtb_y_ai && + rtb_TmpSignalConversionAtSFunctionInport3_idx_2 = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active); + rtb_AND_j = (rtb_AND_e_tmp && FmgcComputer_DWork.Delay_DSTATE.alt_cstr_applicable && + rtb_TmpSignalConversionAtSFunctionInport3_idx_2 && FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid); if (rtb_y_jq > rtb_y_gtq) { - rtb_OR_bg = ((FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft < rtb_y_jq) && - ((FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft + 250.0 > rtb_y_gtq) || rtb_AND_j)); + rtb_GreaterThan3 = ((FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft < rtb_y_jq) && + ((FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft + 250.0 > rtb_y_gtq) || rtb_AND_j)); } else { - rtb_OR_bg = ((FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft > rtb_y_jq) && - ((FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft - 250.0 < rtb_y_gtq) || rtb_AND_j)); + rtb_GreaterThan3 = ((FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft > rtb_y_jq) && + ((FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft - 250.0 < rtb_y_gtq) || rtb_AND_j)); } rtb_AND_j = ((FmgcComputer_DWork.Delay_DSTATE.armed_modes.clb_armed || FmgcComputer_DWork.Delay_DSTATE.armed_modes.des_armed || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || rtb_AND_j) && - (FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft != 0.0) && rtb_OR_bg); + (FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft != 0.0) && rtb_GreaterThan3); if (rtb_AND_j) { rtb_altCstrOrFcu = FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft; } else { @@ -1705,24 +1715,24 @@ void FmgcComputer::step() rtb_BusAssignment_hk_ap_fd_logic_longi_large_box_tcas = rtb_Compare_du; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel_bit_c, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_a(rtb_y_p, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_h, + FmgcComputer_MATLABFunction_a(rtb_y_km, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_h, FmgcComputer_P.ConfirmNode_timeDelay_i, &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_hz); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault_defaultValue_l2, &rtb_y_gtq); rtb_GreaterThan3 = (rtb_y_gtq < FmgcComputer_P.CompareToConstant3_const_n); rtb_NOT3 = !rtb_GreaterThan3; - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_flex_temp_deg, &rtb_y_g); - rtb_y_g = (rtb_GreaterThan3 && (rtb_y_gtq > FmgcComputer_P.CompareToConstant4_const) && rtb_y_g); + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_flex_temp_deg, &rtb_y_dm); + rtb_y_dm = (rtb_GreaterThan3 && (rtb_y_gtq > FmgcComputer_P.CompareToConstant4_const) && rtb_y_dm); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault1_defaultValue_b, &rtb_y_gtq); rtb_GreaterThan3 = (rtb_y_gtq < FmgcComputer_P.CompareToConstant5_const_a); - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_flex_temp_deg, &rtb_y_fi); - FmgcComputer_MATLABFunction_g((rtb_NOT3 || rtb_y_g || (!rtb_GreaterThan3) || (rtb_GreaterThan3 && (rtb_y_gtq > - FmgcComputer_P.CompareToConstant6_const) && rtb_y_fi)), FmgcComputer_P.PulseNode_isRisingEdge_p, &rtb_y_ff, + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_flex_temp_deg, &rtb_y_cj); + FmgcComputer_MATLABFunction_g((rtb_NOT3 || rtb_y_dm || (!rtb_GreaterThan3) || (rtb_GreaterThan3 && (rtb_y_gtq > + FmgcComputer_P.CompareToConstant6_const) && rtb_y_cj)), FmgcComputer_P.PulseNode_isRisingEdge_p, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_gk); - rtb_y_e = !rtb_OR2_l; - rtb_Compare_d0 = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active; - rtb_NOT3_tmp = (rtb_y_e && rtb_Compare_d0 && rtb_y_c); + rtb_y_cq = !rtb_OR2_l; + rtb_y_ai = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active; + rtb_NOT3_tmp = (rtb_y_cq && rtb_y_ai && rtb_y_h); rtb_NOT3 = (((FmgcComputer_U.in.fms_inputs.v_2_kts > FmgcComputer_P.CompareToConstant1_const_k) && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_NOT3_tmp && rtb_Compare_du && (FmgcComputer_U.in.fms_inputs.v_2_kts > FmgcComputer_P.CompareToConstant2_const) && (rtb_handleIndex >= @@ -1754,7 +1764,7 @@ void FmgcComputer::step() rtb_irComputationBus_heading_magnetic_deg_SSM; rtb_BusAssignment_f4_logic_ir_computation_data_heading_magnetic_deg.Data = rtb_irComputationBus_heading_magnetic_deg_Data; - rtb_BusAssignment_f4_logic_ils_computation_data_runway_heading_deg.SSM = rtb_Switch_m; + rtb_BusAssignment_f4_logic_ils_computation_data_runway_heading_deg.SSM = rtb_Switch9; rtb_BusAssignment_f4_logic_ils_computation_data_runway_heading_deg.Data = rtb_Switch_i_runway_heading_deg_Data; rtb_BusAssignment_f4_logic_ils_computation_data_localizer_deviation_deg.SSM = rtb_y; rtb_BusAssignment_f4_logic_ils_computation_data_localizer_deviation_deg.Data = rtb_DataTypeConversion2_bh; @@ -1774,22 +1784,22 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction(&rtb_BusAssignment_f4_logic_ils_computation_data_localizer_deviation_deg, FmgcComputer_P.A429ValueOrDefault_defaultValue_e, &rtb_y_gtq); FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_f4_logic_ils_computation_data_localizer_deviation_deg, &rtb_NOT3); - FmgcComputer_MATLABFunction_a(rtb_y_p, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_p, + FmgcComputer_MATLABFunction_a(rtb_y_km, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_p, FmgcComputer_P.ConfirmNode_timeDelay_o, &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_fm); if (rtb_y_gtq < 0.0F) { - rtb_DataTypeConversion1_d = -rtb_y_gtq; + rtb_DataTypeConversion8 = -rtb_y_gtq; } else { - rtb_DataTypeConversion1_d = rtb_y_gtq; + rtb_DataTypeConversion8 = rtb_y_gtq; } - rtb_NOT3 = ((rtb_GreaterThan3 && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && + rtb_NOT3 = ((rtb_GreaterThan3 && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && (!FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_loc_submode_active) && ((rtb_handleIndex >= FmgcComputer_P.CompareToConstant_const_cq) && rtb_y_ff && (rtb_DataTypeConversion2_kb <= - FmgcComputer_P.CompareToConstant2_const_b) && (rtb_DataTypeConversion1_d < - FmgcComputer_P.CompareToConstant1_const_i) && FmgcComputer_P.Constant_Value_j && rtb_NOT3 && rtb_Compare_du))); + FmgcComputer_P.CompareToConstant2_const_b) && (rtb_DataTypeConversion8 < FmgcComputer_P.CompareToConstant1_const_i) + && FmgcComputer_P.Constant_Value_j && rtb_NOT3 && rtb_Compare_du))); FmgcComputer_MATLABFunction_a(rtb_NOT3, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_l, FmgcComputer_P.ConfirmNode_timeDelay_f, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_jl); - FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_f4_logic_ils_computation_data_localizer_deviation_deg, &rtb_y_g); + FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_f4_logic_ils_computation_data_localizer_deviation_deg, &rtb_y_dm); FmgcComputer_DWork.Memory_PreviousInput_c = FmgcComputer_P.Logic_table_hz[(((((!rtb_y_ff) && (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_trk_submode_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.roll_goaround_active || @@ -1798,21 +1808,24 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_y_hy || (!rtb_y_g)) + (static_cast + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_y_hy || (!rtb_y_dm)) + (static_cast (rtb_NOT3) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_c]; + rtb_BusAssignment_na_logic_ra_computation_data_radio_height_ft.SSM = rtb_raComputationData_radio_height_ft_SSM; + rtb_BusAssignment_na_logic_ra_computation_data_radio_height_ft.Data = rtb_raComputationData_radio_height_ft_Data; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel_bit_f, &rtb_DataTypeConversion1_e); rtb_GreaterThan3 = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel1_bit_n, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_raComputationData >= FmgcComputer_P.CompareToConstant_const_l), + FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_na_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); + FmgcComputer_MATLABFunction_g((rtb_y_gtq >= FmgcComputer_P.CompareToConstant_const_l0), FmgcComputer_P.PulseNode_isRisingEdge_b, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_fh); FmgcComputer_MATLABFunction_m(rtb_y_ff, FmgcComputer_U.in.time.dt, &rtb_Compare_du, FmgcComputer_P.MTrigNode_isRisingEdge_jv, FmgcComputer_P.MTrigNode_retriggerable_p, FmgcComputer_P.MTrigNode_triggerDuration_n, &FmgcComputer_DWork.sf_MATLABFunction_mnt); rtb_NOT3_tmp_0 = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active; - rtb_NOT3 = ((rtb_GreaterThan3 && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && (rtb_NOT3_tmp_0 && ( - !FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed)) && rtb_Compare_du)); + rtb_NOT3 = ((rtb_GreaterThan3 && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && (rtb_NOT3_tmp_0 && + (!FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed)) && rtb_Compare_du)); FmgcComputer_MATLABFunction_a(rtb_NOT3, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_hu, FmgcComputer_P.ConfirmNode_timeDelay_j, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_kz1); FmgcComputer_DWork.Memory_PreviousInput_b = FmgcComputer_P.Logic_table_d[(((((!rtb_y_ff) && @@ -1826,11 +1839,12 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_y_hy) + (static_cast(rtb_NOT3) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_b]; rtb_NOT3 = rtb_NOT_b; - rtb_y_g = rtb_Compare_a5; - rtb_y_fi = (FmgcComputer_DWork.Memory_PreviousInput_c || FmgcComputer_DWork.Memory_PreviousInput_b); + rtb_y_dm = rtb_Compare_a5; + rtb_y_cj = (FmgcComputer_DWork.Memory_PreviousInput_c || FmgcComputer_DWork.Memory_PreviousInput_b); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_k, &rtb_DataTypeConversion1_e); - rtb_y_nlq = ((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l); + rtb_y_j = ((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l); + FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_na_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_br, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_l, @@ -1838,6 +1852,12 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_a(FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_f, FmgcComputer_P.ConfirmNode_timeDelay_d, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_ha); + rtb_AND9 = !rtb_BusAssignment_h_logic_engine_running; + rtb_AND1_c0 = !rtb_BusAssignment_o_logic_ils_failure; + rtb_Compare_d2 = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active; + rtb_y_da = (FmgcComputer_P.Constant_Value_l && rtb_AND1_c0 && (rtb_AND9 || (rtb_y_gtq >= + FmgcComputer_P.CompareToConstant_const_gv)) && rtb_Compare_mh && rtb_Compare_a5 && (!rtb_y_ff) && (rtb_Compare_d2 && + (!FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed))); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.ils_opp_bus.ils_frequency_mhz, FmgcComputer_P.A429ValueOrDefault_defaultValue_ek, &rtb_y_mw); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.ils_own_bus.ils_frequency_mhz, @@ -1846,18 +1866,6 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault2_defaultValue_c, &rtb_y_jq); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.ils_own_bus.runway_heading_deg, FmgcComputer_P.A429ValueOrDefault3_defaultValue_o, &rtb_y_gtq); - rtb_GreaterThan3_tmp = !rtb_BusAssignment_h_logic_engine_running; - rtb_OR_bg = !rtb_BusAssignment_o_logic_ils_failure; - rtb_y_me = !FmgcComputer_P.Constant2_Value_p; - rtb_GreaterThan3_tmp_0 = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_active; - rtb_AND1_c0 = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.roll_goaround_active; - rtb_Compare_kg = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active; - rtb_GreaterThan3 = (rtb_TmpSignalConversionAtSFunctionInport3_idx_0 && (rtb_y_nlq || (rtb_y_e && - (FmgcComputer_P.Constant_Value_l && rtb_OR_bg && (rtb_GreaterThan3_tmp || (rtb_raComputationData >= - FmgcComputer_P.CompareToConstant_const_gv)) && rtb_OR1_j && rtb_Compare_a5 && (!rtb_y_ff) && (rtb_Compare_kg && - (!FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed))) && rtb_Compare_d0 && rtb_y_c && - rtb_GreaterThan3_tmp_0 && rtb_AND1_c0 && rtb_y_me && rtb_y_me && (((rtb_y_mw == rtb_y_fl) && (rtb_y_jq == - rtb_y_gtq)) || (!rtb_BusAssignment_o_logic_both_ils_valid))))); rtb_NOT_b = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active); rtb_y_a0_tmp = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || @@ -1873,70 +1881,78 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active), FmgcComputer_P.PulseNode3_isRisingEdge_j, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_eb2); - rtb_y_j = (rtb_y_a0_tmp && rtb_y_ff); + rtb_AND8 = (rtb_y_a0_tmp && rtb_y_ff); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel1_bit_l, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_c, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_es); - FmgcComputer_DWork.Memory_PreviousInput_l = FmgcComputer_P.Logic_table_k[(((rtb_y_oi || ((!rtb_NOT_b) && - (!rtb_y_a0_tmp) && FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed) || ((rtb_NOT_b && rtb_Compare_du) || - rtb_y_j) || (rtb_Compare_a5 && FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed) || rtb_y_ff || rtb_y_hy || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active) + (static_cast(rtb_GreaterThan3) << 1)) << - 1) + FmgcComputer_DWork.Memory_PreviousInput_l]; + rtb_GreaterThan3 = !FmgcComputer_P.Constant2_Value_p; + Memory_PreviousInput_l_tmp = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_active; + rtb_AND12 = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.roll_goaround_active; + FmgcComputer_DWork.Memory_PreviousInput_l = FmgcComputer_P.Logic_table_k[(((static_cast(rtb_appInop_idx_2 && + (rtb_y_j || (rtb_y_cq && rtb_y_da && rtb_y_ai && rtb_y_h && Memory_PreviousInput_l_tmp && rtb_AND12 && + rtb_GreaterThan3 && rtb_GreaterThan3 && (((rtb_y_mw == rtb_y_fl) && (rtb_y_jq == rtb_y_gtq)) || + (!rtb_BusAssignment_o_logic_both_ils_valid))))) << 1) + (rtb_y_hh || ((!rtb_NOT_b) && (!rtb_y_a0_tmp) && + FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed) || ((rtb_NOT_b && rtb_Compare_du) || rtb_AND8) || + (rtb_Compare_a5 && FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed) || rtb_y_ff || rtb_y_hy || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_l]; FmgcComputer_MATLABFunction_a(!FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_e, FmgcComputer_P.ConfirmNode_timeDelay_l, &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_mq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_4, FmgcComputer_P.BitfromLabel_bit_ff, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_a((rtb_raComputationData < FmgcComputer_P.CompareToConstant_const_d), - FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge_g, FmgcComputer_P.ConfirmNode1_timeDelay_d, - &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_cr); - rtb_y_j = (rtb_Compare_du && (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && + FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_na_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); + FmgcComputer_MATLABFunction_a((rtb_y_gtq < FmgcComputer_P.CompareToConstant_const_dt), FmgcComputer_U.in.time.dt, + FmgcComputer_P.ConfirmNode1_isRisingEdge_g, FmgcComputer_P.ConfirmNode1_timeDelay_d, &rtb_y_ff, + &FmgcComputer_DWork.sf_MATLABFunction_cr); + rtb_y_j = (rtb_Compare_du && (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active && rtb_y_ff))); FmgcComputer_MATLABFunction_a(rtb_y_j, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_d, FmgcComputer_P.ConfirmNode_timeDelay_a, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_op); - rtb_y_da = !rtb_y_ff; + rtb_Compare_a5 = !rtb_y_ff; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_ft, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_a, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_fa); - FmgcComputer_MATLABFunction_a(rtb_y_p, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode2_isRisingEdge_l, + FmgcComputer_MATLABFunction_a(rtb_y_km, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode2_isRisingEdge_l, FmgcComputer_P.ConfirmNode2_timeDelay_b, &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_fo0); Memory_PreviousInput_d_tmp_tmp = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.roll_goaround_active); - rtb_AND9 = (Memory_PreviousInput_d_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || + rtb_AND8 = (Memory_PreviousInput_d_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active); - Memory_PreviousInput_d_tmp = (rtb_AND9 || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active || + Memory_PreviousInput_d_tmp = (rtb_AND8 || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active); FmgcComputer_DWork.Memory_PreviousInput_d = FmgcComputer_P.Logic_table_p[(((((rtb_y_i2 || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || (Memory_PreviousInput_d_tmp || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active)) && rtb_y_da) || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || (rtb_fmgcOppPriority_tmp && - rtb_OR2_l_tmp && rtb_y_ff && rtb_Compare_du) || rtb_y_hy) + (static_cast(rtb_y_j) << 1)) << 1) + + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active)) && rtb_Compare_a5) || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || (rtb_Compare_fn && rtb_y_oi && + rtb_y_ff && rtb_Compare_du) || rtb_y_hy) + (static_cast(rtb_y_j) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_d]; - rtb_y_nlq = (FmgcComputer_U.in.discrete_inputs.bscu_opp_valid || FmgcComputer_U.in.discrete_inputs.bscu_own_valid); - FmgcComputer_MATLABFunction_a((FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active && (rtb_raComputationData <= - FmgcComputer_P.CompareToConstant2_const_i) && (((FmgcComputer_U.in.discrete_inputs.left_wheel_spd_abv_70_kts || - FmgcComputer_U.in.discrete_inputs.right_wheel_spd_abv_70_kts) && rtb_y_nlq) || ((!rtb_y_nlq) && rtb_y_p))), + FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_na_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); + rtb_y_hh = (FmgcComputer_U.in.discrete_inputs.bscu_opp_valid || FmgcComputer_U.in.discrete_inputs.bscu_own_valid); + FmgcComputer_MATLABFunction_a((FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active && (rtb_y_gtq <= + FmgcComputer_P.CompareToConstant2_const_i0) && (((FmgcComputer_U.in.discrete_inputs.left_wheel_spd_abv_70_kts || + FmgcComputer_U.in.discrete_inputs.right_wheel_spd_abv_70_kts) && rtb_y_hh) || ((!rtb_y_hh) && rtb_y_km))), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge_bk, FmgcComputer_P.ConfirmNode1_timeDelay_ef, &rtb_y_j, &FmgcComputer_DWork.sf_MATLABFunction_mb); FmgcComputer_DWork.Memory_PreviousInput_m = FmgcComputer_P.Logic_table_m[(((static_cast(rtb_y_j) << 1) + - rtb_TmpSignalConversionAtSFunctionInport3_idx_0) << 1) + FmgcComputer_DWork.Memory_PreviousInput_m]; - rtb_NOT_c = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active && (rtb_raComputationData <= - FmgcComputer_P.CompareToConstant1_const_h) && rtb_NOT_c); - rtb_y_j = (rtb_OR1_j && FmgcComputer_DWork.Delay2_DSTATE.flare_law.condition_Flare && + rtb_appInop_idx_2) << 1) + FmgcComputer_DWork.Memory_PreviousInput_m]; + FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_na_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); + rtb_NOT_c = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active && (rtb_y_gtq <= + FmgcComputer_P.CompareToConstant1_const_ht) && rtb_NOT_c); + rtb_y_j = (rtb_Compare_mh && FmgcComputer_DWork.Delay2_DSTATE.flare_law.condition_Flare && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active); FmgcComputer_MATLABFunction_a(rtb_y_j, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge_d, FmgcComputer_P.ConfirmNode1_timeDelay_dj, &rtb_y_da, &FmgcComputer_DWork.sf_MATLABFunction_j2); FmgcComputer_DWork.Memory_PreviousInput_bc = FmgcComputer_P.Logic_table_bp[(((static_cast(rtb_y_da) << 1) - + rtb_TmpSignalConversionAtSFunctionInport3_idx_0) << 1) + FmgcComputer_DWork.Memory_PreviousInput_bc]; + + rtb_appInop_idx_2) << 1) + FmgcComputer_DWork.Memory_PreviousInput_bc]; rtb_y_j = (rtb_y_j || FmgcComputer_DWork.Memory_PreviousInput_bc); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_l, &rtb_DataTypeConversion1_e); rtb_GreaterThan3 = ((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l); - rtb_y_oi = (rtb_GreaterThan3_tmp || (rtb_raComputationData >= FmgcComputer_P.CompareToConstant_const_lj) || - rtb_dualRaFailure); + FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_na_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); + rtb_y_oi = (rtb_AND9 || (rtb_y_gtq >= FmgcComputer_P.CompareToConstant_const_lj) || raOwnInvalid); FmgcComputer_MATLABFunction_a(FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_le, FmgcComputer_P.ConfirmNode_timeDelay_n, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_pu); @@ -1944,11 +1960,11 @@ void FmgcComputer::step() FmgcComputer_P.BitfromLabel2_bit_e, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_h, &rtb_y_me, &FmgcComputer_DWork.sf_MATLABFunction_d3); - rtb_y_i2 = (rtb_y_e && FmgcComputer_U.in.fms_inputs.lateral_flight_plan_valid); - rtb_NOT_b = (rtb_TmpSignalConversionAtSFunctionInport3_idx_0 && (rtb_GreaterThan3 || (rtb_y_i2 && + rtb_y_i2 = (rtb_y_cq && FmgcComputer_U.in.fms_inputs.lateral_flight_plan_valid); + rtb_NOT_b = (rtb_appInop_idx_2 && (rtb_GreaterThan3 || (rtb_y_i2 && FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && FmgcComputer_P.Constant_Value_hg && rtb_y_oi && - rtb_OR2_l_tmp_0 && (rtb_Compare_d0 && rtb_GreaterThan3_tmp_0 && rtb_y_c && rtb_AND1_c0 && rtb_Compare_kg && - (!rtb_y_ff) && rtb_y_me)))); + rtb_OR2_l_tmp && (rtb_y_ai && Memory_PreviousInput_l_tmp && rtb_y_h && rtb_AND12 && rtb_Compare_d2 && (!rtb_y_ff) && + rtb_y_me)))); FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active), FmgcComputer_P.PulseNode3_isRisingEdge_k, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_bbv); @@ -1956,25 +1972,26 @@ void FmgcComputer::step() FmgcComputer_P.BitfromLabel1_bit_o, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_li, &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_bk); - rtb_OR2_l_tmp = !FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid; + rtb_Compare_bm = !FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid; FmgcComputer_DWork.Memory_PreviousInput_dv = FmgcComputer_P.Logic_table_c [(((FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || rtb_OR2_l_tmp || rtb_y_ff || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || rtb_Compare_bm || rtb_y_ff || (rtb_y_me && FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed) || rtb_GreaterThan3 || rtb_y_hy || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active) + (static_cast(rtb_NOT_b) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_dv]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel_bit_a, &rtb_DataTypeConversion1_e); - rtb_y_da = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && + rtb_Compare_a5 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed && FmgcComputer_U.in.fms_inputs.final_app_can_engage && - (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant_Value_i5))); - FmgcComputer_MATLABFunction_a(rtb_y_da, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ha, + (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant_Value_i))); + FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ha, FmgcComputer_P.ConfirmNode_timeDelay_on, &rtb_y_me, &FmgcComputer_DWork.sf_MATLABFunction_mm); - rtb_AND12 = (Memory_PreviousInput_k_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_hold_active); - absVsTarget_tmp_tmp = (rtb_AND12 || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active); - absVsTarget_tmp = (absVsTarget_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active); - absVsTarget = static_cast((((rtb_y_hy || ((absVsTarget_tmp || + absVsTarget_tmp = (Memory_PreviousInput_k_tmp_tmp || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_hold_active); + absVsTarget_tmp_tmp = (absVsTarget_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active); + absVsTarget_tmp_0 = (absVsTarget_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active); + absVsTarget = static_cast((((rtb_y_hy || ((absVsTarget_tmp_0 || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || @@ -1985,41 +2002,41 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_me))) + (static_cast(rtb_y_da) << - 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_f); + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_me))) + (static_cast + (rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_f); rtb_Logic_b[0U] = FmgcComputer_P.Logic_table_pl[static_cast(absVsTarget)]; rtb_Logic_b[1U] = FmgcComputer_P.Logic_table_pl[static_cast(absVsTarget) + 8U]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel_bit_cs, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_a(rtb_y_p, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_m, + FmgcComputer_MATLABFunction_a(rtb_y_km, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_m, FmgcComputer_P.ConfirmNode_timeDelay_j5, &rtb_y_oi, &FmgcComputer_DWork.sf_MATLABFunction_hvs); - rtb_y_nlq = (rtb_handleIndex >= FmgcComputer_P.CompareToConstant_const_ja); + rtb_y_hh = (rtb_handleIndex >= FmgcComputer_P.CompareToConstant_const_ja); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault_defaultValue_p, &rtb_y_gtq); - rtb_y_da = (rtb_y_gtq >= FmgcComputer_P.CompareToConstant3_const_i); + rtb_Compare_a5 = (rtb_y_gtq >= FmgcComputer_P.CompareToConstant3_const_i); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault1_defaultValue_d, &rtb_y_gtq); - FmgcComputer_MATLABFunction_g((rtb_y_da || (rtb_y_gtq >= FmgcComputer_P.CompareToConstant5_const_k)), + FmgcComputer_MATLABFunction_g((rtb_Compare_a5 || (rtb_y_gtq >= FmgcComputer_P.CompareToConstant5_const_k)), FmgcComputer_P.PulseNode_isRisingEdge_c, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_fn5); - rtb_y_da = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_NOT3_tmp && (!rtb_y_oi) && rtb_y_nlq && + rtb_Compare_a5 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_NOT3_tmp && (!rtb_y_oi) && rtb_y_hh && rtb_y_ff)); - FmgcComputer_MATLABFunction_a(rtb_y_da, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_hj, - FmgcComputer_P.ConfirmNode_timeDelay_a3, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_lm); + FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_hj, + FmgcComputer_P.ConfirmNode_timeDelay_a3, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_lml); FmgcComputer_DWork.Memory_PreviousInput_i = FmgcComputer_P.Logic_table_o[((((rtb_y_hy || (Memory_PreviousInput_k_tmp_tmp_0 || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) && (!rtb_y_ff)) + (static_cast(rtb_y_da) << - 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_i]; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) && (!rtb_y_ff)) + (static_cast + (rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_i]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel_bit_e, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_m(FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active, FmgcComputer_U.in.time.dt, &rtb_y_ff, FmgcComputer_P.MTrigNode_isRisingEdge_d, FmgcComputer_P.MTrigNode_retriggerable_h, FmgcComputer_P.MTrigNode_triggerDuration_a, &FmgcComputer_DWork.sf_MATLABFunction_e3); - rtb_y_da = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && (rtb_AND1_c0 && rtb_NOT3_tmp_0 && - (!FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active) && + rtb_Compare_a5 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && (rtb_AND12 && rtb_NOT3_tmp_0 && ( + !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active) && (!FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active) && rtb_y_ff))); - FmgcComputer_MATLABFunction_a(rtb_y_da, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_mf, + FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_mf, FmgcComputer_P.ConfirmNode_timeDelay_dw, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_mtz); FmgcComputer_DWork.Memory_PreviousInput_el = FmgcComputer_P.Logic_table_c2[(((rtb_y_hy || ((FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_active || @@ -2028,15 +2045,18 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_ff))) + (static_cast(rtb_y_da) << - 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_el]; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_ff))) + (static_cast + (rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_el]; + rtb_BusAssignment_cp_logic_ra_computation_data_radio_height_ft.SSM = rtb_raComputationData_radio_height_ft_SSM; + rtb_BusAssignment_cp_logic_ra_computation_data_radio_height_ft.Data = rtb_raComputationData_radio_height_ft_Data; FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active), FmgcComputer_P.PulseNode3_isRisingEdge_l, &rtb_y_nlq, + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active), FmgcComputer_P.PulseNode3_isRisingEdge_l, &rtb_y_hh, &FmgcComputer_DWork.sf_MATLABFunction_gb); - rtb_GreaterThan3_tmp = ((!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.vs_active) && + Memory_PreviousInput_k_tmp_tmp_0 = ((!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.vs_active) && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fpa_active)); rtb_y_me = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active; - rtb_GreaterThan3 = (rtb_GreaterThan3_tmp && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active) && + rtb_GreaterThan3 = (Memory_PreviousInput_k_tmp_tmp_0 && + (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active) && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active) && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active) && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active) && rtb_y_me && @@ -2046,17 +2066,16 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_m((rtb_DataTypeConversion1_e != 0U), FmgcComputer_U.in.time.dt, &rtb_y_ff, FmgcComputer_P.MTrigNode_isRisingEdge_g, FmgcComputer_P.MTrigNode_retriggerable_f, FmgcComputer_P.MTrigNode_triggerDuration_bm, &FmgcComputer_DWork.sf_MATLABFunction_aw); - rtb_Compare_du = (rtb_GreaterThan3_tmp_0 && rtb_AND1_c0); - rtb_y_da = (rtb_y_a0_tmp && rtb_y_nlq && (rtb_Compare_du && rtb_NOT3_tmp_0 && - rtb_TmpSignalConversionAtSFunctionInport3_idx_0) && rtb_GreaterThan3 && (!rtb_y_ff)); + rtb_Compare_du = (Memory_PreviousInput_l_tmp && rtb_AND12); + rtb_y_da = (rtb_y_a0_tmp && rtb_y_hh && (rtb_Compare_du && rtb_NOT3_tmp_0 && rtb_appInop_idx_2) && rtb_GreaterThan3 && + (!rtb_y_ff)); FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active), FmgcComputer_P.PulseNode5_isRisingEdge_h, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_aj); - rtb_GreaterThan3_tmp_0 = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active; - Memory_PreviousInput_k_tmp_tmp_0 = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active; + Memory_PreviousInput_l_tmp = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active; + rtb_NOT3_tmp = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active; rtb_GreaterThan3 = (rtb_GreaterThan3 && rtb_y_ff && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && - (rtb_Compare_du && rtb_GreaterThan3_tmp_0 && Memory_PreviousInput_k_tmp_tmp_0 && - rtb_TmpSignalConversionAtSFunctionInport3_idx_0)); + (rtb_Compare_du && Memory_PreviousInput_l_tmp && rtb_NOT3_tmp && rtb_appInop_idx_2)); rtb_Compare_a5 = rtb_y_a0_tmp; FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode2_isRisingEdge_b, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_at); @@ -2064,8 +2083,8 @@ void FmgcComputer::step() FmgcComputer_P.BitfromLabel5_bit_f, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_j, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_o3); - rtb_NOT3_tmp = !FmgcComputer_U.in.fms_inputs.lateral_flight_plan_valid; - rtb_Compare_du = ((FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && rtb_NOT3_tmp && rtb_Compare_kg) || + rtb_OR2_l_tmp = !FmgcComputer_U.in.fms_inputs.lateral_flight_plan_valid; + rtb_Compare_du = ((FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && rtb_OR2_l_tmp && rtb_Compare_d2) || rtb_y_da || rtb_GreaterThan3 || (rtb_y_a0_tmp && rtb_NOT_gj && rtb_y_ff) || (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active && rtb_Compare_a5)); @@ -2079,32 +2098,33 @@ void FmgcComputer::step() FmgcComputer_P.BitfromLabel2_bit_i, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_i, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_di2); - rtb_GreaterThan3 = (rtb_y_hb && rtb_y_ff && rtb_TmpSignalConversionAtSFunctionInport3_idx_0 && (rtb_AND1_c0 || - (rtb_raComputationData >= FmgcComputer_P.CompareToConstant_const_a))); - rtb_y_nlq = rtb_OR_m4; + FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_cp_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); + rtb_GreaterThan3 = (rtb_y_e && rtb_y_ff && rtb_appInop_idx_2 && (rtb_AND12 || (rtb_y_gtq >= + FmgcComputer_P.CompareToConstant_const_a))); + rtb_y_hh = rtb_OR_m4; FmgcComputer_MATLABFunction_g(rtb_y_fd, FmgcComputer_P.PulseNode4_isRisingEdge_e, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_a5); rtb_y_lh_tmp = !FmgcComputer_DWork.Delay_DSTATE.any_lateral_mode_engaged; - rtb_y_oi = (rtb_y_lh_tmp && rtb_y_c); - rtb_y_da = ((rtb_Compare_a5 && rtb_OR2_l) || (rtb_y_e && (rtb_GreaterThan3 || (rtb_OR_m4 && rtb_y_ff && rtb_y_oi) || - rtb_Compare_du))); - FmgcComputer_MATLABFunction_a(rtb_y_da, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_a, + rtb_y_oi = (rtb_y_lh_tmp && rtb_y_h); + rtb_Compare_a5 = ((rtb_Compare_a5 && rtb_OR2_l) || (rtb_y_cq && (rtb_GreaterThan3 || (rtb_OR_m4 && rtb_y_ff && + rtb_y_oi) || rtb_Compare_du))); + FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_a, FmgcComputer_P.ConfirmNode_timeDelay_a2, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_hdw); - FmgcComputer_DWork.Memory_PreviousInput_f2 = FmgcComputer_P.Logic_table_i[(((((!rtb_y_ff) && (rtb_AND9 || + FmgcComputer_DWork.Memory_PreviousInput_f2 = FmgcComputer_P.Logic_table_i[(((((!rtb_y_ff) && (rtb_AND8 || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_y_hy) + (static_cast(rtb_y_da) << 1)) - << 1) + FmgcComputer_DWork.Memory_PreviousInput_f2]; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_y_hy) + (static_cast(rtb_Compare_a5) << + 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_f2]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_k, &rtb_DataTypeConversion1_e); rtb_y_da = ((rtb_DataTypeConversion1_e != 0U) && FmgcComputer_DWork.Memory_PreviousInput_f2); rtb_AND9 = (FmgcComputer_DWork.Memory_PreviousInput_f2 && (rtb_DataTypeConversion1_e == 0U)); - rtb_OR2_l_tmp_0 = rtb_Compare_du; + rtb_AND8 = rtb_Compare_du; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_fu, &rtb_DataTypeConversion1_e); rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel2_bit_m, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_j, &rtb_y_nlq, + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_j, &rtb_y_hh, &FmgcComputer_DWork.sf_MATLABFunction_m1w); FmgcComputer_MATLABFunction_g(FmgcComputer_U.in.fms_inputs.lateral_flight_plan_valid, FmgcComputer_P.PulseNode3_isRisingEdge_e, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_hu); @@ -2116,12 +2136,12 @@ void FmgcComputer::step() FmgcComputer_U.in.time.dt, &rtb_y_oi, FmgcComputer_P.MTrigNode_isRisingEdge_i, FmgcComputer_P.MTrigNode_retriggerable_a, FmgcComputer_P.MTrigNode_triggerDuration_l, &FmgcComputer_DWork.sf_MATLABFunction_fi); - rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || (rtb_y_i2 && ((rtb_GreaterThan3_tmp_0 && - Memory_PreviousInput_k_tmp_tmp_0 && rtb_TmpSignalConversionAtSFunctionInport3_idx_0 && rtb_y_nlq) || (rtb_y_p && - rtb_NOT_b && (rtb_y_lh_tmp || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_loc_submode_active)) || rtb_y_ff || - (rtb_y_oi && rtb_GreaterThan3)))); + rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || (rtb_y_i2 && ((Memory_PreviousInput_l_tmp && rtb_NOT3_tmp && + rtb_appInop_idx_2 && rtb_y_hh) || (rtb_y_km && rtb_NOT_b && (rtb_y_lh_tmp || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_loc_submode_active)) || rtb_y_ff || (rtb_y_oi && + rtb_GreaterThan3)))); FmgcComputer_MATLABFunction_g(FmgcComputer_DWork.Delay_DSTATE.hdg_trk_preset_available, - FmgcComputer_P.PulseNode2_isRisingEdge_i, &rtb_y_nlq, &FmgcComputer_DWork.sf_MATLABFunction_h0); + FmgcComputer_P.PulseNode2_isRisingEdge_i, &rtb_y_hh, &FmgcComputer_DWork.sf_MATLABFunction_h0); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel1_bit_p, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_k, &rtb_y_oi, @@ -2132,8 +2152,8 @@ void FmgcComputer::step() FmgcComputer_P.PulseNode6_isRisingEdge, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_jd); FmgcComputer_MATLABFunction_g(FmgcComputer_DWork.Memory_PreviousInput_dv, FmgcComputer_P.PulseNode5_isRisingEdge_a, &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_ew); - FmgcComputer_DWork.Memory_PreviousInput_i1 = FmgcComputer_P.Logic_table_g[(((rtb_y_nlq || rtb_y_oi || rtb_y_ff || - rtb_NOT3_tmp || rtb_GreaterThan3 || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || + FmgcComputer_DWork.Memory_PreviousInput_i1 = FmgcComputer_P.Logic_table_g[(((rtb_y_hh || rtb_y_oi || rtb_y_ff || + rtb_OR2_l_tmp || rtb_GreaterThan3 || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || rtb_appCapability_idx_2) + (static_cast(rtb_Compare_du) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_i1]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_2, @@ -2141,28 +2161,30 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_m(FmgcComputer_U.in.fms_inputs.direct_to_nav_engage, FmgcComputer_U.in.time.dt, &rtb_y_ff, FmgcComputer_P.MTrigNode_isRisingEdge_h, FmgcComputer_P.MTrigNode_retriggerable_g, FmgcComputer_P.MTrigNode_triggerDuration_e, &FmgcComputer_DWork.sf_MATLABFunction_prl); - rtb_Compare_a5 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && + FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_cp_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); + rtb_Compare_a5 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && FmgcComputer_U.in.fms_inputs.nav_capture_condition && (FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed || - rtb_y_ff) && ((rtb_raComputationData >= FmgcComputer_P.CompareToConstant_const_oh) || rtb_dualRaFailure) && - (rtb_AND1_c0 || (rtb_raComputationData >= FmgcComputer_P.CompareToConstant1_const_b)))); + rtb_y_ff) && ((rtb_y_gtq >= FmgcComputer_P.CompareToConstant_const_oh) || raOwnInvalid) && (rtb_AND12 || + (rtb_y_gtq >= FmgcComputer_P.CompareToConstant1_const_bh)))); FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_co, FmgcComputer_P.ConfirmNode_timeDelay_d1, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_ge4); - FmgcComputer_DWork.Memory_PreviousInput_ip = FmgcComputer_P.Logic_table_a[(((rtb_NOT3_tmp || rtb_y_hy || + FmgcComputer_DWork.Memory_PreviousInput_ip = FmgcComputer_P.Logic_table_a[(((rtb_OR2_l_tmp || rtb_y_hy || ((Memory_PreviousInput_d_tmp || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_ff))) + ( static_cast(rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ip]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_o, &rtb_DataTypeConversion1_e); rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); - rtb_Compare_a5 = rtb_y_e; + rtb_Compare_a5 = rtb_y_cq; FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active), FmgcComputer_P.PulseNode1_isRisingEdge_cs, &rtb_y_i2, + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active), FmgcComputer_P.PulseNode1_isRisingEdge_cs, &rtb_y_oi, &FmgcComputer_DWork.sf_MATLABFunction_ma); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel1_bit_ls, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode2_isRisingEdge_o, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_k4c); - rtb_NOT_b = rtb_OR_bg; - rtb_AND1_c0 = (rtb_y_ff && rtb_OR_bg && (rtb_raComputationData >= FmgcComputer_P.CompareToConstant_const_m) && + rtb_NOT_b = rtb_AND1_c0; + FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_cp_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); + rtb_AND1_c0 = (rtb_y_ff && rtb_AND1_c0 && (rtb_y_gtq >= FmgcComputer_P.CompareToConstant_const_m) && ((FmgcComputer_P.EnumeratedConstant_Value_a != FmgcComputer_U.in.fms_inputs.fms_flight_phase) && (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant1_Value_dg))); FmgcComputer_MATLABFunction_a(rtb_AND1_c0, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_n, @@ -2176,7 +2198,7 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || rtb_NOT_gj || rtb_y_ff) + ( - static_cast((rtb_Compare_du && rtb_OR2_l) || (rtb_y_e && (rtb_y_i2 || rtb_AND1_c0))) << 1)) << 1) + + static_cast((rtb_Compare_du && rtb_OR2_l) || (rtb_y_cq && (rtb_y_oi || rtb_AND1_c0))) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_a]; rtb_BusAssignment_kv_logic_ir_computation_data_heading_magnetic_deg.SSM = rtb_irComputationBus_heading_magnetic_deg_SSM; @@ -2229,9 +2251,9 @@ void FmgcComputer::step() } if (high_i == low_ip1) { - rtb_DataTypeConversion1_d = std::abs(FmgcComputer_DWork.Delay2_DSTATE.Phi_loc_c); + rtb_DataTypeConversion8 = std::abs(FmgcComputer_DWork.Delay2_DSTATE.Phi_loc_c); guard1 = false; - if (rtb_DataTypeConversion1_d > 5.0) { + if (rtb_DataTypeConversion8 > 5.0) { if (std::abs(rtb_y_jq) <= 5.0F) { rtb_Compare_a5 = true; } else { @@ -2258,7 +2280,7 @@ void FmgcComputer::step() absVsTarget = (rtb_y_jq > 0.0F); } - rtb_Compare_a5 = ((rtb_DataTypeConversion1_d >= std::abs(rtb_y_jq)) && (low_ip1 == absVsTarget)); + rtb_Compare_a5 = ((rtb_DataTypeConversion8 >= std::abs(rtb_y_jq)) && (low_ip1 == absVsTarget)); } } else { rtb_Compare_a5 = false; @@ -2284,9 +2306,9 @@ void FmgcComputer::step() } FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_kv_logic_ils_computation_data_localizer_deviation_deg, - &rtb_AND1_c0); - rtb_Compare_a5 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && - FmgcComputer_DWork.Delay_DSTATE.armed_modes.loc_armed && rtb_Compare_a5 && rtb_AND1_c0)); + &rtb_Compare_du); + rtb_Compare_a5 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && + FmgcComputer_DWork.Delay_DSTATE.armed_modes.loc_armed && rtb_Compare_a5 && rtb_Compare_du)); FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_at, FmgcComputer_P.ConfirmNode_timeDelay_h4, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_p4); rtb_Compare_du = (Memory_PreviousInput_d_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active); @@ -2301,15 +2323,15 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction(&rtb_BusAssignment_kv_logic_ils_computation_data_localizer_deviation_deg, FmgcComputer_P.A429ValueOrDefault_defaultValue_b, &rtb_y_gtq); if (rtb_y_gtq < 0.0F) { - rtb_DataTypeConversion1_d = -rtb_y_gtq; + rtb_DataTypeConversion8 = -rtb_y_gtq; } else { - rtb_DataTypeConversion1_d = rtb_y_gtq; + rtb_DataTypeConversion8 = rtb_y_gtq; } - FmgcComputer_MATLABFunction_a((rtb_DataTypeConversion1_d < FmgcComputer_P.CompareToConstant1_const_n), + FmgcComputer_MATLABFunction_a((rtb_DataTypeConversion8 < FmgcComputer_P.CompareToConstant1_const_n), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_nd, FmgcComputer_P.ConfirmNode_timeDelay_e, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_is); - rtb_Compare_a5 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && + rtb_Compare_a5 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active && rtb_y_ff)); FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ea, FmgcComputer_P.ConfirmNode_timeDelay_es, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_pr); @@ -2344,7 +2366,7 @@ void FmgcComputer::step() if (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.vs_active) { rtb_y_jq = rtb_y_fl; } else if (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fpa_active) { - if (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active && rtb_y_ga) { + if (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active && rtb_OR1_j) { rtb_y_jq = static_cast(rtb_Phi_c_deg); } else { rtb_y_jq = 0.0F; @@ -2357,20 +2379,23 @@ void FmgcComputer::step() rtb_irComputationBus_inertial_vertical_speed_ft_s_SSM; rtb_BusAssignment_gt_logic_ir_computation_data_inertial_vertical_speed_ft_s.Data = rtb_irComputationBus_inertial_vertical_speed_ft_s_Data; + rtb_BusAssignment_gt_logic_ra_computation_data_radio_height_ft.SSM = rtb_raComputationData_radio_height_ft_SSM; + rtb_BusAssignment_gt_logic_ra_computation_data_radio_height_ft.Data = rtb_raComputationData_radio_height_ft_Data; if (rtb_DataTypeConversion2_kb < 0.0F) { - rtb_y_ga = (rtb_y_jq <= 0.0F); + rtb_OR1_j = (rtb_y_jq <= 0.0F); } else { - rtb_y_ga = ((rtb_DataTypeConversion2_kb > 0.0F) && (rtb_y_jq >= 0.0F)); + rtb_OR1_j = ((rtb_DataTypeConversion2_kb > 0.0F) && (rtb_y_jq >= 0.0F)); } - rtb_y_nlq = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_hold_active; - rtb_OR_bg = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active; - Memory_PreviousInput_d_tmp_tmp = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active; - rtb_AND1_c0 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && - (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active) && rtb_y_nlq && - Memory_PreviousInput_d_tmp_tmp && rtb_OR_bg && rtb_Compare_kg && rtb_TmpSignalConversionAtSFunctionInport3_idx_0 && - ((!rtb_y_ga) || (rtb_GreaterThan3_tmp && rtb_Compare_b)) && ((!rtb_y_hy) || (rtb_DataTypeConversion2_kb <= - FmgcComputer_P.CompareToConstant2_const_jy)) && rtb_y_fd && FmgcComputer_DWork.Memory_PreviousInput_n)); + rtb_GreaterThan3 = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_hold_active; + Memory_PreviousInput_d_tmp_tmp = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active; + Memory_PreviousInput_d_tmp = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active; + rtb_AND1_c0 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && + (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active) && rtb_GreaterThan3 && + Memory_PreviousInput_d_tmp && Memory_PreviousInput_d_tmp_tmp && rtb_Compare_d2 && rtb_appInop_idx_2 && + ((!rtb_OR1_j) || (Memory_PreviousInput_k_tmp_tmp_0 && rtb_Compare_gc)) && ((!rtb_y_hy) || + (rtb_DataTypeConversion2_kb <= FmgcComputer_P.CompareToConstant2_const_jy)) && rtb_y_fd && + FmgcComputer_DWork.Memory_PreviousInput_n)); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_ng, &rtb_DataTypeConversion1_e); rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); @@ -2420,17 +2445,18 @@ void FmgcComputer::step() static_cast(c[absVsTarget + 6])) * rtb_DataTypeConversion2_kb + static_cast(c[absVsTarget + 12])) * rtb_DataTypeConversion2_kb + static_cast(c[absVsTarget + 18])) * 9.81F) * 3.28084F)) > std::abs (rtb_Phi_c_deg)) && (high_i == low_ip1))); + FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_gt_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel7_bit_j, &rtb_DataTypeConversion1_e); rtb_y_oi = rtb_y_lh; - rtb_Compare_a5 = ((rtb_Compare_du && rtb_OR2_l) || (rtb_y_e && rtb_NOT_b && ((rtb_raComputationData >= - FmgcComputer_P.CompareToConstant_const_l5) || (rtb_y_c && rtb_Compare_d0)) && (rtb_Compare_b || + rtb_Compare_a5 = ((rtb_Compare_du && rtb_OR2_l) || (rtb_y_cq && rtb_NOT_b && ((rtb_y_gtq >= + FmgcComputer_P.CompareToConstant_const_l5) || (rtb_y_h && rtb_y_ai)) && (rtb_Compare_gc || ((rtb_DataTypeConversion1_e == 0U) && (FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode == FmgcComputer_P.EnumeratedConstant3_Value_l) && (!rtb_y_lh))))); FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_hux, FmgcComputer_P.ConfirmNode_timeDelay_lk, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_hw); FmgcComputer_DWork.Memory_PreviousInput_ne = FmgcComputer_P.Logic_table_nz - [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_AND12 || + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((absVsTarget_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || @@ -2459,10 +2485,10 @@ void FmgcComputer::step() &rtb_y_oi, &FmgcComputer_DWork.sf_MATLABFunction_ee); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel7_bit_k, &rtb_DataTypeConversion1_e); - rtb_Compare_a5 = ((rtb_Compare_du && rtb_OR2_l) || (rtb_y_e && - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active && rtb_y_oi && (rtb_Compare_b || + rtb_Compare_a5 = ((rtb_Compare_du && rtb_OR2_l) || (rtb_y_cq && + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active && rtb_y_oi && (rtb_Compare_gc || ((rtb_DataTypeConversion1_e == 0U) && (FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode == - FmgcComputer_P.EnumeratedConstant3_Value_p) && raOwnInvalid)))); + FmgcComputer_P.EnumeratedConstant3_Value_p) && rtb_NOT1_i)))); FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_lj, FmgcComputer_P.ConfirmNode_timeDelay_bd, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_dt); FmgcComputer_DWork.Memory_PreviousInput_cb = FmgcComputer_P.Logic_table_ob @@ -2483,13 +2509,13 @@ void FmgcComputer::step() (rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_cb]; FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault3_defaultValue_m, &rtb_y_gtq); - rtb_Compare_a5 = rtb_y_nlq; + rtb_Compare_a5 = rtb_GreaterThan3; FmgcComputer_DWork.Memory_PreviousInput_no = FmgcComputer_P.Logic_table_ay[(((static_cast(std::abs (FmgcComputer_U.in.fms_inputs.cruise_alt_ft - rtb_y_gtq) < FmgcComputer_P.CompareToConstant1_const_a) << 1) + - rtb_y_nlq) << 1) + FmgcComputer_DWork.Memory_PreviousInput_no]; - rtb_NOT3_tmp = !rtb_AND_j; - rtb_Compare_b = (FmgcComputer_DWork.Memory_PreviousInput_cb && rtb_NOT3_tmp && - FmgcComputer_DWork.Memory_PreviousInput_no); + rtb_GreaterThan3) << 1) + FmgcComputer_DWork.Memory_PreviousInput_no]; + rtb_OR2_l_tmp = !rtb_AND_j; + rtb_Compare_gc = (FmgcComputer_DWork.Memory_PreviousInput_cb && rtb_OR2_l_tmp && + FmgcComputer_DWork.Memory_PreviousInput_no); rtb_BusAssignment_o3_logic_adr_computation_data_airspeed_computed_kn.SSM = rtb_adrComputationBus_airspeed_computed_kn_SSM; rtb_BusAssignment_o3_logic_adr_computation_data_airspeed_computed_kn.Data = rtb_Max_a; @@ -2530,26 +2556,26 @@ void FmgcComputer::step() FmgcComputer_P.BitfromLabel7_bit_o, &rtb_DataTypeConversion1_e); rtb_y_i2 = (rtb_y_lh || (FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode == FmgcComputer_P.EnumeratedConstant3_Value_ls)); - rtb_y_hy = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active); - rtb_y_ff = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || + absVsTarget_tmp = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active); + rtb_y_hy = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active); - rtb_y_ga = (rtb_NOT3_tmp_0 && rtb_GreaterThan3_tmp_0 && Memory_PreviousInput_k_tmp_tmp_0); + rtb_OR1_j = (rtb_NOT3_tmp_0 && Memory_PreviousInput_l_tmp && rtb_NOT3_tmp); rtb_Compare_du = (rtb_AND12 || (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active && (rtb_Compare_a5 || rtb_Compare_du)) || (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active && ((FmgcComputer_P.EnumeratedConstant_Value_p == FmgcComputer_U.in.fms_inputs.fms_flight_phase) || (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant1_Value_m) || - (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant2_Value) || rtb_y_ga || - rtb_OR2_l_tmp)) || (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active && (std::abs - (FmgcComputer_B.u_ly - rtb_altCstrOrFcu) >= FmgcComputer_P.CompareToConstant_const_omz)) || (rtb_y_hy && - (rtb_DataTypeConversion2_bh > FmgcComputer_P.CompareToConstant1_const_o)) || (rtb_y_ff && - (rtb_DataTypeConversion2_bh < FmgcComputer_P.CompareToConstant2_const_g)) || ((rtb_y_hy || + (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant2_Value) || rtb_OR1_j || + rtb_Compare_bm)) || (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active && (std::abs + (FmgcComputer_B.u_ly - rtb_altCstrOrFcu) >= FmgcComputer_P.CompareToConstant_const_om)) || (absVsTarget_tmp && + (rtb_DataTypeConversion2_bh > FmgcComputer_P.CompareToConstant1_const_o)) || (rtb_y_hy && + (rtb_DataTypeConversion2_bh < FmgcComputer_P.CompareToConstant2_const_g)) || ((absVsTarget_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active) && (rtb_DataTypeConversion2_kb > rtb_y_jq) && - rtb_fmgcOppPriority_tmp && FmgcComputer_DWork.Delay_DSTATE_k && FmgcComputer_P.Constant_Value_m) || (rtb_y_ff && - (rtb_y_jq > rtb_y_gtq + FmgcComputer_P.Bias1_Bias) && rtb_fmgcOppPriority_tmp && FmgcComputer_DWork.Delay_DSTATE_k - && FmgcComputer_P.Constant_Value_m) || (((rtb_DataTypeConversion1_e == 0U) || rtb_y_lh) && + rtb_Compare_fn && FmgcComputer_DWork.Delay_DSTATE_k && FmgcComputer_P.Constant_Value_m) || (rtb_y_hy && (rtb_y_jq > + rtb_y_gtq + FmgcComputer_P.Bias1_Bias) && rtb_Compare_fn && FmgcComputer_DWork.Delay_DSTATE_k && + FmgcComputer_P.Constant_Value_m) || (((rtb_DataTypeConversion1_e == 0U) || rtb_y_lh) && FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active && rtb_y_i2)); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_ax, &rtb_DataTypeConversion1_e); @@ -2557,24 +2583,23 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_k, &rtb_DataTypeConversion1_e); rtb_Compare_a5 = (rtb_Compare_a5 || (rtb_DataTypeConversion1_e != 0U)); - rtb_NOT_b = rtb_y_e; + rtb_NOT_b = rtb_y_cq; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel4_bit_g, &rtb_DataTypeConversion1_e); rtb_GreaterThan3 = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel5_bit_n, &rtb_DataTypeConversion1_e); - rtb_y_nlq = (rtb_DataTypeConversion1_e != 0U); + rtb_y_hh = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_g((rtb_GreaterThan3 || (rtb_DataTypeConversion1_e != 0U)), - FmgcComputer_P.PulseNode_isRisingEdge_d, &rtb_y_nlq, &FmgcComputer_DWork.sf_MATLABFunction_nd); + FmgcComputer_P.PulseNode_isRisingEdge_d, &rtb_y_hh, &FmgcComputer_DWork.sf_MATLABFunction_nd); FmgcComputer_MATLABFunction_g(rtb_y_fd, FmgcComputer_P.PulseNode1_isRisingEdge_ky, &rtb_y_i2, &FmgcComputer_DWork.sf_MATLABFunction_dsw); rtb_y_lh_tmp = !FmgcComputer_DWork.Delay_DSTATE.any_longitudinal_mode_engaged; rtb_y_oi = rtb_y_lh_tmp; FmgcComputer_MATLABFunction_a(rtb_OR_m4, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ld, FmgcComputer_P.ConfirmNode_timeDelay_op, &rtb_y_oi, &FmgcComputer_DWork.sf_MATLABFunction_cz); - rtb_Compare_a5 = ((rtb_Compare_a5 && rtb_OR2_l) || (rtb_y_e && ((rtb_y_hb && rtb_y_nlq && - rtb_TmpSignalConversionAtSFunctionInport3_idx_0) || (rtb_OR_m4 && rtb_y_i2 && rtb_y_lh_tmp) || (rtb_y_oi && - rtb_y_lh_tmp) || rtb_Compare_du))); + rtb_Compare_a5 = ((rtb_Compare_a5 && rtb_OR2_l) || (rtb_y_cq && ((rtb_y_e && rtb_y_hh && rtb_appInop_idx_2) || + (rtb_OR_m4 && rtb_y_i2 && rtb_y_lh_tmp) || (rtb_y_oi && rtb_y_lh_tmp) || rtb_Compare_du))); FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_lu, FmgcComputer_P.ConfirmNode_timeDelay_ll, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_gbq); FmgcComputer_DWork.Memory_PreviousInput_fg = FmgcComputer_P.Logic_table_ny @@ -2596,8 +2621,8 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_e, &rtb_DataTypeConversion1_e); rtb_AND12 = ((rtb_DataTypeConversion1_e != 0U) && FmgcComputer_DWork.Memory_PreviousInput_fg); - rtb_GreaterThan3_tmp_0 = (FmgcComputer_DWork.Memory_PreviousInput_fg && (rtb_DataTypeConversion1_e == 0U)); - Memory_PreviousInput_k_tmp_tmp_0 = rtb_Compare_du; + Memory_PreviousInput_l_tmp = (FmgcComputer_DWork.Memory_PreviousInput_fg && (rtb_DataTypeConversion1_e == 0U)); + rtb_NOT3_tmp = rtb_Compare_du; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_jh, &rtb_DataTypeConversion1_e); rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); @@ -2605,7 +2630,7 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault_defaultValue_et, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault1_defaultValue_oj, &rtb_y_gtq); - rtb_y_nlq = (rtb_y_jq > rtb_y_gtq); + rtb_y_hh = (rtb_y_jq > rtb_y_gtq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_px, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_bb, &rtb_y_ff, @@ -2616,28 +2641,28 @@ void FmgcComputer::step() rtb_NOT_b = (rtb_OR_m4 && ((FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant1_Value_f) && (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant2_Value_p)) && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && - rtb_y_nlq && FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && (rtb_y_i2 || (rtb_y_ff && + rtb_y_hh && FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && (rtb_y_i2 || (rtb_y_ff && rtb_AND_e_tmp && (rtb_AND_j && (std::abs(rtb_altCstrOrFcu - rtb_y_gtq) <= FmgcComputer_P.CompareToConstant2_const_d))))); - rtb_GreaterThan3 = (rtb_y_p || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || + rtb_GreaterThan3 = (rtb_y_km || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault4_defaultValue_k, &rtb_y_gtq); - rtb_y_nlq = ((FmgcComputer_U.in.fms_inputs.acceleration_alt_ft != FmgcComputer_P.CompareToConstant_const_lz) && - (FmgcComputer_U.in.fms_inputs.acceleration_alt_ft < rtb_y_gtq) && - ((FmgcComputer_U.in.fms_inputs.acceleration_alt_ft < FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft) || - (FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft == FmgcComputer_P.CompareToConstant1_const_p)) && - (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || - FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed) && - ((!rtP_fmgc_ap_fd_logic_output_MATLABStruct.any_lateral_mode_engaged) || - FmgcComputer_DWork.Memory_PreviousInput_c)); + rtb_y_hh = ((FmgcComputer_U.in.fms_inputs.acceleration_alt_ft != FmgcComputer_P.CompareToConstant_const_l) && + (FmgcComputer_U.in.fms_inputs.acceleration_alt_ft < rtb_y_gtq) && + ((FmgcComputer_U.in.fms_inputs.acceleration_alt_ft < FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft) || + (FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft == FmgcComputer_P.CompareToConstant1_const_p)) && + (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || + FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed) && + ((!rtP_fmgc_ap_fd_logic_output_MATLABStruct.any_lateral_mode_engaged) || + FmgcComputer_DWork.Memory_PreviousInput_c)); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault2_defaultValue_jt, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault3_defaultValue_os, &rtb_y_gtq); rtb_y_fd = (Memory_PreviousInput_k_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active); - FmgcComputer_DWork.Memory_PreviousInput_ma = FmgcComputer_P.Logic_table_ns[((((rtb_GreaterThan3 && (!rtb_y_nlq)) || + FmgcComputer_DWork.Memory_PreviousInput_ma = FmgcComputer_P.Logic_table_ns[((((rtb_GreaterThan3 && (!rtb_y_hh)) || (rtb_y_fd || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || @@ -2645,12 +2670,12 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || ((FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_hold_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active) && rtb_NOT3_tmp) || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active) && rtb_OR2_l_tmp) || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active) || (rtb_y_jq < rtb_y_gtq) || (rtb_AND_e_tmp && - (rtb_NOT3_tmp || rtb_NOT3_tmp_0 || rtb_OR2_l_tmp)) || ((FmgcComputer_U.in.fms_inputs.fms_flight_phase == + (rtb_OR2_l_tmp || rtb_NOT3_tmp_0 || rtb_Compare_bm)) || ((FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant3_Value) || (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant4_Value)) || rtb_appCapability_idx_2) + (static_cast((rtb_Compare_du && - rtb_OR2_l) || (rtb_y_e && (rtb_NOT_b || (rtb_GreaterThan3 && rtb_y_nlq)))) << 1)) << 1) + + rtb_OR2_l) || (rtb_y_cq && (rtb_NOT_b || (rtb_GreaterThan3 && rtb_y_hh)))) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ma]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_g3, &rtb_DataTypeConversion1_e); @@ -2677,10 +2702,10 @@ void FmgcComputer::step() &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_dd); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault5_defaultValue_d, &rtb_y_gtq); - rtb_y_hy = (rtb_NOT3_tmp || (std::abs(rtb_altCstrOrFcu - rtb_y_gtq) > FmgcComputer_P.CompareToConstant2_const_a)); - rtb_NOT_b = (rtb_y_e && FmgcComputer_DWork.Delay_DSTATE.armed_modes.alt_acq_arm_possible && rtb_y_hb); - rtb_Compare_a5 = ((rtb_Compare_du && rtb_OR2_l) || (rtb_NOT_b && (rtb_TmpSignalConversionAtSFunctionInport3_idx_0 && - rtb_OR_bg) && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && + rtb_y_hy = (rtb_OR2_l_tmp || (std::abs(rtb_altCstrOrFcu - rtb_y_gtq) > FmgcComputer_P.CompareToConstant2_const_a)); + rtb_NOT_b = (rtb_y_cq && FmgcComputer_DWork.Delay_DSTATE.armed_modes.alt_acq_arm_possible && rtb_y_e); + rtb_Compare_a5 = ((rtb_Compare_du && rtb_OR2_l) || (rtb_NOT_b && (rtb_appInop_idx_2 && + Memory_PreviousInput_d_tmp_tmp) && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && rtb_GreaterThan3 && ((FmgcComputer_P.EnumeratedConstant_Value_pq != FmgcComputer_U.in.fms_inputs.fms_flight_phase) && (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant1_Value_iv)) && @@ -2688,13 +2713,14 @@ void FmgcComputer::step() (rtb_AND_e_tmp && (!FmgcComputer_DWork.Delay_DSTATE.armed_modes.clb_armed) && rtb_y_hy)))))); FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_fc, FmgcComputer_P.ConfirmNode_timeDelay_nn, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_ir); - rtb_GreaterThan3_tmp = (absVsTarget_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || + Memory_PreviousInput_k_tmp_tmp = (absVsTarget_tmp_0 || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active); FmgcComputer_DWork.Memory_PreviousInput_ec = FmgcComputer_P.Logic_table_kw - [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_GreaterThan3_tmp || + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((Memory_PreviousInput_k_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || @@ -2716,11 +2742,12 @@ void FmgcComputer::step() &FmgcComputer_DWork.sf_MATLABFunction_mrk); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault5_defaultValue_k, &rtb_y_gtq); - rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || (rtb_y_e && ((FmgcComputer_U.in.fms_inputs.fms_flight_phase != + rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || (rtb_y_cq && ((FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant1_Value_c) && (FmgcComputer_U.in.fms_inputs.fms_flight_phase != - FmgcComputer_P.EnumeratedConstant2_Value_pi) && rtb_GreaterThan3 && rtb_y_ai && - FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && (rtb_y_i2 || (rtb_y_hy && rtb_AND_e_tmp && (rtb_AND_j && - (std::abs(rtb_altCstrOrFcu - rtb_y_gtq) <= FmgcComputer_P.CompareToConstant2_const_e))))))); + FmgcComputer_P.EnumeratedConstant2_Value_pi) && rtb_GreaterThan3 && + rtb_TmpSignalConversionAtSFunctionInport3_idx_2 && FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && + (rtb_y_i2 || (rtb_y_hy && rtb_AND_e_tmp && (rtb_AND_j && (std::abs(rtb_altCstrOrFcu - rtb_y_gtq) <= + FmgcComputer_P.CompareToConstant2_const_e))))))); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault2_defaultValue_cj, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, @@ -2733,11 +2760,11 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || (rtb_y_jq > rtb_y_gtq) || rtb_y_ga || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || (rtb_y_jq > rtb_y_gtq) || rtb_OR1_j || ((FmgcComputer_P.EnumeratedConstant_Value_b == FmgcComputer_U.in.fms_inputs.fms_flight_phase) || (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant5_Value) || - (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant6_Value)) || rtb_OR2_l_tmp || - (rtb_AND_e_tmp && rtb_NOT3_tmp) || rtb_appCapability_idx_2) + (static_cast(rtb_Compare_du) << 1)) << 1) + (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant6_Value)) || rtb_Compare_bm || + (rtb_AND_e_tmp && rtb_OR2_l_tmp) || rtb_appCapability_idx_2) + (static_cast(rtb_Compare_du) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_nt]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_mi, &rtb_DataTypeConversion1_e); @@ -2752,7 +2779,7 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault_defaultValue_mo, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault1_defaultValue_b5, &rtb_y_gtq); - rtb_y_nlq = (rtb_y_jq < rtb_y_gtq); + rtb_y_hh = (rtb_y_jq < rtb_y_gtq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_a, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_fq, @@ -2760,26 +2787,26 @@ void FmgcComputer::step() rtb_y_hy = !FmgcComputer_DWork.Delay_DSTATE.armed_modes.des_armed; FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault5_defaultValue_m, &rtb_y_gtq); - rtb_Compare_a5 = ((rtb_Compare_du && rtb_OR2_l) || (rtb_NOT_b && (rtb_OR_bg && - rtb_TmpSignalConversionAtSFunctionInport3_idx_0 && rtb_y_me && rtb_Compare_kg && rtb_y_c && rtb_Compare_d0) && - rtb_y_ai && FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && rtb_y_nlq && - ((FmgcComputer_P.EnumeratedConstant_Value_m != FmgcComputer_U.in.fms_inputs.fms_flight_phase) && - (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant1_Value_k) && - (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant2_Value_pw)) && + rtb_Compare_a5 = ((rtb_Compare_du && rtb_OR2_l) || (rtb_NOT_b && (Memory_PreviousInput_d_tmp_tmp && + rtb_appInop_idx_2 && rtb_y_me && rtb_Compare_d2 && rtb_y_h && rtb_y_ai) && + rtb_TmpSignalConversionAtSFunctionInport3_idx_2 && FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && + rtb_y_hh && ((FmgcComputer_P.EnumeratedConstant_Value_m != FmgcComputer_U.in.fms_inputs.fms_flight_phase) && + (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant1_Value_k) && + (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant2_Value_pw)) && ((FmgcComputer_DWork.Delay_DSTATE.armed_modes.des_armed && (FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft != FmgcComputer_DWork.DelayInput1_DSTATE_n)) || (rtb_y_ff && ((!rtb_AND_e_tmp) || (rtb_AND_e_tmp && rtb_y_hy && - (rtb_NOT3_tmp || (std::abs(rtb_altCstrOrFcu - rtb_y_gtq) > FmgcComputer_P.CompareToConstant2_const_l)))))))); + (rtb_OR2_l_tmp || (std::abs(rtb_altCstrOrFcu - rtb_y_gtq) > FmgcComputer_P.CompareToConstant2_const_l)))))))); FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_j, FmgcComputer_P.ConfirmNode_timeDelay_dy, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_n5); - rtb_y_c = (absVsTarget_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || + rtb_y_h = (absVsTarget_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active); - rtb_y_ga = (rtb_y_c || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active); - rtb_NOT3_tmp = (rtb_y_ga || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active); + rtb_OR1_j = (rtb_y_h || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active); + rtb_AND_e_tmp = (rtb_OR1_j || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active); FmgcComputer_DWork.Memory_PreviousInput_b3 = FmgcComputer_P.Logic_table_cv - [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_NOT3_tmp || + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_AND_e_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || @@ -2801,31 +2828,31 @@ void FmgcComputer::step() FmgcComputer_P.BitfromLabel4_bit_d, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_n, &rtb_y_hy, &FmgcComputer_DWork.sf_MATLABFunction_f0h); - rtb_y_fd = rtb_OR2_l_tmp; + rtb_y_fd = rtb_Compare_bm; rtb_y_oi = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active); FmgcComputer_MATLABFunction_a((FmgcComputer_DWork.Delay_DSTATE.manual_spd_control_active && rtb_y_oi), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_jo, FmgcComputer_P.ConfirmNode_timeDelay_jo, &rtb_y_oi, &FmgcComputer_DWork.sf_MATLABFunction_moh); - rtb_y_nlq = ((FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active && - ((FmgcComputer_P.EnumeratedConstant_Value_c == FmgcComputer_U.in.fms_inputs.fms_flight_phase) || - (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant1_Value_c5) || - rtb_NOT3_tmp_0 || rtb_OR2_l_tmp)) || rtb_y_oi); + rtb_y_hh = ((FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active && + ((FmgcComputer_P.EnumeratedConstant_Value_c == FmgcComputer_U.in.fms_inputs.fms_flight_phase) || + (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant1_Value_c5) || + rtb_NOT3_tmp_0 || rtb_Compare_bm)) || rtb_y_oi); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault2_defaultValue_e, &rtb_y_gtq); FmgcComputer_MATLABFunction_g((rtb_y_gtq > FmgcComputer_U.in.fms_inputs.acceleration_alt_ft), FmgcComputer_P.PulseNode1_isRisingEdge_g, &rtb_y_fd, &FmgcComputer_DWork.sf_MATLABFunction_lva); - rtb_y_i2 = (rtb_NOT3_tmp_0 || rtb_OR2_l_tmp); - rtb_y_oi = (rtb_y_hy || rtb_y_nlq || (rtb_y_fd && (FmgcComputer_U.in.fms_inputs.acceleration_alt_ft != + rtb_y_i2 = (rtb_NOT3_tmp_0 || rtb_Compare_bm); + rtb_y_oi = (rtb_y_hy || rtb_y_hh || (rtb_y_fd && (FmgcComputer_U.in.fms_inputs.acceleration_alt_ft != FmgcComputer_P.CompareToConstant_const_od) && rtb_y_i2)); - rtb_NOT_b = (rtb_NOT_b && rtb_TmpSignalConversionAtSFunctionInport3_idx_0); + rtb_NOT_b = (rtb_NOT_b && rtb_appInop_idx_2); rtb_Compare_a5 = (rtb_NOT_b && rtb_GreaterThan3 && rtb_y_oi); rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || rtb_Compare_a5); FmgcComputer_MATLABFunction_a(rtb_Compare_du, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ca, FmgcComputer_P.ConfirmNode_timeDelay_ib, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_go); FmgcComputer_DWork.Memory_PreviousInput_ae = FmgcComputer_P.Logic_table_jq - [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_GreaterThan3_tmp || + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((Memory_PreviousInput_k_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || @@ -2833,7 +2860,7 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_Compare_a5))) + (static_cast (rtb_Compare_du) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ae]; - rtb_y_hy = (FmgcComputer_DWork.Memory_PreviousInput_ae && rtb_y_nlq); + rtb_y_hy = (FmgcComputer_DWork.Memory_PreviousInput_ae && rtb_y_hh); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_b, &rtb_DataTypeConversion1_e); rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); @@ -2846,19 +2873,19 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault1_defaultValue_dp, &rtb_y_gtq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel4_bit_i, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_f, &rtb_y_nlq, + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_f, &rtb_y_hh, &FmgcComputer_DWork.sf_MATLABFunction_ms); FmgcComputer_MATLABFunction_a((FmgcComputer_DWork.Delay_DSTATE.manual_spd_control_active && FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_fq, FmgcComputer_P.ConfirmNode_timeDelay_lp, &rtb_y_oi, &FmgcComputer_DWork.sf_MATLABFunction_hj); - rtb_y_nlq = (rtb_y_nlq || rtb_y_oi); - rtb_Compare_a5 = (rtb_NOT_b && (rtb_y_jq < rtb_y_gtq) && rtb_y_nlq); + rtb_y_hh = (rtb_y_hh || rtb_y_oi); + rtb_Compare_a5 = (rtb_NOT_b && (rtb_y_jq < rtb_y_gtq) && rtb_y_hh); rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || rtb_Compare_a5); FmgcComputer_MATLABFunction_a(rtb_Compare_du, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ep, FmgcComputer_P.ConfirmNode_timeDelay_ob, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_khd); FmgcComputer_DWork.Memory_PreviousInput_ev = FmgcComputer_P.Logic_table_lw - [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_NOT3_tmp || + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_AND_e_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || @@ -2877,14 +2904,14 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault1_defaultValue_hb, &rtb_y_gtq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel4_bit_e, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_az, - &rtb_y_nlq, &FmgcComputer_DWork.sf_MATLABFunction_fl); - rtb_Compare_a5 = (rtb_NOT_b && (rtb_y_jq > rtb_y_gtq) && rtb_y_nlq); + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_az, &rtb_y_hh, + &FmgcComputer_DWork.sf_MATLABFunction_fl); + rtb_Compare_a5 = (rtb_NOT_b && (rtb_y_jq > rtb_y_gtq) && rtb_y_hh); rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || rtb_Compare_a5); FmgcComputer_MATLABFunction_a(rtb_Compare_du, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_b, FmgcComputer_P.ConfirmNode_timeDelay_io, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_dn1); FmgcComputer_DWork.Memory_PreviousInput_mx = FmgcComputer_P.Logic_table_ao - [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((absVsTarget_tmp || + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((absVsTarget_tmp_0 || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || @@ -2909,14 +2936,14 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault1_defaultValue_a, &rtb_y_gtq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel4_bit_kh, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_m, &rtb_y_nlq, + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_m, &rtb_y_hh, &FmgcComputer_DWork.sf_MATLABFunction_a3); - rtb_Compare_a5 = (rtb_NOT_b && (rtb_y_jq < rtb_y_gtq) && rtb_y_nlq); + rtb_Compare_a5 = (rtb_NOT_b && (rtb_y_jq < rtb_y_gtq) && rtb_y_hh); rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || rtb_Compare_a5); FmgcComputer_MATLABFunction_a(rtb_Compare_du, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ef, FmgcComputer_P.ConfirmNode_timeDelay_p, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_epf); FmgcComputer_DWork.Memory_PreviousInput_o = FmgcComputer_P.Logic_table_om - [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_y_c || + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_y_h || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || @@ -2930,15 +2957,16 @@ void FmgcComputer::step() (rtb_Compare_du) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_o]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_b, &rtb_DataTypeConversion1_e); - rtb_Compare_a5 = rtb_y_e; + rtb_Compare_a5 = rtb_y_cq; FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active), FmgcComputer_P.PulseNode1_isRisingEdge_b, &rtb_y_nlq, + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active), FmgcComputer_P.PulseNode1_isRisingEdge_b, &rtb_y_hh, &FmgcComputer_DWork.sf_MATLABFunction_pe); FmgcComputer_MATLABFunction_g(FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed, FmgcComputer_P.PulseNode_isRisingEdge_lz, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_iv); FmgcComputer_DWork.Memory_PreviousInput_fm = FmgcComputer_P.Logic_table_dr[(((static_cast - (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && (rtb_y_nlq && Memory_PreviousInput_d_tmp_tmp && - rtb_OR_bg))) << 1) + (rtb_Compare_a5 || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || + (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && (rtb_y_hh && Memory_PreviousInput_d_tmp && + Memory_PreviousInput_d_tmp_tmp))) << 1) + (rtb_Compare_a5 || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_fm]; rtb_BusAssignment_b0_logic_ils_computation_data_glideslope_deviation_deg.SSM = @@ -2963,14 +2991,14 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_b0_logic_ils_computation_data_glideslope_deviation_deg, &rtb_Compare_a5); - rtb_Compare_a5 = (rtb_y_e && FmgcComputer_DWork.Delay_DSTATE.armed_modes.glide_armed && rtb_y_a0_tmp && + rtb_Compare_a5 = (rtb_y_cq && FmgcComputer_DWork.Delay_DSTATE.armed_modes.glide_armed && rtb_y_a0_tmp && (((rtb_DataTypeConversion2_kb < FmgcComputer_DWork.DelayInput1_DSTATE_b) && (rtb_Nosewheel_c < - FmgcComputer_P.CompareToConstant1_const_n2)) || (rtb_Nosewheel_c < FmgcComputer_P.CompareToConstant2_const_iq)) && + FmgcComputer_P.CompareToConstant1_const_n2)) || (rtb_Nosewheel_c < FmgcComputer_P.CompareToConstant2_const_i)) && rtb_Compare_a5); rtb_Compare_du = ((rtb_Compare_du && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || rtb_Compare_a5); FmgcComputer_MATLABFunction_a(rtb_Compare_du, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_g, FmgcComputer_P.ConfirmNode_timeDelay_a3g, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_bs); - rtb_y_fd = (rtb_y_ga || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active); + rtb_y_fd = (rtb_OR1_j || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active); FmgcComputer_DWork.Memory_PreviousInput_nu = FmgcComputer_P.Logic_table_d3[(((((!rtb_Compare_a5) && (rtb_y_fd || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || @@ -2985,22 +3013,22 @@ void FmgcComputer::step() rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_g, &rtb_DataTypeConversion1_e); - rtb_Compare_a5 = rtb_y_e; + rtb_Compare_a5 = rtb_y_cq; FmgcComputer_MATLABFunction_a(FmgcComputer_DWork.Memory_PreviousInput_nu, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_gr, FmgcComputer_P.ConfirmNode_timeDelay_m, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_muf); FmgcComputer_MATLABFunction(&rtb_BusAssignment_b0_logic_ils_computation_data_glideslope_deviation_deg, FmgcComputer_P.A429ValueOrDefault_defaultValue_k, &rtb_y_gtq); if (rtb_y_gtq < 0.0F) { - rtb_DataTypeConversion1_d = -rtb_y_gtq; + rtb_DataTypeConversion8 = -rtb_y_gtq; } else { - rtb_DataTypeConversion1_d = rtb_y_gtq; + rtb_DataTypeConversion8 = rtb_y_gtq; } - rtb_Compare_du = ((rtb_Compare_du && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_e && rtb_NOT_b && - (rtb_DataTypeConversion1_d < FmgcComputer_P.CompareToConstant2_const_h))); + rtb_Compare_du = ((rtb_Compare_du && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && rtb_NOT_b && + (rtb_DataTypeConversion8 < FmgcComputer_P.CompareToConstant2_const_h))); FmgcComputer_MATLABFunction_a(rtb_Compare_du, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_o, - FmgcComputer_P.ConfirmNode_timeDelay_mu, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_db); + FmgcComputer_P.ConfirmNode_timeDelay_mu, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_dba); rtb_y_fd = (rtb_y_fd || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active); FmgcComputer_DWork.Memory_PreviousInput_as = FmgcComputer_P.Logic_table_fi[(((((!rtb_Compare_a5) && (rtb_y_fd || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || @@ -3013,7 +3041,7 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_7, FmgcComputer_P.BitfromLabel_bit_h, &rtb_DataTypeConversion1_e); rtb_NOT_b = FmgcComputer_DWork.Memory_PreviousInput_n0; - rtb_Compare_a5 = (rtb_y_e && raOwnInvalid); + rtb_Compare_a5 = (rtb_y_cq && rtb_NOT1_i); FmgcComputer_DWork.Memory_PreviousInput_n0 = FmgcComputer_P.Logic_table_id[(((static_cast (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_Compare_a5 && FmgcComputer_U.in.discrete_inputs.tcas_ta_display)) << 1) + ((!FmgcComputer_U.in.discrete_inputs.tcas_ta_display) || @@ -3048,13 +3076,14 @@ void FmgcComputer::step() FmgcComputer_P.BitfromLabel3_bit_h, &rtb_DataTypeConversion1_e); rtb_Compare_du = (rtb_DataTypeConversion1_e == 0U); rtb_Compare_a5 = !FmgcComputer_DWork.Delay_DSTATE.armed_modes.alt_acq_armed; + rtb_GreaterThan3 = FmgcComputer_DWork.Memory_PreviousInput_h; FmgcComputer_DWork.Memory_PreviousInput_h = FmgcComputer_P.Logic_table_oq[((((std::abs(FmgcComputer_B.u_lyj - - rtb_altCstrOrFcu) >= FmgcComputer_P.CompareToConstant_const_gh) || rtb_Compare_du || rtb_Compare_a5) + ( + rtb_altCstrOrFcu) >= FmgcComputer_P.CompareToConstant_const_g) || rtb_Compare_du || rtb_Compare_a5) + ( static_cast(rtb_NOT_gj) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_h]; - FmgcComputer_DWork.Memory_PreviousInput_cp = FmgcComputer_P.Logic_table_dj[(((static_cast - ((FmgcComputer_P.EnumeratedConstant1_Value_eq == FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode) && - Memory_PreviousInput_k_tmp_tmp_tmp) << 1) + (rtb_Compare_a5 || rtb_Compare_du)) << 1) + - FmgcComputer_DWork.Memory_PreviousInput_cp]; + rtb_NOT_b = ((FmgcComputer_P.EnumeratedConstant1_Value_eq == FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode) && + Memory_PreviousInput_k_tmp_tmp_tmp); + FmgcComputer_DWork.Memory_PreviousInput_cp = FmgcComputer_P.Logic_table_dj[(((static_cast(rtb_NOT_b) << 1) + + (rtb_Compare_a5 || rtb_Compare_du)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_cp]; if (FmgcComputer_DWork.Memory_PreviousInput_h) { rtb_mode = tcas_submode::ALT_ACQ; } else if (FmgcComputer_DWork.Memory_PreviousInput_cp) { @@ -3077,15 +3106,12 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault2_defaultValue_jb, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_kc_logic_chosen_fac_bus_v_ls_kn, FmgcComputer_P.A429ValueOrDefault4_defaultValue_e, &rtb_y_gtq); - rtb_NOT_b = (rtb_y_jq < rtb_y_gtq + FmgcComputer_P.Bias1_Bias_c); - rtb_GreaterThan3_tmp = (FmgcComputer_DWork.Memory_PreviousInput_b3 || FmgcComputer_DWork.Memory_PreviousInput_ev || - FmgcComputer_DWork.Memory_PreviousInput_o); - rtb_GreaterThan3 = rtb_GreaterThan3_tmp; - rtb_Compare_a5 = (rtb_fmgcOppPriority_tmp && FmgcComputer_DWork.Delay_DSTATE_k); - rtb_fmgcOppPriority_tmp = (FmgcComputer_DWork.Memory_PreviousInput_ec || FmgcComputer_DWork.Memory_PreviousInput_ae || - FmgcComputer_DWork.Memory_PreviousInput_mx); - rtb_Compare_a5 = ((rtb_Compare_a5 && rtb_fmgcOppPriority_tmp && (rtb_y_fl < rtb_y_jq)) || (rtb_Compare_a5 && - rtb_NOT_b && rtb_GreaterThan3_tmp)); + rtb_OR2_l_tmp = (FmgcComputer_DWork.Memory_PreviousInput_b3 || FmgcComputer_DWork.Memory_PreviousInput_ev || + FmgcComputer_DWork.Memory_PreviousInput_o); + rtb_y_lh = (FmgcComputer_DWork.Memory_PreviousInput_ec || FmgcComputer_DWork.Memory_PreviousInput_ae || + FmgcComputer_DWork.Memory_PreviousInput_mx); + rtb_Compare_fn = (((rtb_y_lh && (rtb_y_fl < rtb_y_jq)) || ((rtb_y_jq < rtb_y_gtq + FmgcComputer_P.Bias1_Bias_c) && + rtb_OR2_l_tmp)) && rtb_Compare_fn && FmgcComputer_DWork.Delay_DSTATE_k && fdOwnOff); rtb_BusAssignment_ds_logic_ir_computation_data_flight_path_angle_deg.SSM = rtb_irComputationBus_flight_path_angle_deg_SSM; rtb_BusAssignment_ds_logic_ir_computation_data_flight_path_angle_deg.Data = @@ -3094,13 +3120,12 @@ void FmgcComputer::step() rtb_irComputationBus_inertial_vertical_speed_ft_s_SSM; rtb_BusAssignment_ds_logic_ir_computation_data_inertial_vertical_speed_ft_s.Data = rtb_irComputationBus_inertial_vertical_speed_ft_s_Data; - rtb_y_lh = rtb_Compare_a5; FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_fpa_deg, FmgcComputer_P.A429ValueOrDefault1_defaultValue_hd, &rtb_DataTypeConversion2_bh); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ds_logic_ir_computation_data_flight_path_angle_deg, FmgcComputer_P.A429ValueOrDefault3_defaultValue_i, &rtb_y_mw); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_vz_ft_min, - FmgcComputer_P.A429ValueOrDefault_defaultValue_pc, &rtb_y_d); + FmgcComputer_P.A429ValueOrDefault_defaultValue_pc, &rtb_y_g); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ds_logic_ir_computation_data_inertial_vertical_speed_ft_s, FmgcComputer_P.A429ValueOrDefault2_defaultValue_g, &rtb_y_cf); FmgcComputer_MATLABFunction(&rtb_BusAssignment_kc_logic_chosen_fac_bus_v_ls_kn, @@ -3109,32 +3134,34 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault4_defaultValue_b, &rtb_y_fl); FmgcComputer_MATLABFunction(&rtb_BusAssignment_kc_logic_adr_computation_data_airspeed_computed_kn, FmgcComputer_P.A429ValueOrDefault5_defaultValue_f, &rtb_y_jq); - rtb_TmpSignalConversionAtSFunctionInport3_idx_0 = (rtb_AND12 || rtb_GreaterThan3_tmp_0); + rtb_appInop_idx_2 = (rtb_AND12 || Memory_PreviousInput_l_tmp); if (rtb_AND12) { - rtb_DataTypeConversion2_bh = rtb_y_cf - rtb_y_d; + rtb_DataTypeConversion2_bh = rtb_y_cf - rtb_y_g; rtb_Phi_c_deg = 50.0; } else { rtb_DataTypeConversion2_bh = rtb_y_mw - rtb_DataTypeConversion2_bh; rtb_Phi_c_deg = 0.1; } - rtb_Compare_du = (rtb_Logic_a2[0] && rtb_TmpSignalConversionAtSFunctionInport3_idx_0); - rtb_y_c = ((rtb_Compare_du && (rtb_y_jq < rtb_y_gtq + 3.0F) && (rtb_DataTypeConversion2_bh < -rtb_Phi_c_deg)) || - (rtb_Compare_du && (rtb_y_jq > rtb_y_fl - 3.0F) && (rtb_DataTypeConversion2_bh > rtb_Phi_c_deg))); - FmgcComputer_MATLABFunction_m((rtb_y_c || rtb_Compare_a5 || rtb_y_hy || Memory_PreviousInput_k_tmp_tmp_0 || - rtb_OR2_l_tmp_0), FmgcComputer_U.in.time.dt, &rtb_NOT_b, FmgcComputer_P.MTrigNode2_isRisingEdge_p, + rtb_Compare_a5 = (rtb_Logic_a2[0] && rtb_appInop_idx_2); + rtb_y_h = ((rtb_Compare_a5 && (rtb_y_jq < rtb_y_gtq + 3.0F) && (rtb_DataTypeConversion2_bh < -rtb_Phi_c_deg)) || + (rtb_Compare_a5 && (rtb_y_jq > rtb_y_fl - 3.0F) && (rtb_DataTypeConversion2_bh > rtb_Phi_c_deg))); + FmgcComputer_MATLABFunction_m((apCondition && (rtb_y_h || rtb_Compare_fn || rtb_y_hy || rtb_NOT3_tmp || rtb_AND8)), + FmgcComputer_U.in.time.dt, &rtb_NOT_b, FmgcComputer_P.MTrigNode2_isRisingEdge_p, FmgcComputer_P.MTrigNode2_retriggerable_i, FmgcComputer_P.MTrigNode2_triggerDuration_f, &FmgcComputer_DWork.sf_MATLABFunction_hdx); FmgcComputer_MATLABFunction_g(apCondition, FmgcComputer_P.PulseNode_isRisingEdge_fo, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_h0f); - rtb_NOT3_tmp = !rtb_Logic_ac[0]; - rtb_Compare_du = (rtb_Compare_a5 && rtb_NOT3_tmp); - FmgcComputer_MATLABFunction_m((Memory_PreviousInput_k_tmp_tmp_0 || rtb_Compare_du), FmgcComputer_U.in.time.dt, - &rtb_Compare_a5, FmgcComputer_P.MTrigNode_isRisingEdge_jn, FmgcComputer_P.MTrigNode_retriggerable_n, + absVsTarget_tmp = !rtb_Logic_ac[0]; + rtb_Compare_du = (rtb_Compare_a5 && absVsTarget_tmp); + FmgcComputer_MATLABFunction_m((rtb_NOT3_tmp || rtb_Compare_du), FmgcComputer_U.in.time.dt, &rtb_Compare_a5, + FmgcComputer_P.MTrigNode_isRisingEdge_jn, FmgcComputer_P.MTrigNode_retriggerable_n, FmgcComputer_P.MTrigNode_triggerDuration_c, &FmgcComputer_DWork.sf_MATLABFunction_ppo); - FmgcComputer_MATLABFunction_m((rtb_OR2_l_tmp_0 || rtb_Compare_du), FmgcComputer_U.in.time.dt, &rtb_Compare_du, + FmgcComputer_MATLABFunction_m((rtb_AND8 || rtb_Compare_du), FmgcComputer_U.in.time.dt, &rtb_Compare_du, FmgcComputer_P.MTrigNode1_isRisingEdge_g, FmgcComputer_P.MTrigNode1_retriggerable_h, FmgcComputer_P.MTrigNode1_triggerDuration_m, &FmgcComputer_DWork.sf_MATLABFunction_hd1); + rtb_BusAssignment_hz_logic_ra_computation_data_radio_height_ft.SSM = rtb_raComputationData_radio_height_ft_SSM; + rtb_BusAssignment_hz_logic_ra_computation_data_radio_height_ft.Data = rtb_raComputationData_radio_height_ft_Data; rtb_NOT3_tmp_0 = rtb_NOT_b; rtb_y_a0_tmp = rtb_Compare_a5; rtb_AND_e_tmp = rtb_Compare_du; @@ -3143,7 +3170,7 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel2_bit_gy, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_m((rtb_Compare_a5 || rtb_Compare_du || (rtb_DataTypeConversion1_e != 0U)), - FmgcComputer_U.in.time.dt, &rtb_GreaterThan3, FmgcComputer_P.MTrigNode1_isRisingEdge_p, + FmgcComputer_U.in.time.dt, &rtb_NOT_b, FmgcComputer_P.MTrigNode1_isRisingEdge_p, FmgcComputer_P.MTrigNode1_retriggerable_o, FmgcComputer_P.MTrigNode1_triggerDuration_g, &FmgcComputer_DWork.sf_MATLABFunction_dln); FmgcComputer_MATLABFunction_a(FmgcComputer_DWork.Memory_PreviousInput_i1, FmgcComputer_U.in.time.dt, @@ -3153,10 +3180,10 @@ void FmgcComputer::step() FmgcComputer_DWork.Memory_PreviousInput_d || rtb_Logic_b[0] || FmgcComputer_DWork.Memory_PreviousInput_el || FmgcComputer_DWork.Memory_PreviousInput_b); rtb_Compare_a5 = (rtb_Compare_a5 || rtb_Compare_du); - rtb_NOT_b = rtb_OR1_j; - rtb_Compare_du = (rtb_Compare_du || rtb_y_p || ((rtb_raComputationData < FmgcComputer_P.CompareToConstant_const_c) && - rtb_OR1_j)); - rtb_Compare_a5 = (rtb_GreaterThan3 && rtb_Compare_a5 && rtb_Compare_du); + FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_hz_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); + rtb_Compare_du = (rtb_Compare_du || rtb_y_km || ((rtb_y_gtq < FmgcComputer_P.CompareToConstant_const_cn) && + rtb_Compare_mh)); + rtb_Compare_a5 = (rtb_NOT_b && rtb_Compare_a5 && rtb_Compare_du); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel1_bit_pq, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_m((rtb_DataTypeConversion1_e != 0U), FmgcComputer_U.in.time.dt, &rtb_NOT_b, @@ -3175,7 +3202,7 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_5, FmgcComputer_P.BitfromLabel1_bit_aw, &rtb_DataTypeConversion1_e); rtb_Compare_du = ((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l); - rtb_Compare_a5 = rtb_y_e; + rtb_Compare_a5 = rtb_y_cq; FmgcComputer_MATLABFunction_a(rtb_OR_m4, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge_b4, FmgcComputer_P.ConfirmNode1_timeDelay_h, &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_hjm); FmgcComputer_MATLABFunction_g(rtb_GreaterThan3, FmgcComputer_P.PulseNode3_isRisingEdge_ko, &rtb_y_fd, @@ -3185,27 +3212,28 @@ void FmgcComputer::step() FmgcComputer_P.BitfromLabel3_bit_gv, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode2_isRisingEdge_f, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_d5); - rtb_NOT_b = (rtb_NOT_b && rtb_y_hb); + rtb_NOT_b = (rtb_NOT_b && rtb_y_e); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ks_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault3_defaultValue_a, &rtb_y_gtq); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_mh, &rtb_y_jq); - rtb_OR_bg = !FmgcComputer_DWork.Memory_PreviousInput_k; - rtb_GreaterThan3 = (FmgcComputer_U.in.fms_inputs.preset_spd_mach_activate && (rtb_OR_bg || (rtb_y_gtq <= rtb_y_jq))); + rtb_Compare_mh = !FmgcComputer_DWork.Memory_PreviousInput_k; + rtb_GreaterThan3 = (FmgcComputer_U.in.fms_inputs.preset_spd_mach_activate && (rtb_Compare_mh || (rtb_y_gtq <= + rtb_y_jq))); FmgcComputer_MATLABFunction_g((FmgcComputer_U.in.fms_inputs.v_managed_kts == FmgcComputer_P.CompareToConstant1_const_e), FmgcComputer_P.PulseNode4_isRisingEdge_a, &rtb_y_i2, &FmgcComputer_DWork.sf_MATLABFunction_aag); - rtb_y_nlq = rtb_OR_m4; + rtb_y_hh = rtb_OR_m4; rtb_y_ff = !FmgcComputer_DWork.Memory_PreviousInput_i; - rtb_y_oi = (rtb_OR_bg && rtb_y_ff && (!FmgcComputer_DWork.Memory_PreviousInput_nu) && + rtb_y_oi = (rtb_Compare_mh && rtb_y_ff && (!FmgcComputer_DWork.Memory_PreviousInput_nu) && (!FmgcComputer_DWork.Memory_PreviousInput_as) && (!FmgcComputer_DWork.Memory_PreviousInput_d)); - FmgcComputer_MATLABFunction_g(rtb_Logic_ac[0], FmgcComputer_P.PulseNode7_isRisingEdge, &rtb_y_nlq, + FmgcComputer_MATLABFunction_g(rtb_Logic_ac[0], FmgcComputer_P.PulseNode7_isRisingEdge, &rtb_y_hh, &FmgcComputer_DWork.sf_MATLABFunction_itu); - rtb_OR1_j = (rtb_Compare_du || (rtb_y_e && ((FmgcComputer_DWork.Delay_DSTATE_fe && rtb_OR_m4) || - ((FmgcComputer_U.in.fms_inputs.v_managed_kts == FmgcComputer_P.CompareToConstant_const_dy) && rtb_y_fd && rtb_y_oi) + rtb_OR1_j = (rtb_Compare_du || (rtb_y_cq && ((FmgcComputer_DWork.Delay_DSTATE_fe && rtb_OR_m4) || + ((FmgcComputer_U.in.fms_inputs.v_managed_kts == FmgcComputer_P.CompareToConstant_const_d) && rtb_y_fd && rtb_y_oi) || (rtb_appCapability_idx_2 && (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant_Value_ad)) || rtb_NOT_b || rtb_GreaterThan3 || (rtb_y_i2 && rtb_OR_m4 && - rtb_y_oi) || rtb_y_nlq))); + rtb_y_oi) || rtb_y_hh))); FmgcComputer_MATLABFunction_a(rtb_OR1_j, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ch, FmgcComputer_P.ConfirmNode_timeDelay_ht, &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_jcu); FmgcComputer_MATLABFunction_g(rtb_BusAssignment_h_logic_engine_running, FmgcComputer_P.PulseNode6_isRisingEdge_j, @@ -3213,12 +3241,13 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_g(apCondition, FmgcComputer_P.PulseNode5_isRisingEdge_i, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_kzm); FmgcComputer_DWork.Memory_PreviousInput_cu = FmgcComputer_P.Logic_table_kg - [((((FmgcComputer_DWork.Delay_DSTATE.auto_spd_control_active && (!rtb_Compare_du)) || (rtb_y_p && (rtb_Compare_a5 || - rtb_NOT_b))) + (static_cast(rtb_OR1_j) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_cu]; + [((((FmgcComputer_DWork.Delay_DSTATE.auto_spd_control_active && (!rtb_Compare_du)) || (rtb_y_km && (rtb_Compare_a5 + || rtb_NOT_b))) + (static_cast(rtb_OR1_j) << 1)) << 1) + + FmgcComputer_DWork.Memory_PreviousInput_cu]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_5, FmgcComputer_P.BitfromLabel_bit_kq, &rtb_DataTypeConversion1_e); rtb_Compare_du = ((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l); - FmgcComputer_MATLABFunction_g(apCondition, FmgcComputer_P.PulseNode1_isRisingEdge_n, &rtb_y_nlq, + FmgcComputer_MATLABFunction_g(apCondition, FmgcComputer_P.PulseNode1_isRisingEdge_n, &rtb_y_hh, &FmgcComputer_DWork.sf_MATLABFunction_ab); rtb_Compare_a5 = (FmgcComputer_U.in.fms_inputs.v_2_kts != FmgcComputer_P.CompareToConstant_const_e); FmgcComputer_MATLABFunction_g(rtb_BusAssignment_h_logic_engine_running, FmgcComputer_P.PulseNode5_isRisingEdge_b, @@ -3226,9 +3255,9 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_g(rtb_Compare_a5, FmgcComputer_P.PulseNode2_isRisingEdge_iu, &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_ft); rtb_GreaterThan3 = (apCondition && rtb_GreaterThan3); - rtb_OR1_j = ((rtb_y_nlq && rtb_Compare_a5) || (rtb_NOT_b && rtb_Compare_a5 && apCondition) || rtb_GreaterThan3); - rtb_y_ga = (FmgcComputer_DWork.Memory_PreviousInput_i || FmgcComputer_DWork.Memory_PreviousInput_k); - FmgcComputer_MATLABFunction_g(rtb_y_ga, FmgcComputer_P.PulseNode3_isRisingEdge_i, &rtb_y_nlq, + rtb_NOT_b = ((rtb_y_hh && rtb_Compare_a5) || (rtb_NOT_b && rtb_Compare_a5 && apCondition) || rtb_GreaterThan3); + rtb_OR1_j = (FmgcComputer_DWork.Memory_PreviousInput_i || FmgcComputer_DWork.Memory_PreviousInput_k); + FmgcComputer_MATLABFunction_g(rtb_OR1_j, FmgcComputer_P.PulseNode3_isRisingEdge_i, &rtb_y_hh, &FmgcComputer_DWork.sf_MATLABFunction_mrn); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_ie, &rtb_DataTypeConversion1_e); @@ -3237,10 +3266,10 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Memory_PreviousInput_mx || FmgcComputer_DWork.Memory_PreviousInput_o), FmgcComputer_P.PulseNode4_isRisingEdge_n, &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_lr); - rtb_Compare_a5 = ((rtb_y_p && rtb_OR1_j) || (rtb_y_nlq || rtb_y_oi || rtb_GreaterThan3)); + rtb_Compare_a5 = ((rtb_y_km && rtb_NOT_b) || (rtb_y_hh || rtb_y_oi || rtb_GreaterThan3)); rtb_NOT_b = (FmgcComputer_U.in.fms_inputs.v_managed_kts != FmgcComputer_P.CompareToConstant2_const_m); rtb_GreaterThan3 = (FmgcComputer_U.in.fms_inputs.v_2_kts != FmgcComputer_P.CompareToConstant3_const_j); - rtb_Compare_a5 = (rtb_Compare_du || (rtb_y_e && rtb_Compare_a5 && (rtb_NOT_b || rtb_GreaterThan3))); + rtb_Compare_a5 = (rtb_Compare_du || (rtb_y_cq && rtb_Compare_a5 && (rtb_NOT_b || rtb_GreaterThan3))); FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_h2, FmgcComputer_P.ConfirmNode_timeDelay_gz, &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_j3h); FmgcComputer_MATLABFunction_g((FmgcComputer_U.in.fms_inputs.v_managed_kts == @@ -3249,9 +3278,9 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_g((FmgcComputer_U.in.fms_inputs.v_2_kts == FmgcComputer_P.CompareToConstant5_const_h), FmgcComputer_P.PulseNode7_isRisingEdge_c, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_hpe); FmgcComputer_DWork.Memory_PreviousInput_hk = FmgcComputer_P.Logic_table_ds - [((((FmgcComputer_DWork.Delay_DSTATE.manual_spd_control_active && (!rtb_Compare_du)) || (rtb_y_p && (rtb_y_ff && - rtb_OR_bg && rtb_y_j5) && (rtb_GreaterThan3 || rtb_NOT_b))) + (static_cast(rtb_Compare_a5) << 1)) << - 1) + FmgcComputer_DWork.Memory_PreviousInput_hk]; + [((((FmgcComputer_DWork.Delay_DSTATE.manual_spd_control_active && (!rtb_Compare_du)) || (rtb_y_km && (rtb_y_ff && + rtb_Compare_mh && rtb_y_n) && (rtb_GreaterThan3 || rtb_NOT_b))) + (static_cast(rtb_Compare_a5) << + 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_hk]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel_bit_as, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_c2, @@ -3259,7 +3288,7 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE_c = FmgcComputer_P.Logic_table_ap[(((static_cast (((!FmgcComputer_DWork.Delay_DSTATE_c) && rtb_GreaterThan3) || FmgcComputer_U.in.fms_inputs.fms_mach_mode_activate || (FmgcComputer_U.in.fms_inputs.preset_spd_mach_activate && (FmgcComputer_U.in.fms_inputs.preset_mach > - FmgcComputer_P.CompareToConstant1_const_b3))) << 1) + ((rtb_GreaterThan3 && FmgcComputer_DWork.Delay_DSTATE_c) || + FmgcComputer_P.CompareToConstant1_const_b))) << 1) + ((rtb_GreaterThan3 && FmgcComputer_DWork.Delay_DSTATE_c) || FmgcComputer_U.in.fms_inputs.fms_spd_mode_activate || (FmgcComputer_U.in.fms_inputs.preset_spd_mach_activate && (FmgcComputer_U.in.fms_inputs.preset_spd_kts > FmgcComputer_P.CompareToConstant_const_l3)))) << 1) + FmgcComputer_DWork.Memory_PreviousInput_bo]; @@ -3282,10 +3311,10 @@ void FmgcComputer::step() rtb_BusAssignment_dc_logic_chosen_fac_bus_v_max_kn.Data = rtb_Switch_v_max_kn_Data; FmgcComputer_MATLABFunction(&rtb_BusAssignment_dc_logic_adr_computation_data_corrected_average_static_pressure, FmgcComputer_P.A429ValueOrDefault2_defaultValue_b, &rtb_y_gtq); - rtb_y_d = std::pow((std::pow(FmgcComputer_U.in.bus_inputs.fcu_bus.selected_mach.Data * + rtb_y_g = std::pow((std::pow(FmgcComputer_U.in.bus_inputs.fcu_bus.selected_mach.Data * FmgcComputer_U.in.bus_inputs.fcu_bus.selected_mach.Data * 0.2F + 1.0F, 3.5F) - 1.0F) * (rtb_y_gtq / 1013.25F) + 1.0F, 0.285714298F); - if (rtb_y_j5) { + if (rtb_y_n) { FmgcComputer_B.u_l = FmgcComputer_U.in.fms_inputs.v_managed_kts; } @@ -3315,8 +3344,8 @@ void FmgcComputer::step() FmgcComputer_DWork.vMemoGa = rtb_y_cf; } - rtb_OR_bg = !rtb_BusAssignment_h_logic_one_engine_out; - if (rtb_OR_bg) { + rtb_GreaterThan3 = !rtb_BusAssignment_h_logic_one_engine_out; + if (rtb_GreaterThan3) { FmgcComputer_DWork.vMemoEo = rtb_y_cf; } @@ -3351,39 +3380,39 @@ void FmgcComputer::step() if (FmgcComputer_DWork.Memory_PreviousInput_hk) { if (FmgcComputer_DWork.Memory_PreviousInput_d || FmgcComputer_DWork.Memory_PreviousInput_l || (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant_Value_n)) { - rtb_Switch_e[0] = std::fmax(std::fmax(std::fmax(static_cast(rtb_y_gtq), static_cast(rtb_y_jq)), + rtb_Switch_of[0] = std::fmax(std::fmax(std::fmax(static_cast(rtb_y_gtq), static_cast(rtb_y_jq)), static_cast(rtb_y_fl)), FmgcComputer_B.u_l); - rtb_Switch_e[1] = FmgcComputer_B.u_l; - } else if (rtb_y_ga) { - rtb_Switch_e[0] = rtb_Phi_c_deg; - rtb_Switch_e[1] = rtb_Nosewheel_c; + rtb_Switch_of[1] = FmgcComputer_B.u_l; + } else if (rtb_OR1_j) { + rtb_Switch_of[0] = rtb_Phi_c_deg; + rtb_Switch_of[1] = rtb_Nosewheel_c; } else { if ((FmgcComputer_U.in.fms_inputs.requested_des_submode == FmgcComputer_P.EnumeratedConstant1_Value_i) && FmgcComputer_DWork.Memory_PreviousInput_b3 && FmgcComputer_U.in.fms_inputs.show_speed_margins) { - rtb_Switch_e[0] = FmgcComputer_U.in.fms_inputs.v_upper_margin_kts; + rtb_Switch_of[0] = FmgcComputer_U.in.fms_inputs.v_upper_margin_kts; } else { - rtb_Switch_e[0] = FmgcComputer_U.in.fms_inputs.v_managed_kts; + rtb_Switch_of[0] = FmgcComputer_U.in.fms_inputs.v_managed_kts; } - rtb_Switch_e[1] = FmgcComputer_U.in.fms_inputs.v_managed_kts; + rtb_Switch_of[1] = FmgcComputer_U.in.fms_inputs.v_managed_kts; } } else { if (FmgcComputer_DWork.Delay_DSTATE_c) { - rtb_y_jq = std::sqrt(rtb_y_d - 1.0F) * 1479.1F; + rtb_y_jq = std::sqrt(rtb_y_g - 1.0F) * 1479.1F; } else { rtb_y_jq = FmgcComputer_U.in.bus_inputs.fcu_bus.selected_spd_kts.Data; } - rtb_Switch_e[0] = rtb_y_jq; - rtb_Switch_e[1] = rtb_y_jq; + rtb_Switch_of[0] = rtb_y_jq; + rtb_Switch_of[1] = rtb_y_jq; } rtb_Compare_du = (FmgcComputer_DWork.Memory_PreviousInput_cb && (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant_Value_a4) && FmgcComputer_DWork.Delay_DSTATE_c && FmgcComputer_DWork.Delay_DSTATE_k); - rtb_Phi_c_deg = std::abs(rtb_Switch_e[0] - rtb_Max_a); - rtb_OR1_j = (rtb_Phi_c_deg > FmgcComputer_P.CompareToConstant_const_h); - FmgcComputer_MATLABFunction_a(rtb_OR1_j, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge_i, + rtb_Phi_c_deg = std::abs(rtb_Switch_of[0] - rtb_Max_a); + rtb_Compare_mh = (rtb_Phi_c_deg > FmgcComputer_P.CompareToConstant_const_h); + FmgcComputer_MATLABFunction_a(rtb_Compare_mh, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge_i, FmgcComputer_P.ConfirmNode1_timeDelay_df, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_hi); FmgcComputer_MATLABFunction_a((rtb_Phi_c_deg > FmgcComputer_P.CompareToConstant1_const_c), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode2_isRisingEdge_i, FmgcComputer_P.ConfirmNode2_timeDelay_i, &rtb_y_me, @@ -3395,14 +3424,14 @@ void FmgcComputer::step() FmgcComputer_P.BitfromLabel3_bit_mz, &rtb_DataTypeConversion1_e); rtb_Compare_a5 = ((!rtb_Compare_du) || rtb_y_ff || rtb_y_me || (rtb_Max_a > rtb_y_mw + FmgcComputer_P.Bias_Bias) || (rtb_DataTypeConversion1_e != 0U)); - FmgcComputer_MATLABFunction_a((rtb_Compare_du && (!rtb_OR1_j) && (!rtb_Compare_a5)), FmgcComputer_U.in.time.dt, + FmgcComputer_MATLABFunction_a((rtb_Compare_du && (!rtb_Compare_mh) && (!rtb_Compare_a5)), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_dh, FmgcComputer_P.ConfirmNode_timeDelay_mf, &rtb_y_me, &FmgcComputer_DWork.sf_MATLABFunction_nj); absVsTarget = static_cast((((static_cast(rtb_y_me) << 1) + rtb_Compare_a5) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ak); rtb_Logic_hq[0U] = FmgcComputer_P.Logic_table_am[static_cast(absVsTarget)]; rtb_Logic_hq[1U] = FmgcComputer_P.Logic_table_am[static_cast(absVsTarget) + 8U]; - rtb_Compare_a5 = (rtb_TmpSignalConversionAtSFunctionInport3_idx_0 || FmgcComputer_DWork.Memory_PreviousInput_cb || + rtb_Compare_a5 = (rtb_appInop_idx_2 || FmgcComputer_DWork.Memory_PreviousInput_cb || FmgcComputer_DWork.Memory_PreviousInput_ne || FmgcComputer_DWork.Memory_PreviousInput_ec || FmgcComputer_DWork.Memory_PreviousInput_b3 || FmgcComputer_DWork.Memory_PreviousInput_mx || FmgcComputer_DWork.Memory_PreviousInput_o || rtb_Logic_b[0] || @@ -3433,7 +3462,7 @@ void FmgcComputer::step() rtb_active_longitudinal_law = vertical_law::GS; } else if (FmgcComputer_DWork.Memory_PreviousInput_k || FmgcComputer_DWork.Memory_PreviousInput_i) { rtb_active_longitudinal_law = vertical_law::SRS; - } else if (rtb_GreaterThan3_tmp_0) { + } else if (Memory_PreviousInput_l_tmp) { rtb_active_longitudinal_law = vertical_law::FPA; } else if (rtb_AND12 || (rtb_Logic_ac[0] && (rtb_mode == tcas_submode::VS))) { rtb_active_longitudinal_law = vertical_law::VS; @@ -3467,41 +3496,43 @@ void FmgcComputer::step() } } - rtb_OR1_j = (rtb_y_fi || FmgcComputer_DWork.Memory_PreviousInput_el || FmgcComputer_DWork.Memory_PreviousInput_cv || - FmgcComputer_DWork.Memory_PreviousInput_lq || rtb_y_da || rtb_AND9 || - FmgcComputer_DWork.Memory_PreviousInput_ip || FmgcComputer_DWork.Memory_PreviousInput_d); + rtb_Compare_mh = (rtb_y_cj || FmgcComputer_DWork.Memory_PreviousInput_el || + FmgcComputer_DWork.Memory_PreviousInput_cv || FmgcComputer_DWork.Memory_PreviousInput_lq || + rtb_y_da || rtb_AND9 || FmgcComputer_DWork.Memory_PreviousInput_ip || + FmgcComputer_DWork.Memory_PreviousInput_d); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_i, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, &rtb_Compare_du); rtb_Compare_du = ((rtb_DataTypeConversion1_e != 0U) && rtb_Compare_du); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_4, FmgcComputer_P.BitfromLabel1_bit_i5, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_4, &rtb_y_ga); - rtb_Compare_du = ((rtb_Compare_du || ((rtb_DataTypeConversion1_e != 0U) && rtb_y_ga)) && + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_4, &rtb_OR1_j); + rtb_Compare_du = ((rtb_Compare_du || ((rtb_DataTypeConversion1_e != 0U) && rtb_OR1_j)) && FmgcComputer_U.in.discrete_inputs.ap_opp_engaged); - rtb_y_ga = (rtb_Logic_a2[0] && (FmgcComputer_DWork.Memory_PreviousInput_l || + rtb_OR1_j = (rtb_Logic_a2[0] && (FmgcComputer_DWork.Memory_PreviousInput_l || FmgcComputer_DWork.Memory_PreviousInput_d)); rtb_y_i2 = ((!rtb_ap_inop_tmp) && (FmgcComputer_U.in.discrete_inputs.fwc_own_valid || FmgcComputer_U.in.discrete_inputs.fwc_opp_valid) && FmgcComputer_U.in.discrete_inputs.pfd_own_valid && - FmgcComputer_U.in.discrete_inputs.pfd_opp_valid && rtb_BusAssignment_o_logic_both_ils_valid); - rtb_GreaterThan3 = (rtb_y_i2 && (!rtb_ap_inop_tmp_tmp) && rtb_bothRaValid); + FmgcComputer_U.in.discrete_inputs.pfd_opp_valid && rtb_BusAssignment_o_logic_both_ils_valid && + (rtb_raComputationData_radio_height_ft_SSM == static_cast(SignStatusMatrix::NormalOperation))); + rtb_y_me = (rtb_y_i2 && (!rtb_ap_inop_tmp_tmp) && raOppInvalid); rtb_y_ff = (FmgcComputer_U.in.discrete_inputs.fwc_own_valid && FmgcComputer_U.in.discrete_inputs.fwc_opp_valid && FmgcComputer_U.in.discrete_inputs.powersupply_split && FmgcComputer_U.in.discrete_inputs.pfd_own_valid && - FmgcComputer_U.in.discrete_inputs.pfd_opp_valid && rtb_TmpSignalConversionAtSFunctionInport3_idx_1 && - rtb_TmpSignalConversionAtSFunctionInport3_idx_2 && rtb_bothRaValid && + FmgcComputer_U.in.discrete_inputs.pfd_opp_valid && rtb_TmpSignalConversionAtSFunctionInport3_idx_0 && + rtb_TmpSignalConversionAtSFunctionInport3_idx_1 && raOppInvalid && rtb_BusAssignment_o_logic_both_ils_valid && rtb_adrOppInvalid && rtb_adrOwnInvalid && FmgcComputer_U.in.discrete_inputs.bscu_own_valid && FmgcComputer_U.in.discrete_inputs.bscu_opp_valid && rtb_irOwnInvalid); - rtb_appCapability_idx_2 = (FmgcComputer_DWork.pLand3FailOp || (rtb_y_ff && rtb_y_ga && rtb_Compare_du && + rtb_appCapability_idx_2 = (FmgcComputer_DWork.pLand3FailOp || (rtb_y_ff && rtb_OR1_j && rtb_Compare_du && FmgcComputer_DWork.Delay_DSTATE_k)); rtb_NOT_b = !rtb_appCapability_idx_2; - rtb_y_fd = (FmgcComputer_DWork.pLand3FailPass || (rtb_GreaterThan3 && rtb_y_ga && FmgcComputer_DWork.Delay_DSTATE_k && + rtb_y_fd = (FmgcComputer_DWork.pLand3FailPass || (rtb_y_me && rtb_OR1_j && FmgcComputer_DWork.Delay_DSTATE_k && rtb_NOT_b)); - rtb_NOT_b = (rtb_y_i2 && rtb_y_ga && (!rtb_y_fd) && rtb_NOT_b); + rtb_NOT_b = (rtb_y_i2 && rtb_OR1_j && (!rtb_y_fd) && rtb_NOT_b); rtb_y_i2 = !rtb_y_i2; - rtb_GreaterThan3 = !rtb_GreaterThan3; - rtb_y_me = !rtb_y_ff; - if ((rtb_raComputationData < 100.0F) && (rtb_y_ga || rtb_Compare_du)) { + rtb_y_me = !rtb_y_me; + rtb_appInop_idx_2 = !rtb_y_ff; + if ((rtb_raComputationData_radio_height_ft_Data < 100.0F) && (rtb_OR1_j || rtb_Compare_du)) { FmgcComputer_DWork.pLand3FailOp = rtb_appCapability_idx_2; FmgcComputer_DWork.pLand3FailPass = rtb_y_fd; } else { @@ -3534,6 +3565,8 @@ void FmgcComputer::step() rtb_BusAssignment_jm_logic_ir_computation_data_track_angle_magnetic_deg.SSM = rtb_irComputationBus_track_angle_magnetic_deg_SSM; rtb_BusAssignment_jm_logic_ir_computation_data_track_angle_magnetic_deg.Data = rtb_Gain2_f; + rtb_BusAssignment_jm_logic_ra_computation_data_radio_height_ft.SSM = rtb_raComputationData_radio_height_ft_SSM; + rtb_BusAssignment_jm_logic_ra_computation_data_radio_height_ft.Data = rtb_raComputationData_radio_height_ft_Data; rtb_BusAssignment_jm_logic_chosen_fac_bus_estimated_sideslip_deg.SSM = rtb_Switch_estimated_sideslip_deg_SSM; rtb_BusAssignment_jm_logic_chosen_fac_bus_estimated_sideslip_deg.Data = rtb_Switch_estimated_sideslip_deg_Data; rtb_BusAssignment_jm_logic_chosen_fac_bus_v_ls_kn.SSM = rtb_Switch_v_ls_kn_SSM; @@ -3560,6 +3593,8 @@ void FmgcComputer::step() rtb_DataTypeConversion27 = rtb_y_jq; rtb_DataTypeConversion11 = rtb_adrComputationBus_altitude_standard_ft_Data; rtb_DataTypeConversion12 = rtb_adrComputationBus_altitude_corrected_ft_Data; + FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_jm_logic_ra_computation_data_radio_height_ft, &rtb_y_fl); + rtb_DataTypeConversion24 = rtb_y_fl; rtb_DataTypeConversion13 = rtb_irComputationBus_inertial_vertical_speed_ft_s_Data; rtb_DataTypeConversion14 = rtb_irComputationBus_heading_magnetic_deg_Data; rtb_DataTypeConversion15 = rtb_Gain2_f; @@ -3569,25 +3604,25 @@ void FmgcComputer::step() rtb_Gain1 = FmgcComputer_P.Gain1_Gain * rtb_irComputationBus_body_lat_accel_g_Data; rtb_Nosewheel_c = rtb_irComputationBus_body_normal_accel_g_Data; rtb_Gain2 = (rtb_irComputationBus_body_normal_accel_g_Data + FmgcComputer_P.Bias_Bias_p) * FmgcComputer_P.Gain2_Gain; - if (rtb_y_j5) { + if (rtb_y_n) { FmgcComputer_B.u = FmgcComputer_U.in.fms_inputs.fms_loc_distance; } rtb_DataTypeConversion25 = rtb_BusAssignment_f4_logic_ils_computation_data_localizer_deviation_deg.Data; - FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_jm_logic_ils_computation_data_glideslope_deviation_deg, &rtb_y_j5); + FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_jm_logic_ils_computation_data_glideslope_deviation_deg, &rtb_y_n); rtb_DataTypeConversion23 = rtb_Switch_i_glideslope_deviation_deg_Data; FmgcComputer_MATLABFunction(&rtb_BusAssignment_jm_logic_chosen_fac_bus_v_ls_kn, - FmgcComputer_P.A429ValueOrDefault5_defaultValue_p, &rtb_y_fl); - rtb_DataTypeConversion32 = rtb_y_fl; + FmgcComputer_P.A429ValueOrDefault5_defaultValue_p, &rtb_y_gtq); + rtb_DataTypeConversion32 = rtb_y_gtq; FmgcComputer_MATLABFunction(&rtb_BusAssignment_jm_logic_chosen_fac_bus_v_max_kn, - FmgcComputer_P.A429ValueOrDefault6_defaultValue_i, &rtb_y_d); - rtb_DataTypeConversion26 = rtb_y_d; + FmgcComputer_P.A429ValueOrDefault6_defaultValue_i, &rtb_y_g); + rtb_DataTypeConversion26 = rtb_y_g; rtb_Gain3 = FmgcComputer_P.Gain3_Gain * FmgcComputer_U.in.fms_inputs.fms_weight_lbs; rtb_DataTypeConversion21 = static_cast(rtb_active_lateral_law); rtb_DataTypeConversion22 = static_cast(rtb_active_longitudinal_law); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_hdg_deg, - FmgcComputer_P.A429ValueOrDefault3_defaultValue_j, &rtb_y_gtq); - rtb_DataTypeConversion39 = rtb_y_gtq; + FmgcComputer_P.A429ValueOrDefault3_defaultValue_j, &rtb_y_mw); + rtb_DataTypeConversion39 = rtb_y_mw; rtb_Compare_du = (FmgcComputer_DWork.Memory_PreviousInput_el || FmgcComputer_DWork.Memory_PreviousInput_b); FmgcComputer_MATLABFunction(&rtb_BusAssignment_jm_logic_ir_computation_data_track_angle_magnetic_deg, FmgcComputer_P.A429ValueOrDefault8_defaultValue, &rtb_DataTypeConversion2_bh); @@ -3621,25 +3656,25 @@ void FmgcComputer::step() rtb_Switch3 = rtb_y_cf; } - rtb_y_ga = (FmgcComputer_DWork.Memory_PreviousInput_as || FmgcComputer_DWork.Memory_PreviousInput_d); + rtb_OR1_j = (FmgcComputer_DWork.Memory_PreviousInput_as || FmgcComputer_DWork.Memory_PreviousInput_d); LawMDLOBJ1.step(&FmgcComputer_U.in.time.dt, &FmgcComputer_U.in.time.simulation_time, &rtb_DataTypeConversion_cm, &rtb_DataTypeConversion1_d, &rtb_DataTypeConversion8, &rtb_DataTypeConversion2_i, &rtb_DataTypeConversion3, &rtb_DataTypeConversion4, &rtb_DataTypeConversion5, &rtb_DataTypeConversion6, &rtb_DataTypeConversion7, &rtb_DataTypeConversion9, &rtb_DataTypeConversion27, &rtb_DataTypeConversion11, &rtb_DataTypeConversion12, - &rtb_BusAssignment_b_logic_ra_computation_data_ft, &rtb_DataTypeConversion13, - &rtb_DataTypeConversion14, &rtb_DataTypeConversion15, &rtb_DataTypeConversion16, - &rtb_DataTypeConversion20, &rtb_Gain, &rtb_Gain1, &rtb_Gain2, &FmgcComputer_B.u_lyjj, + &rtb_DataTypeConversion24, &rtb_DataTypeConversion13, &rtb_DataTypeConversion14, + &rtb_DataTypeConversion15, &rtb_DataTypeConversion16, &rtb_DataTypeConversion20, &rtb_Gain, + &rtb_Gain1, &rtb_Gain2, &FmgcComputer_B.u_lyjj, &FmgcComputer_U.in.fms_inputs.fms_unrealistic_gs_angle_deg, &FmgcComputer_B.u, - &FmgcComputer_P.Constant_Value_i, &rtb_DataTypeConversion25, &rtb_y_j5, &rtb_DataTypeConversion23, + &FmgcComputer_P.Constant_Value_i, &rtb_DataTypeConversion25, &rtb_y_n, &rtb_DataTypeConversion23, &FmgcComputer_U.in.fms_inputs.xtk_nmi, &FmgcComputer_U.in.fms_inputs.tke_deg, &FmgcComputer_U.in.fms_inputs.phi_c_deg, &FmgcComputer_U.in.fms_inputs.phi_limit_deg, &FmgcComputer_U.in.fms_inputs.alt_profile_tgt_ft, &FmgcComputer_U.in.fms_inputs.vs_target_ft_min, - &rtb_DataTypeConversion32, &rtb_DataTypeConversion26, &rtb_y_p, &FmgcComputer_P.Constant1_Value_io, + &rtb_DataTypeConversion32, &rtb_DataTypeConversion26, &rtb_y_km, &FmgcComputer_P.Constant1_Value_io, &rtb_Gain3, &(&rtb_Logic_a2[0])[0], &rtb_DataTypeConversion21, &rtb_DataTypeConversion22, &rtb_DataTypeConversion39, &rtb_DataTypeConversion10, &rtb_altCstrOrFcu, &rtb_Switch1, &rtb_Switch3, - &(&rtb_Switch_e[0])[0], &(&rtb_Logic_hq[0])[0], &(&rtb_Logic_ac[0])[0], &(&rtb_Logic_b[0])[0], - &rtb_y_ga, &rtb_Phi_loc_c, &rtb_Nosewheel_c, &rtb_Theta_c_deg, &rtb_Phi_c_deg, &rtb_Beta_c_deg, + &(&rtb_Switch_of[0])[0], &(&rtb_Logic_hq[0])[0], &(&rtb_Logic_ac[0])[0], &(&rtb_Logic_b[0])[0], + &rtb_OR1_j, &rtb_Phi_loc_c, &rtb_Nosewheel_c, &rtb_Theta_c_deg, &rtb_Phi_c_deg, &rtb_Beta_c_deg, &rtb_Product_p2, &rtb_Switch1_a, &rtb_Beta_c_deg_e, &rtb_Compare_du, &rtb_H_dot_radio_fpm, &rtb_H_dot_c_fpm, &rtb_delta_Theta_H_dot_deg, &rtb_delta_Theta_bz_deg, &rtb_delta_Theta_bx_deg, &rtb_delta_Theta_beta_c_deg); @@ -3655,46 +3690,48 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault3_defaultValue_k, &rtb_y_jq); FmgcComputer_MATLABFunction_g(rtb_Logic_ac[0], FmgcComputer_P.PulseNode3_isRisingEdge_l4, &rtb_y_oi, &FmgcComputer_DWork.sf_MATLABFunction_g); - absVsTarget = static_cast((((rtb_NOT3_tmp || (rtb_y_ff && ((rtb_DataTypeConversion2_bh < + absVsTarget = static_cast((((absVsTarget_tmp || (rtb_y_ff && ((rtb_DataTypeConversion2_bh < FmgcComputer_P.CompareToConstant_const_j) || (rtb_y_jq < FmgcComputer_P.CompareToConstant1_const_d)))) + ( static_cast(rtb_y_oi) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_j); FmgcComputer_MATLABFunction_i(&rtb_BusAssignment_fo_logic_chosen_fac_bus_discrete_word_5, FmgcComputer_P.BitfromLabel_bit_cb, &rtb_y_jm); FmgcComputer_MATLABFunction_g((FmgcComputer_P.Logic_table_lwo[static_cast(absVsTarget) + 8U] && (rtb_y_jm - != 0U)), FmgcComputer_P.PulseNode3_isRisingEdge_ng, &rtb_y_nlq, &FmgcComputer_DWork.sf_MATLABFunction_k); - FmgcComputer_DWork.Memory_PreviousInput_hu = FmgcComputer_P.Logic_table_lm[(((static_cast(rtb_y_nlq) << 1) - + rtb_y_mp) << 1) + FmgcComputer_DWork.Memory_PreviousInput_hu]; - rtb_BusAssignment_b_logic_ra_computation_data_ft = rtb_Switch1_a; + != 0U)), FmgcComputer_P.PulseNode3_isRisingEdge_ng, &rtb_y_hh, &FmgcComputer_DWork.sf_MATLABFunction_k); + FmgcComputer_DWork.Memory_PreviousInput_hu = FmgcComputer_P.Logic_table_lm[(((static_cast(rtb_y_hh) << 1) + + rtb_y_p) << 1) + FmgcComputer_DWork.Memory_PreviousInput_hu]; + rtb_DataTypeConversion_cm = rtb_Switch1_a; FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault_defaultValue_hw, &rtb_y_jq); - rtb_y_j5 = (rtb_y_jq >= FmgcComputer_P.CompareToConstant_const_hq); - rtb_y_ga = (rtb_y_jq <= FmgcComputer_P.CompareToConstant2_const_di); + rtb_y_n = (rtb_y_jq >= FmgcComputer_P.CompareToConstant_const_hq); + rtb_OR1_j = (rtb_y_jq <= FmgcComputer_P.CompareToConstant2_const_di); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault1_defaultValue_o2, &rtb_y_jq); - rtb_y_ff = (rtb_y_jq >= FmgcComputer_P.CompareToConstant1_const_h4); - rtb_y_nlq = (rtb_y_jq <= FmgcComputer_P.CompareToConstant3_const_d); + rtb_y_ff = (rtb_y_jq >= FmgcComputer_P.CompareToConstant1_const_h); + rtb_y_hh = (rtb_y_jq <= FmgcComputer_P.CompareToConstant3_const_d); FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_flex_temp_deg, &rtb_y_oi); FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_flex_temp_deg, &rtb_y_ai); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault2_defaultValue_k, &rtb_y_jq); - rtb_Compare_d0 = (rtb_y_jq > FmgcComputer_P.CompareToConstant4_const_p); - rtb_Compare_kg = (rtb_y_jq <= FmgcComputer_P.CompareToConstant6_const_h); + rtb_Compare_d2 = (rtb_y_jq > FmgcComputer_P.CompareToConstant4_const_p); + rtb_Compare_bm = (rtb_y_jq <= FmgcComputer_P.CompareToConstant6_const_h); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault3_defaultValue_l, &rtb_y_jq); - rtb_DataTypeConversion_cm = rtb_Product_p2; - rtb_y_nlq = (FmgcComputer_DWork.Delay_DSTATE_k && (FmgcComputer_DWork.Memory_PreviousInput_hu || (rtb_y_j5 && - rtb_y_ga && rtb_y_ff && rtb_y_nlq) || ((!rtb_y_oi) && (!rtb_y_ai) && rtb_BusAssignment_h_logic_one_engine_out && - (rtb_Compare_d0 && rtb_Compare_kg && (rtb_y_jq > FmgcComputer_P.CompareToConstant5_const_av) && (rtb_y_jq <= + rtb_DataTypeConversion1_d = rtb_Product_p2; + rtb_y_hh = (FmgcComputer_DWork.Delay_DSTATE_k && (FmgcComputer_DWork.Memory_PreviousInput_hu || (rtb_y_n && + rtb_OR1_j && rtb_y_ff && rtb_y_hh) || ((!rtb_y_oi) && (!rtb_y_ai) && rtb_BusAssignment_h_logic_one_engine_out && + (rtb_Compare_d2 && rtb_Compare_bm && (rtb_y_jq > FmgcComputer_P.CompareToConstant5_const_av) && (rtb_y_jq <= FmgcComputer_P.CompareToConstant7_const))))); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault4_defaultValue_m, &rtb_y_jq); rtb_Switch1_a = rtb_y_jq; - rtb_y_j5 = (rtb_y_jq < FmgcComputer_P.CompareToConstant8_const); + rtb_y_n = (rtb_y_jq < FmgcComputer_P.CompareToConstant8_const); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault5_defaultValue_fk, &rtb_y_jq); - rtb_y_oi = (rtb_y_nlq && ((rtb_Switch1_a < FmgcComputer_P.CompareToConstant10_const) || (rtb_y_jq < - FmgcComputer_P.CompareToConstant11_const) || (rtb_BusAssignment_h_logic_one_engine_out && (rtb_y_j5 || (rtb_y_jq < + rtb_y_oi = (rtb_y_hh && ((rtb_Switch1_a < FmgcComputer_P.CompareToConstant10_const) || (rtb_y_jq < + FmgcComputer_P.CompareToConstant11_const) || (rtb_BusAssignment_h_logic_one_engine_out && (rtb_y_n || (rtb_y_jq < FmgcComputer_P.CompareToConstant9_const))))); + rtb_BusAssignment_be_logic_ra_computation_data_radio_height_ft.SSM = rtb_raComputationData_radio_height_ft_SSM; + rtb_BusAssignment_be_logic_ra_computation_data_radio_height_ft.Data = rtb_raComputationData_radio_height_ft_Data; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.ats_discrete_word, FmgcComputer_P.BitfromLabel_bit_b2, &rtb_y_jm); FmgcComputer_MATLABFunction_g((((rtb_active_longitudinal_law == vertical_law::SPD_MACH) || @@ -3702,14 +3739,14 @@ void FmgcComputer::step() (FmgcComputer_U.in.fms_inputs.requested_des_submode == fmgc_des_submode::VPATH_THRUST))) && FmgcComputer_DWork.Delay_DSTATE_k), FmgcComputer_P.PulseNode_isRisingEdge_o, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_j); - rtb_y_j5 = !FmgcComputer_DWork.Memory_PreviousInput_hu; - rtb_y_ga = (((rtb_y_jm != 0U) && rtb_OR2_l) || (rtb_y_e && rtb_y_ff && rtb_y_j5)); - FmgcComputer_MATLABFunction_a(rtb_y_ga, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ba, + rtb_y_n = !FmgcComputer_DWork.Memory_PreviousInput_hu; + rtb_OR1_j = (((rtb_y_jm != 0U) && rtb_OR2_l) || (rtb_y_cq && rtb_y_ff && rtb_y_n)); + FmgcComputer_MATLABFunction_a(rtb_OR1_j, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ba, FmgcComputer_P.ConfirmNode_timeDelay_gu, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_ay); rtb_y_ai = (FmgcComputer_DWork.Delay1_DSTATE.alpha_floor_mode_active || FmgcComputer_DWork.Delay1_DSTATE.retard_mode_active); - FmgcComputer_DWork.Memory_PreviousInput_bh = FmgcComputer_P.Logic_table_ac[(((rtb_y_mp || ((rtb_y_ai || - FmgcComputer_DWork.Delay1_DSTATE.speed_mach_mode_active) && (!rtb_y_ff))) + (static_cast(rtb_y_ga) << 1)) + FmgcComputer_DWork.Memory_PreviousInput_bh = FmgcComputer_P.Logic_table_ac[(((rtb_y_p || ((rtb_y_ai || + FmgcComputer_DWork.Delay1_DSTATE.speed_mach_mode_active) && (!rtb_y_ff))) + (static_cast(rtb_OR1_j) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_bh]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.ats_discrete_word, FmgcComputer_P.BitfromLabel_bit_al, &rtb_y_jm); @@ -3721,19 +3758,20 @@ void FmgcComputer::step() vertical_law::VPATH) && ((FmgcComputer_U.in.fms_inputs.requested_des_submode == fmgc_des_submode::VPATH_SPEED) || rtb_Logic_b[0]))) && FmgcComputer_DWork.Delay_DSTATE_k), FmgcComputer_P.PulseNode_isRisingEdge_fz, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_ge); - rtb_OR_m4 = (((rtb_y_jm != 0U) && rtb_OR2_l) || (rtb_y_e && rtb_y_ff && rtb_y_j5)); + rtb_OR_m4 = (((rtb_y_jm != 0U) && rtb_OR2_l) || (rtb_y_cq && rtb_y_ff && rtb_y_n)); FmgcComputer_MATLABFunction_a(rtb_OR_m4, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_k3, FmgcComputer_P.ConfirmNode_timeDelay_ez, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_ig); - FmgcComputer_DWork.Memory_PreviousInput_cm = FmgcComputer_P.Logic_table_ma[(((rtb_y_mp || ((rtb_y_ai || + FmgcComputer_DWork.Memory_PreviousInput_cm = FmgcComputer_P.Logic_table_ma[(((rtb_y_p || ((rtb_y_ai || FmgcComputer_DWork.Delay1_DSTATE.thrust_mode_active) && (!rtb_y_ff))) + (static_cast(rtb_OR_m4) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_cm]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.ats_discrete_word, FmgcComputer_P.BitfromLabel_bit_hy, &rtb_y_jm); - rtb_OR_m4 = (((rtb_y_jm != 0U) && rtb_OR2_l) || (rtb_y_e && FmgcComputer_DWork.Memory_PreviousInput_d && - rtb_Logic_a2[0] && (rtb_raComputationData <= FmgcComputer_P.CompareToConstant_const_e3) && rtb_y_j5)); + FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_be_logic_ra_computation_data_radio_height_ft, &rtb_y_jq); + rtb_OR_m4 = (((rtb_y_jm != 0U) && rtb_OR2_l) || (rtb_y_cq && FmgcComputer_DWork.Memory_PreviousInput_d && + rtb_Logic_a2[0] && (rtb_y_jq <= FmgcComputer_P.CompareToConstant_const_e3) && rtb_y_n)); FmgcComputer_MATLABFunction_a(rtb_OR_m4, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_cs, FmgcComputer_P.ConfirmNode_timeDelay_br, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_kh); - FmgcComputer_DWork.Memory_PreviousInput_ol = FmgcComputer_P.Logic_table_acc[(((rtb_y_mp || + FmgcComputer_DWork.Memory_PreviousInput_ol = FmgcComputer_P.Logic_table_acc[(((rtb_y_p || ((FmgcComputer_DWork.Delay1_DSTATE.alpha_floor_mode_active || FmgcComputer_DWork.Delay1_DSTATE.thrust_mode_active || FmgcComputer_DWork.Delay1_DSTATE.speed_mach_mode_active) && (!rtb_y_ff))) + (static_cast(rtb_OR_m4) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ol]; @@ -3744,18 +3782,18 @@ void FmgcComputer::step() rtb_BusAssignment_i2_logic_chosen_fac_bus_v_max_kn.Data = rtb_Switch_v_max_kn_Data; rtb_BusAssignment_i2_logic_chosen_fac_bus_discrete_word_5.SSM = rtb_Switch_discrete_word_5_SSM; rtb_BusAssignment_i2_logic_chosen_fac_bus_discrete_word_5.Data = rtb_Switch_discrete_word_5_Data; - rtb_OR_m4 = (rtb_GreaterThan3_tmp || rtb_Logic_b[0]); + rtb_OR_m4 = (rtb_OR2_l_tmp || rtb_Logic_b[0]); FmgcComputer_DWork.Memory_PreviousInput_kr = FmgcComputer_P.Logic_table_b3[(((static_cast (((rtb_adrComputationBus_altitude_corrected_ft_Data >= FmgcComputer_U.in.fms_inputs.thrust_reduction_alt_ft) || FmgcComputer_DWork.Memory_PreviousInput_ne || FmgcComputer_DWork.Memory_PreviousInput_cb || rtb_AND12 || - rtb_GreaterThan3_tmp_0) && rtb_OR_bg) << 1) + (rtb_BusAssignment_h_logic_one_engine_out || rtb_y_p || + Memory_PreviousInput_l_tmp) && rtb_GreaterThan3) << 1) + (rtb_BusAssignment_h_logic_one_engine_out || rtb_y_km || ((FmgcComputer_P.EnumeratedConstant_Value_by == FmgcComputer_U.in.fms_inputs.fms_flight_phase) && (rtb_adrComputationBus_altitude_corrected_ft_Data < FmgcComputer_U.in.fms_inputs.thrust_reduction_alt_ft)))) << 1) + FmgcComputer_DWork.Memory_PreviousInput_kr]; FmgcComputer_DWork.Memory_PreviousInput_km = FmgcComputer_P.Logic_table_mj[(((static_cast (((rtb_adrComputationBus_altitude_corrected_ft_Data >= FmgcComputer_U.in.fms_inputs.thrust_reduction_alt_ft) || FmgcComputer_DWork.Memory_PreviousInput_ne || FmgcComputer_DWork.Memory_PreviousInput_cb || rtb_AND12 || - rtb_GreaterThan3_tmp_0) && rtb_BusAssignment_h_logic_one_engine_out) << 1) + (rtb_OR_bg || rtb_y_p || + Memory_PreviousInput_l_tmp) && rtb_BusAssignment_h_logic_one_engine_out) << 1) + (rtb_GreaterThan3 || rtb_y_km || ((FmgcComputer_P.EnumeratedConstant1_Value_e == FmgcComputer_U.in.fms_inputs.fms_flight_phase) && (rtb_adrComputationBus_altitude_corrected_ft_Data < FmgcComputer_U.in.fms_inputs.thrust_reduction_alt_ft)))) << 1) + FmgcComputer_DWork.Memory_PreviousInput_km]; @@ -3763,24 +3801,24 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault1_defaultValue_e, &rtb_DataTypeConversion2_bh); FmgcComputer_MATLABFunction(&rtb_BusAssignment_i2_logic_chosen_fac_bus_v_max_kn, FmgcComputer_P.A429ValueOrDefault4_defaultValue_l, &rtb_y_jq); - rtb_y_e = !rtb_y_nlq; + rtb_y_cq = !rtb_y_hh; rtb_y_nf = athr_fma_message::NONE; - rtb_y_j5 = (FmgcComputer_DWork.Delay_DSTATE_k && rtb_y_j5); - if (rtb_y_j5 && ((FmgcComputer_DWork.Memory_PreviousInput_kr && ((rtb_DataTypeConversion2_bh > rtb_y_jq + + rtb_y_n = (FmgcComputer_DWork.Delay_DSTATE_k && rtb_y_n); + if (rtb_y_n && ((FmgcComputer_DWork.Memory_PreviousInput_kr && ((rtb_DataTypeConversion2_bh > rtb_y_jq + FmgcComputer_P.Bias_Bias_d) || (rtb_BusAssignment_hk_ap_fd_logic_tcas_vs_target <= - FmgcComputer_P.CompareToConstant_const_eq) || rtb_NOT3_tmp || (!rtb_y_e))) || (rtb_Logic_ac[0] && rtb_y_e && - (rtb_BusAssignment_hk_ap_fd_logic_tcas_vs_target <= FmgcComputer_P.CompareToConstant1_const_ik))) && + FmgcComputer_P.CompareToConstant_const_eq) || absVsTarget_tmp || (!rtb_y_cq))) || (rtb_Logic_ac[0] && + rtb_y_cq && (rtb_BusAssignment_hk_ap_fd_logic_tcas_vs_target <= FmgcComputer_P.CompareToConstant1_const_ik))) && (((FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg.Data < 24.0F) && (FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg.Data < 24.0F)) || (FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg.Data > 26.0F) || (FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg.Data > 26.0F))) { rtb_y_nf = athr_fma_message::LVR_CLB; - } else if (rtb_y_j5 && FmgcComputer_DWork.Memory_PreviousInput_km && + } else if (rtb_y_n && FmgcComputer_DWork.Memory_PreviousInput_km && (FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg.Data < 34.0F) && (FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg.Data < 34.0F)) { rtb_y_nf = athr_fma_message::LVR_MCT; - } else if (rtb_y_j5 && rtb_OR_bg && (((FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg.Data > 24.0F) && - (FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg.Data < 26.0F) && + } else if (rtb_y_n && rtb_GreaterThan3 && (((FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg.Data > + 24.0F) && (FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg.Data < 26.0F) && ((FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg.Data < 24.0F) || (FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg.Data > 26.0F))) || ((FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg.Data > 24.0F) && @@ -3794,46 +3832,46 @@ void FmgcComputer::step() FmgcComputer_P.BitfromLabel_bit_am, &rtb_y_jm); rtb_Max_a = std::fmax(FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg.Data, FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg.Data); - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_flex_temp_deg, &rtb_y_j5); - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_flex_temp_deg, &rtb_y_ga); - rtb_OR_bg = (rtb_y_j5 || rtb_y_ga); - rtb_y_jr = athr_fma_mode::NONE; - rtb_y_j5 = (FmgcComputer_DWork.Delay_DSTATE_k && rtb_y_e); - if (rtb_y_j5 && (rtb_Max_a > 44.0F)) { - rtb_y_jr = athr_fma_mode::MAN_TOGA; + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_flex_temp_deg, &rtb_y_n); + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_flex_temp_deg, &rtb_OR1_j); + rtb_GreaterThan3 = (rtb_y_n || rtb_OR1_j); + rtb_y_d = athr_fma_mode::NONE; + rtb_y_n = (FmgcComputer_DWork.Delay_DSTATE_k && rtb_y_cq); + if (rtb_y_n && (rtb_Max_a > 44.0F)) { + rtb_y_d = athr_fma_mode::MAN_TOGA; } else { - rtb_y_ga = (rtb_y_j5 && (rtb_Max_a > 34.0F) && (rtb_Max_a < 36.0F)); - if (rtb_y_ga && rtb_OR_bg) { - rtb_y_jr = athr_fma_mode::MAN_FLEX; - } else if (rtb_y_ga && (!rtb_OR_bg)) { - rtb_y_jr = athr_fma_mode::MAN_MCT; - } else if (rtb_y_j5 && (rtb_Max_a > 24.0F)) { - rtb_y_jr = athr_fma_mode::MAN_THR; + rtb_OR1_j = (rtb_y_n && (rtb_Max_a > 34.0F) && (rtb_Max_a < 36.0F)); + if (rtb_OR1_j && rtb_GreaterThan3) { + rtb_y_d = athr_fma_mode::MAN_FLEX; + } else if (rtb_OR1_j && (!rtb_GreaterThan3)) { + rtb_y_d = athr_fma_mode::MAN_MCT; + } else if (rtb_y_n && (rtb_Max_a > 24.0F)) { + rtb_y_d = athr_fma_mode::MAN_THR; } else { - rtb_y_j5 = (FmgcComputer_DWork.Delay_DSTATE_k && rtb_y_nlq); - rtb_y_ga = (rtb_y_j5 && FmgcComputer_DWork.Memory_PreviousInput_cm); - if (rtb_y_ga && (!FmgcComputer_DWork.Delay_DSTATE_c)) { - rtb_y_jr = athr_fma_mode::SPEED; - } else if (rtb_y_ga && FmgcComputer_DWork.Delay_DSTATE_c) { - rtb_y_jr = athr_fma_mode::MACH; + rtb_y_n = (FmgcComputer_DWork.Delay_DSTATE_k && rtb_y_hh); + rtb_OR1_j = (rtb_y_n && FmgcComputer_DWork.Memory_PreviousInput_cm); + if (rtb_OR1_j && (!FmgcComputer_DWork.Delay_DSTATE_c)) { + rtb_y_d = athr_fma_mode::SPEED; + } else if (rtb_OR1_j && FmgcComputer_DWork.Delay_DSTATE_c) { + rtb_y_d = athr_fma_mode::MACH; } else { - rtb_y_ga = (rtb_y_j5 && FmgcComputer_DWork.Memory_PreviousInput_bh); - rtb_OR_bg = !rtb_OR_m4; - if (rtb_y_ga && (rtb_Max_a > 34.0F) && rtb_OR_bg) { - rtb_y_jr = athr_fma_mode::THR_MCT; - } else if (rtb_y_ga && (rtb_Max_a > 24.0F) && rtb_OR_bg) { - rtb_y_jr = athr_fma_mode::THR_CLB; - } else if (rtb_y_ga && (rtb_Max_a < 25.0F) && rtb_OR_bg) { - rtb_y_jr = athr_fma_mode::THR_LVR; - } else if (rtb_y_j5 && ((FmgcComputer_DWork.Memory_PreviousInput_bh && rtb_OR_m4) || - FmgcComputer_DWork.Memory_PreviousInput_ol)) { - rtb_y_jr = athr_fma_mode::THR_IDLE; + rtb_OR1_j = (rtb_y_n && FmgcComputer_DWork.Memory_PreviousInput_bh); + rtb_GreaterThan3 = !rtb_OR_m4; + if (rtb_OR1_j && (rtb_Max_a > 34.0F) && rtb_GreaterThan3) { + rtb_y_d = athr_fma_mode::THR_MCT; + } else if (rtb_OR1_j && (rtb_Max_a > 24.0F) && rtb_GreaterThan3) { + rtb_y_d = athr_fma_mode::THR_CLB; + } else if (rtb_OR1_j && (rtb_Max_a < 25.0F) && rtb_GreaterThan3) { + rtb_y_d = athr_fma_mode::THR_LVR; + } else if (rtb_y_n && ((FmgcComputer_DWork.Memory_PreviousInput_bh && rtb_OR_m4) || + FmgcComputer_DWork.Memory_PreviousInput_ol)) { + rtb_y_d = athr_fma_mode::THR_IDLE; } else { - rtb_y_j5 = (rtb_y_j5 && FmgcComputer_DWork.Memory_PreviousInput_hu); - if (rtb_y_j5 && (rtb_y_jm != 0U)) { - rtb_y_jr = athr_fma_mode::A_FLOOR; - } else if (rtb_y_j5 && (rtb_y_jm == 0U)) { - rtb_y_jr = athr_fma_mode::TOGA_LK; + rtb_y_n = (rtb_y_n && FmgcComputer_DWork.Memory_PreviousInput_hu); + if (rtb_y_n && (rtb_y_jm != 0U)) { + rtb_y_d = athr_fma_mode::A_FLOOR; + } else if (rtb_y_n && (rtb_y_jm == 0U)) { + rtb_y_d = athr_fma_mode::TOGA_LK; } } } @@ -3861,16 +3899,16 @@ void FmgcComputer::step() rtb_BusAssignment_jc_logic_chosen_fac_bus_v_ls_kn.SSM = rtb_Switch_v_ls_kn_SSM; rtb_BusAssignment_jc_logic_chosen_fac_bus_v_ls_kn.Data = rtb_Switch_v_ls_kn_Data; FmgcComputer_MATLABFunction(&rtb_BusAssignment_i2_logic_adr_computation_data_airspeed_computed_kn, - FmgcComputer_P.A429ValueOrDefault_defaultValue_km, &rtb_y_d); + FmgcComputer_P.A429ValueOrDefault_defaultValue_km, &rtb_y_g); FmgcComputer_MATLABFunction(&rtb_BusAssignment_jc_logic_chosen_fac_bus_v_ls_kn, FmgcComputer_P.A429ValueOrDefault4_defaultValue_hv, &rtb_DataTypeConversion2_bh); FmgcComputer_MATLABFunction(&rtb_BusAssignment_i2_logic_chosen_fac_bus_v_max_kn, FmgcComputer_P.A429ValueOrDefault5_defaultValue_i, &rtb_y_jq); v[0] = rtb_DataTypeConversion2_bh; - v[1] = static_cast(rtb_Switch_e[0]); + v[1] = static_cast(rtb_Switch_of[0]); v[2] = rtb_y_jq; - if (rtb_DataTypeConversion2_bh < static_cast(rtb_Switch_e[0])) { - if (static_cast(rtb_Switch_e[0]) < rtb_y_jq) { + if (rtb_DataTypeConversion2_bh < static_cast(rtb_Switch_of[0])) { + if (static_cast(rtb_Switch_of[0]) < rtb_y_jq) { high_i = 1; } else if (rtb_DataTypeConversion2_bh < rtb_y_jq) { high_i = 2; @@ -3879,31 +3917,31 @@ void FmgcComputer::step() } } else if (rtb_DataTypeConversion2_bh < rtb_y_jq) { high_i = 0; - } else if (static_cast(rtb_Switch_e[0]) < rtb_y_jq) { + } else if (static_cast(rtb_Switch_of[0]) < rtb_y_jq) { high_i = 2; } else { high_i = 1; } - rtb_DataTypeConversion2_bh = v[high_i] - rtb_y_d; + rtb_DataTypeConversion2_bh = v[high_i] - rtb_y_g; FmgcComputer_MATLABFunction(&rtb_BusAssignment_jc_logic_ir_computation_data_pitch_angle_deg, FmgcComputer_P.A429ValueOrDefault11_defaultValue, &rtb_y_jq); - rtb_DataTypeConversion1_d = FmgcComputer_P.Gain1_Gain_a * rtb_y_jq; + rtb_DataTypeConversion8 = FmgcComputer_P.Gain1_Gain_a * rtb_y_jq; FmgcComputer_MATLABFunction(&rtb_BusAssignment_jc_logic_ir_computation_data_inertial_vertical_speed_ft_s, FmgcComputer_P.A429ValueOrDefault10_defaultValue, &rtb_y_jq); - rtb_DataTypeConversion8 = FmgcComputer_P.fpmtoms_Gain * rtb_y_jq; + rtb_DataTypeConversion2_i = FmgcComputer_P.fpmtoms_Gain * rtb_y_jq; FmgcComputer_MATLABFunction(&rtb_BusAssignment_jc_logic_ir_computation_data_ground_speed_kn, FmgcComputer_P.A429ValueOrDefault8_defaultValue_i, &rtb_y_jq); rtb_Switch1_a = rtb_y_jq; - rtb_DataTypeConversion2_i = FmgcComputer_P.kntoms_Gain * rtb_y_jq; + rtb_DataTypeConversion3 = FmgcComputer_P.kntoms_Gain * rtb_y_jq; FmgcComputer_MATLABFunction(&rtb_BusAssignment_jc_logic_ir_computation_data_roll_angle_deg, FmgcComputer_P.A429ValueOrDefault12_defaultValue, &rtb_y_jq); rtb_Product_p2 = FmgcComputer_P.Gain1_Gain_h * rtb_y_jq; - rtb_DataTypeConversion3 = std::cos(rtb_Product_p2); - rtb_DataTypeConversion4 = std::sin(rtb_Product_p2); + rtb_DataTypeConversion4 = std::cos(rtb_Product_p2); + rtb_DataTypeConversion5 = std::sin(rtb_Product_p2); FmgcComputer_MATLABFunction(&rtb_BusAssignment_jc_logic_ir_computation_data_heading_magnetic_deg, FmgcComputer_P.A429ValueOrDefault13_defaultValue, &rtb_y_jq); - rtb_DataTypeConversion5 = FmgcComputer_P.Gain1_Gain_f * rtb_y_jq; + rtb_DataTypeConversion6 = FmgcComputer_P.Gain1_Gain_f * rtb_y_jq; FmgcComputer_MATLABFunction(&rtb_BusAssignment_jc_logic_ir_computation_data_track_angle_magnetic_deg, FmgcComputer_P.A429ValueOrDefault14_defaultValue, &rtb_y_jq); if (rtb_Switch1_a > FmgcComputer_P.Saturation_UpperSat_jq) { @@ -3912,31 +3950,31 @@ void FmgcComputer::step() rtb_Switch1_a = FmgcComputer_P.Saturation_LowerSat_b; } - rtb_DataTypeConversion6 = FmgcComputer_P.ktstomps_Gain * rtb_Switch1_a * FmgcComputer_P._Gain; + rtb_DataTypeConversion7 = FmgcComputer_P.ktstomps_Gain * rtb_Switch1_a * FmgcComputer_P._Gain; if ((!FmgcComputer_DWork.pY_not_empty_b) || (!FmgcComputer_DWork.pU_not_empty_i)) { - FmgcComputer_DWork.pU_i = rtb_DataTypeConversion6; + FmgcComputer_DWork.pU_i = rtb_DataTypeConversion7; FmgcComputer_DWork.pU_not_empty_i = true; - FmgcComputer_DWork.pY_l = rtb_DataTypeConversion6; + FmgcComputer_DWork.pY_l = rtb_DataTypeConversion7; FmgcComputer_DWork.pY_not_empty_b = true; } - rtb_DataTypeConversion7 = FmgcComputer_U.in.time.dt * FmgcComputer_P.WashoutFilter_C1; - rtb_Product_p2 = rtb_DataTypeConversion7 + 2.0; - rtb_Switch1_a = 2.0 / (rtb_DataTypeConversion7 + 2.0); - FmgcComputer_DWork.pY_l = (2.0 - rtb_DataTypeConversion7) / (rtb_DataTypeConversion7 + 2.0) * - FmgcComputer_DWork.pY_l + (rtb_DataTypeConversion6 * rtb_Switch1_a - FmgcComputer_DWork.pU_i * rtb_Switch1_a); - FmgcComputer_DWork.pU_i = rtb_DataTypeConversion6; - if (rtb_DataTypeConversion2_i > FmgcComputer_P.Saturation_UpperSat_j) { - rtb_DataTypeConversion2_i = FmgcComputer_P.Saturation_UpperSat_j; - } else if (rtb_DataTypeConversion2_i < FmgcComputer_P.Saturation_LowerSat_o) { - rtb_DataTypeConversion2_i = FmgcComputer_P.Saturation_LowerSat_o; + rtb_DataTypeConversion9 = FmgcComputer_U.in.time.dt * FmgcComputer_P.WashoutFilter_C1; + rtb_Product_p2 = rtb_DataTypeConversion9 + 2.0; + rtb_Switch1_a = 2.0 / (rtb_DataTypeConversion9 + 2.0); + FmgcComputer_DWork.pY_l = (2.0 - rtb_DataTypeConversion9) / (rtb_DataTypeConversion9 + 2.0) * + FmgcComputer_DWork.pY_l + (rtb_DataTypeConversion7 * rtb_Switch1_a - FmgcComputer_DWork.pU_i * rtb_Switch1_a); + FmgcComputer_DWork.pU_i = rtb_DataTypeConversion7; + if (rtb_DataTypeConversion3 > FmgcComputer_P.Saturation_UpperSat_j) { + rtb_DataTypeConversion3 = FmgcComputer_P.Saturation_UpperSat_j; + } else if (rtb_DataTypeConversion3 < FmgcComputer_P.Saturation_LowerSat_o) { + rtb_DataTypeConversion3 = FmgcComputer_P.Saturation_LowerSat_o; } FmgcComputer_LeadLagFilter(FmgcComputer_DWork.pY_l - FmgcComputer_P.g_Gain * (FmgcComputer_P.Gain1_Gain_d * - (FmgcComputer_P.Gain_Gain_j * ((rtb_DataTypeConversion1_d - FmgcComputer_P.Gain1_Gain_ak * - (FmgcComputer_P.Gain_Gain_b * std::atan(rtb_DataTypeConversion8 / rtb_DataTypeConversion2_i))) * - (FmgcComputer_P.Constant_Value_hx - rtb_DataTypeConversion3) + rtb_DataTypeConversion4 * std::sin - (FmgcComputer_P.Gain1_Gain_p * rtb_y_jq - rtb_DataTypeConversion5)))), FmgcComputer_P.HighPassFilter_C1, + (FmgcComputer_P.Gain_Gain_j * ((rtb_DataTypeConversion8 - FmgcComputer_P.Gain1_Gain_ak * + (FmgcComputer_P.Gain_Gain_b * std::atan(rtb_DataTypeConversion2_i / rtb_DataTypeConversion3))) * + (FmgcComputer_P.Constant_Value_hx - rtb_DataTypeConversion4) + rtb_DataTypeConversion5 * std::sin + (FmgcComputer_P.Gain1_Gain_p * rtb_y_jq - rtb_DataTypeConversion6)))), FmgcComputer_P.HighPassFilter_C1, FmgcComputer_P.HighPassFilter_C2, FmgcComputer_P.HighPassFilter_C3, FmgcComputer_P.HighPassFilter_C4, FmgcComputer_U.in.time.dt, &rtb_Product_p2, &FmgcComputer_DWork.sf_LeadLagFilter); FmgcComputer_MATLABFunction(&rtb_BusAssignment_i2_logic_adr_computation_data_airspeed_computed_kn, @@ -3952,25 +3990,25 @@ void FmgcComputer::step() FmgcComputer_LeadLagFilter(FmgcComputer_P.ktstomps_Gain_m * rtb_Switch1_a, FmgcComputer_P.LowPassFilter_C1, FmgcComputer_P.LowPassFilter_C2, FmgcComputer_P.LowPassFilter_C3, FmgcComputer_P.LowPassFilter_C4, FmgcComputer_U.in.time.dt, &rtb_Switch1_a, &FmgcComputer_DWork.sf_LeadLagFilter_b); - rtb_DataTypeConversion1_d = (rtb_Product_p2 + rtb_Switch1_a) * FmgcComputer_P.mpstokts_Gain * + rtb_DataTypeConversion8 = (rtb_Product_p2 + rtb_Switch1_a) * FmgcComputer_P.mpstokts_Gain * FmgcComputer_P.Gain4_Gain * look1_iflf_binlxpw(rtb_DataTypeConversion2_bh, FmgcComputer_P.ScheduledGain1_BreakpointsForDimension1, FmgcComputer_P.ScheduledGain1_Table, 4U) + rtb_DataTypeConversion2_bh; rtb_Product_p2 = FmgcComputer_DWork.Delay_DSTATE_i; - FmgcComputer_DWork.Delay_DSTATE_i = FmgcComputer_P.DiscreteDerivativeVariableTs_Gain * rtb_DataTypeConversion1_d; - rtb_DataTypeConversion8 = (FmgcComputer_DWork.Delay_DSTATE_i - rtb_Product_p2) / FmgcComputer_U.in.time.dt; + FmgcComputer_DWork.Delay_DSTATE_i = FmgcComputer_P.DiscreteDerivativeVariableTs_Gain * rtb_DataTypeConversion8; + rtb_DataTypeConversion2_i = (FmgcComputer_DWork.Delay_DSTATE_i - rtb_Product_p2) / FmgcComputer_U.in.time.dt; if ((!FmgcComputer_DWork.pY_not_empty_m) || (!FmgcComputer_DWork.pU_not_empty_l)) { - FmgcComputer_DWork.pU = rtb_DataTypeConversion8; + FmgcComputer_DWork.pU = rtb_DataTypeConversion2_i; FmgcComputer_DWork.pU_not_empty_l = true; - FmgcComputer_DWork.pY_n = rtb_DataTypeConversion8; + FmgcComputer_DWork.pY_n = rtb_DataTypeConversion2_i; FmgcComputer_DWork.pY_not_empty_m = true; } - rtb_DataTypeConversion7 = FmgcComputer_U.in.time.dt * FmgcComputer_P.LagFilter_C1_d; - rtb_Switch1_a = rtb_DataTypeConversion7 / (rtb_DataTypeConversion7 + 2.0); - FmgcComputer_DWork.pY_n = (2.0 - rtb_DataTypeConversion7) / (rtb_DataTypeConversion7 + 2.0) * - FmgcComputer_DWork.pY_n + (rtb_DataTypeConversion8 * rtb_Switch1_a + FmgcComputer_DWork.pU * rtb_Switch1_a); - FmgcComputer_DWork.pU = rtb_DataTypeConversion8; + rtb_DataTypeConversion9 = FmgcComputer_U.in.time.dt * FmgcComputer_P.LagFilter_C1_d; + rtb_Switch1_a = rtb_DataTypeConversion9 / (rtb_DataTypeConversion9 + 2.0); + FmgcComputer_DWork.pY_n = (2.0 - rtb_DataTypeConversion9) / (rtb_DataTypeConversion9 + 2.0) * + FmgcComputer_DWork.pY_n + (rtb_DataTypeConversion2_i * rtb_Switch1_a + FmgcComputer_DWork.pU * rtb_Switch1_a); + FmgcComputer_DWork.pU = rtb_DataTypeConversion2_i; FmgcComputer_MATLABFunction(&rtb_BusAssignment_jc_logic_ir_computation_data_body_normal_accel_g, FmgcComputer_P.A429ValueOrDefault3_defaultValue_bv, &rtb_DataTypeConversion2_bh); FmgcComputer_LagFilter(rtb_DataTypeConversion2_bh, FmgcComputer_P.LagFilter1_C1, FmgcComputer_U.in.time.dt, @@ -3989,9 +4027,9 @@ void FmgcComputer::step() FmgcComputer_DWork.pY_not_empty = true; } - rtb_DataTypeConversion7 = FmgcComputer_U.in.time.dt * FmgcComputer_P.WashoutFilter_C1_e; - rtb_Switch1_a = 2.0 / (rtb_DataTypeConversion7 + 2.0); - FmgcComputer_DWork.pY_e = static_cast((2.0 - rtb_DataTypeConversion7) / (rtb_DataTypeConversion7 + 2.0)) * + rtb_DataTypeConversion9 = FmgcComputer_U.in.time.dt * FmgcComputer_P.WashoutFilter_C1_e; + rtb_Switch1_a = 2.0 / (rtb_DataTypeConversion9 + 2.0); + FmgcComputer_DWork.pY_e = static_cast((2.0 - rtb_DataTypeConversion9) / (rtb_DataTypeConversion9 + 2.0)) * FmgcComputer_DWork.pY_e + (rtb_Gain2_f * static_cast(rtb_Switch1_a) - FmgcComputer_DWork.pU_e * static_cast(rtb_Switch1_a)); FmgcComputer_DWork.pU_e = rtb_Gain2_f; @@ -4008,7 +4046,7 @@ void FmgcComputer::step() } else if (FmgcComputer_DWork.Memory_PreviousInput_ol) { rtb_Switch1_a = FmgcComputer_P.RETARD_Value; } else if (FmgcComputer_DWork.Memory_PreviousInput_cm) { - rtb_Switch1_a = ((FmgcComputer_P.Gain_Gain * rtb_DataTypeConversion1_d + FmgcComputer_DWork.pY_n) + + rtb_Switch1_a = ((FmgcComputer_P.Gain_Gain * rtb_DataTypeConversion8 + FmgcComputer_DWork.pY_n) + (FmgcComputer_P.Gain1_Gain_g * rtb_Cos_h + FmgcComputer_P.Gain3_Gain_k * FmgcComputer_DWork.pY_e)) * look1_binlxpw(FmgcComputer_DWork.Delay_DSTATE_l, FmgcComputer_P.ScheduledGain2_BreakpointsForDimension1, FmgcComputer_P.ScheduledGain2_Table, 3U) * look1_binlxpw(FmgcComputer_DWork.pY, @@ -4020,12 +4058,12 @@ void FmgcComputer::step() } } else if (FmgcComputer_DWork.Memory_PreviousInput_bh) { if (rtb_OR_m4) { - rtb_DataTypeConversion1_d = FmgcComputer_P.Constant_Value; + rtb_DataTypeConversion8 = FmgcComputer_P.Constant_Value; } else { - rtb_DataTypeConversion1_d = FmgcComputer_P.Constant1_Value_i; + rtb_DataTypeConversion8 = FmgcComputer_P.Constant1_Value_i; } - rtb_Switch1_a = rtb_DataTypeConversion1_d * look1_iflf_binlxpw(std::fmin + rtb_Switch1_a = rtb_DataTypeConversion8 * look1_iflf_binlxpw(std::fmin (FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_n1_actual_percent.Data, FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_n1_actual_percent.Data), FmgcComputer_P.uDLookupTable_bp01Data, FmgcComputer_P.uDLookupTable_tableData, 6U); @@ -4040,7 +4078,7 @@ void FmgcComputer::step() rtb_Switch1_a = FmgcComputer_P.DiscreteTimeIntegratorVariableTsLimit_Gain * rtb_Switch1_a * FmgcComputer_U.in.time.dt; - FmgcComputer_DWork.icLoad = (rtb_y_mp || rtb_y_e || FmgcComputer_DWork.Memory_PreviousInput_hu || + FmgcComputer_DWork.icLoad = (rtb_y_p || rtb_y_cq || FmgcComputer_DWork.Memory_PreviousInput_hu || FmgcComputer_DWork.icLoad); if (FmgcComputer_DWork.icLoad) { FmgcComputer_DWork.Delay_DSTATE_f = std::fmax @@ -4064,12 +4102,12 @@ void FmgcComputer::step() rtb_Switch1_a = FmgcComputer_DWork.Delay_DSTATE_l; } - rtb_BusAssignment_pw_logic_ils_computation_data_runway_heading_deg.SSM = rtb_Switch_m; + rtb_BusAssignment_pw_logic_ils_computation_data_runway_heading_deg.SSM = rtb_Switch9; rtb_BusAssignment_pw_logic_ils_computation_data_runway_heading_deg.Data = rtb_Switch_i_runway_heading_deg_Data; - rtb_Switch_m = static_cast(FmgcComputer_P.EnumeratedConstant_Value); - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_mach, &rtb_y_mp); - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_spd_kts, &rtb_y_j5); - FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_pw_logic_ils_computation_data_runway_heading_deg, &rtb_y_e); + rtb_Switch9 = static_cast(FmgcComputer_P.EnumeratedConstant_Value); + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_mach, &rtb_y_p); + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_spd_kts, &rtb_y_n); + FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_pw_logic_ils_computation_data_runway_heading_deg, &rtb_y_cq); rtb_VectorConcatenate[0] = FmgcComputer_P.Constant10_Value; rtb_VectorConcatenate[1] = FmgcComputer_P.Constant10_Value; rtb_VectorConcatenate[2] = FmgcComputer_P.Constant10_Value; @@ -4093,7 +4131,7 @@ void FmgcComputer::step() FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.discrete_word_5.Data = rtb_DataTypeConversion2_bh; rtb_VectorConcatenate[0] = FmgcComputer_U.in.discrete_inputs.ap_instinctive_disc; rtb_VectorConcatenate[1] = rtb_Logic_a2[0]; - rtb_VectorConcatenate[2] = rtb_NOT1_i; + rtb_VectorConcatenate[2] = fdOwnOff; rtb_VectorConcatenate[3] = FmgcComputer_DWork.Memory_PreviousInput_d; rtb_VectorConcatenate[4] = FmgcComputer_P.Constant3_Value; rtb_VectorConcatenate[5] = rtb_NOT_b; @@ -4101,20 +4139,20 @@ void FmgcComputer::step() rtb_VectorConcatenate[7] = rtb_appCapability_idx_2; rtb_VectorConcatenate[8] = rtb_ap_inop_tmp; rtb_VectorConcatenate[9] = rtb_y_i2; - rtb_VectorConcatenate[10] = rtb_GreaterThan3; - rtb_VectorConcatenate[11] = rtb_y_me; + rtb_VectorConcatenate[10] = rtb_y_me; + rtb_VectorConcatenate[11] = rtb_appInop_idx_2; rtb_VectorConcatenate[12] = rtb_TmpSignalConversionAtSFunctionInport3_idx_0; rtb_VectorConcatenate[13] = rtb_TmpSignalConversionAtSFunctionInport3_idx_1; rtb_VectorConcatenate[14] = rtb_TmpSignalConversionAtSFunctionInport3_idx_2; - rtb_VectorConcatenate[15] = raOppInvalid; - rtb_VectorConcatenate[16] = rtb_y_lh; + rtb_VectorConcatenate[15] = rtb_BusAssignment_b_logic_ils_tune_inhibit; + rtb_VectorConcatenate[16] = rtb_Compare_fn; rtb_VectorConcatenate[17] = rtb_NOT3_tmp_0; - rtb_VectorConcatenate[18] = rtb_y_c; + rtb_VectorConcatenate[18] = rtb_y_h; FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate, &rtb_DataTypeConversion2_bh); rtb_VectorConcatenate[0] = FmgcComputer_P.Constant4_Value_g; rtb_VectorConcatenate[1] = FmgcComputer_P.Constant4_Value_g; rtb_VectorConcatenate[2] = FmgcComputer_DWork.Delay_DSTATE_k; - rtb_VectorConcatenate[3] = rtb_y_nlq; + rtb_VectorConcatenate[3] = rtb_y_hh; rtb_VectorConcatenate[4] = FmgcComputer_P.Constant4_Value_g; rtb_VectorConcatenate[5] = FmgcComputer_P.Constant4_Value_g; rtb_VectorConcatenate[6] = FmgcComputer_U.in.discrete_inputs.athr_instinctive_disc; @@ -4130,17 +4168,17 @@ void FmgcComputer::step() rtb_VectorConcatenate[16] = FmgcComputer_P.Constant4_Value_g; rtb_VectorConcatenate[17] = FmgcComputer_P.Constant4_Value_g; rtb_VectorConcatenate[18] = FmgcComputer_P.Constant4_Value_g; - FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate, &rtb_y_d); - rtb_VectorConcatenate_bw[0] = (rtb_y_jr == athr_fma_mode::MAN_TOGA); - rtb_VectorConcatenate_bw[1] = ((rtb_y_jr == athr_fma_mode::MAN_MCT) || (rtb_y_jr == athr_fma_mode::THR_MCT)); - rtb_VectorConcatenate_bw[2] = (rtb_y_jr == athr_fma_mode::MAN_FLEX); - rtb_VectorConcatenate_bw[3] = (rtb_y_jr == athr_fma_mode::THR_CLB); - rtb_VectorConcatenate_bw[4] = ((rtb_y_jr == athr_fma_mode::MAN_THR) || (rtb_y_jr == athr_fma_mode::THR_LVR)); - rtb_VectorConcatenate_bw[5] = (rtb_y_jr == athr_fma_mode::THR_IDLE); - rtb_VectorConcatenate_bw[6] = (rtb_y_jr == athr_fma_mode::A_FLOOR); - rtb_VectorConcatenate_bw[7] = (rtb_y_jr == athr_fma_mode::TOGA_LK); - rtb_VectorConcatenate_bw[8] = (rtb_y_jr == athr_fma_mode::SPEED); - rtb_VectorConcatenate_bw[9] = (rtb_y_jr == athr_fma_mode::MACH); + FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate, &rtb_y_g); + rtb_VectorConcatenate_bw[0] = (rtb_y_d == athr_fma_mode::MAN_TOGA); + rtb_VectorConcatenate_bw[1] = ((rtb_y_d == athr_fma_mode::MAN_MCT) || (rtb_y_d == athr_fma_mode::THR_MCT)); + rtb_VectorConcatenate_bw[2] = (rtb_y_d == athr_fma_mode::MAN_FLEX); + rtb_VectorConcatenate_bw[3] = (rtb_y_d == athr_fma_mode::THR_CLB); + rtb_VectorConcatenate_bw[4] = ((rtb_y_d == athr_fma_mode::MAN_THR) || (rtb_y_d == athr_fma_mode::THR_LVR)); + rtb_VectorConcatenate_bw[5] = (rtb_y_d == athr_fma_mode::THR_IDLE); + rtb_VectorConcatenate_bw[6] = (rtb_y_d == athr_fma_mode::A_FLOOR); + rtb_VectorConcatenate_bw[7] = (rtb_y_d == athr_fma_mode::TOGA_LK); + rtb_VectorConcatenate_bw[8] = (rtb_y_d == athr_fma_mode::SPEED); + rtb_VectorConcatenate_bw[9] = (rtb_y_d == athr_fma_mode::MACH); rtb_VectorConcatenate_bw[10] = (rtb_y_nf == athr_fma_message::LVR_ASYM); rtb_VectorConcatenate_bw[11] = (rtb_y_nf == athr_fma_message::LVR_CLB); rtb_VectorConcatenate_bw[12] = (rtb_y_nf == athr_fma_message::LVR_MCT); @@ -4150,8 +4188,8 @@ void FmgcComputer::step() rtb_VectorConcatenate_bw[16] = FmgcComputer_P.Constant5_Value; rtb_VectorConcatenate_bw[17] = FmgcComputer_P.Constant5_Value; rtb_VectorConcatenate_bw[18] = FmgcComputer_P.Constant5_Value; - FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate_bw, &rtb_y_fl); - FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.ats_fma_discrete_word.Data = rtb_y_fl; + FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate_bw, &rtb_y_gtq); + FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.ats_fma_discrete_word.Data = rtb_y_gtq; rtb_VectorConcatenate_bw[0] = FmgcComputer_DWork.Memory_PreviousInput_bw; rtb_VectorConcatenate_bw[1] = rtb_AND1_c0; rtb_VectorConcatenate_bw[2] = FmgcComputer_DWork.Memory_PreviousInput_n; @@ -4171,16 +4209,16 @@ void FmgcComputer::step() rtb_VectorConcatenate_bw[16] = FmgcComputer_P.Constant6_Value; rtb_VectorConcatenate_bw[17] = FmgcComputer_P.Constant6_Value; rtb_VectorConcatenate_bw[18] = FmgcComputer_P.Constant6_Value; - FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate_bw, &rtb_y_fl); - rtb_VectorConcatenate_f[0] = rtb_fmgcOppPriority_tmp; - rtb_VectorConcatenate_f[1] = rtb_GreaterThan3_tmp; + FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate_bw, &rtb_y_gtq); + rtb_VectorConcatenate_f[0] = rtb_y_lh; + rtb_VectorConcatenate_f[1] = rtb_OR2_l_tmp; rtb_VectorConcatenate_f[2] = FmgcComputer_P.Constant7_Value; rtb_VectorConcatenate_f[3] = (FmgcComputer_DWork.Memory_PreviousInput_ae || FmgcComputer_DWork.Memory_PreviousInput_ev); rtb_VectorConcatenate_f[4] = FmgcComputer_DWork.Memory_PreviousInput_k; rtb_VectorConcatenate_f[5] = FmgcComputer_DWork.Memory_PreviousInput_i; rtb_VectorConcatenate_f[6] = rtb_AND12; - rtb_VectorConcatenate_f[7] = rtb_GreaterThan3_tmp_0; + rtb_VectorConcatenate_f[7] = Memory_PreviousInput_l_tmp; rtb_VectorConcatenate_f[8] = (FmgcComputer_DWork.Memory_PreviousInput_ne || FmgcComputer_DWork.Memory_PreviousInput_cb); rtb_VectorConcatenate_f[9] = (FmgcComputer_DWork.Memory_PreviousInput_cb || @@ -4193,13 +4231,13 @@ void FmgcComputer::step() rtb_VectorConcatenate_f[13] = (FmgcComputer_DWork.Memory_PreviousInput_o || FmgcComputer_DWork.Memory_PreviousInput_mx); rtb_VectorConcatenate_f[14] = rtb_y_j; - rtb_VectorConcatenate_f[15] = rtb_Compare_b; + rtb_VectorConcatenate_f[15] = rtb_Compare_gc; rtb_VectorConcatenate_f[16] = ((FmgcComputer_U.in.fms_inputs.preset_mach > FmgcComputer_P.CompareToConstant3_const_p) || (FmgcComputer_U.in.fms_inputs.preset_spd_kts > FmgcComputer_P.CompareToConstant4_const_ny)); rtb_VectorConcatenate_f[17] = FmgcComputer_P.Constant7_Value; rtb_VectorConcatenate_f[18] = FmgcComputer_P.Constant7_Value; FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate_f, &rtb_y_jq); - rtb_VectorConcatenate_f[0] = rtb_y_fi; + rtb_VectorConcatenate_f[0] = rtb_y_cj; rtb_VectorConcatenate_f[1] = FmgcComputer_DWork.Memory_PreviousInput_ip; rtb_VectorConcatenate_f[2] = FmgcComputer_DWork.Memory_PreviousInput_cv; rtb_VectorConcatenate_f[3] = FmgcComputer_DWork.Memory_PreviousInput_lq; @@ -4218,7 +4256,7 @@ void FmgcComputer::step() rtb_VectorConcatenate_f[16] = FmgcComputer_P.Constant8_Value; rtb_VectorConcatenate_f[17] = rtb_AND_e_tmp; rtb_VectorConcatenate_f[18] = FmgcComputer_P.Constant8_Value; - FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate_f, &rtb_y_gtq); + FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate_f, &rtb_y_mw); rtb_VectorConcatenate_f[0] = FmgcComputer_P.Constant9_Value; rtb_VectorConcatenate_f[1] = FmgcComputer_P.Constant9_Value; rtb_VectorConcatenate_f[2] = FmgcComputer_P.Constant9_Value; @@ -4238,10 +4276,10 @@ void FmgcComputer::step() rtb_VectorConcatenate_f[16] = FmgcComputer_P.Constant9_Value; rtb_VectorConcatenate_f[17] = FmgcComputer_P.Constant9_Value; rtb_VectorConcatenate_f[18] = FmgcComputer_P.Constant9_Value; - FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate_f, - &FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.discrete_word_6.Data); + FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate_f, &rtb_y_fl); + FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.discrete_word_6.Data = rtb_y_fl; if (FmgcComputer_U.in.fms_inputs.show_speed_margins) { - rtb_Switch_m = static_cast(FmgcComputer_P.EnumeratedConstant1_Value); + rtb_Switch9 = static_cast(FmgcComputer_P.EnumeratedConstant1_Value); } FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.discrete_word_7.Data = static_cast(rtb_Switch1_a); @@ -4259,7 +4297,7 @@ void FmgcComputer::step() rtb_VectorConcatenate_f[11] = FmgcComputer_P.Constant1_Value_a; rtb_VectorConcatenate_f[12] = FmgcComputer_P.Constant1_Value_a; rtb_VectorConcatenate_f[13] = rtb_NOT3; - rtb_VectorConcatenate_f[14] = rtb_y_g; + rtb_VectorConcatenate_f[14] = rtb_y_dm; rtb_VectorConcatenate_f[15] = FmgcComputer_P.Constant1_Value_a; rtb_VectorConcatenate_f[16] = rtb_NOT_oj; rtb_VectorConcatenate_f[17] = (rtb_BusAssignment_hk_ap_fd_logic_tcas_vs_target > @@ -4269,13 +4307,13 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate_f, &FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.discrete_word_7.Data); FmgcComputer_Y.out.data = FmgcComputer_U.in; - FmgcComputer_Y.out.logic.on_ground = rtb_y_p; - FmgcComputer_Y.out.logic.gnd_eng_stop_flt_5s = rtb_y_hb; + FmgcComputer_Y.out.logic.on_ground = rtb_y_km; + FmgcComputer_Y.out.logic.gnd_eng_stop_flt_5s = rtb_y_e; FmgcComputer_Y.out.logic.one_engine_out = rtb_BusAssignment_h_logic_one_engine_out; FmgcComputer_Y.out.logic.engine_running = rtb_BusAssignment_h_logic_engine_running; FmgcComputer_Y.out.logic.ap_fd_athr_common_condition = fdOppOff; FmgcComputer_Y.out.logic.ap_fd_common_condition = rtb_BusAssignment_gk_logic_ap_fd_common_condition; - FmgcComputer_Y.out.logic.fd_own_engaged = rtb_NOT1_i; + FmgcComputer_Y.out.logic.fd_own_engaged = fdOwnOff; FmgcComputer_Y.out.logic.ap_own_engaged = rtb_Logic_a2[0]; FmgcComputer_Y.out.logic.athr_own_engaged = FmgcComputer_DWork.Delay_DSTATE_k; FmgcComputer_Y.out.logic.ap_inop = rtb_ap_inop_tmp; @@ -4335,9 +4373,10 @@ void FmgcComputer::step() rtb_irComputationBus_pitch_att_rate_deg_s_Data; FmgcComputer_Y.out.logic.ir_computation_data.inertial_vertical_speed_ft_s = rtb_BusAssignment_jc_logic_ir_computation_data_inertial_vertical_speed_ft_s; - FmgcComputer_Y.out.logic.ra_computation_data_ft = rtb_raComputationData; - FmgcComputer_Y.out.logic.dual_ra_failure = rtb_dualRaFailure; - FmgcComputer_Y.out.logic.both_ra_valid = rtb_bothRaValid; + FmgcComputer_Y.out.logic.ra_computation_data.radio_height_ft.SSM = rtb_raComputationData_radio_height_ft_SSM; + FmgcComputer_Y.out.logic.ra_computation_data.radio_height_ft.Data = rtb_raComputationData_radio_height_ft_Data; + FmgcComputer_Y.out.logic.dual_ra_failure = raOwnInvalid; + FmgcComputer_Y.out.logic.both_ra_valid = raOppInvalid; FmgcComputer_Y.out.logic.fac_lg_data_failure = rtb_y_o; FmgcComputer_Y.out.logic.flap_slat_lever_position = rtb_handleIndex; FmgcComputer_Y.out.logic.fac_speeds_failure = rtb_BusAssignment_n_logic_fac_speeds_failure; @@ -4374,10 +4413,10 @@ void FmgcComputer::step() rtb_Switch_i_glideslope_deviation_deg_SSM; FmgcComputer_Y.out.logic.ils_computation_data.glideslope_deviation_deg.Data = rtb_Switch_i_glideslope_deviation_deg_Data; - FmgcComputer_Y.out.logic.ils_tune_inhibit = raOppInvalid; + FmgcComputer_Y.out.logic.ils_tune_inhibit = rtb_BusAssignment_b_logic_ils_tune_inhibit; FmgcComputer_Y.out.logic.rwy_hdg_memo = FmgcComputer_B.u_lyjj; - FmgcComputer_Y.out.logic.tcas_mode_available = raOwnInvalid; - FmgcComputer_Y.out.ap_fd_logic.lateral_modes.rwy_active = rtb_y_fi; + FmgcComputer_Y.out.logic.tcas_mode_available = rtb_NOT1_i; + FmgcComputer_Y.out.ap_fd_logic.lateral_modes.rwy_active = rtb_y_cj; FmgcComputer_Y.out.ap_fd_logic.lateral_modes.nav_active = FmgcComputer_DWork.Memory_PreviousInput_ip; FmgcComputer_Y.out.ap_fd_logic.lateral_modes.loc_cpt_active = FmgcComputer_DWork.Memory_PreviousInput_cv; FmgcComputer_Y.out.ap_fd_logic.lateral_modes.loc_trk_active = FmgcComputer_DWork.Memory_PreviousInput_lq; @@ -4398,10 +4437,10 @@ void FmgcComputer::step() FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.pitch_takeoff_active = FmgcComputer_DWork.Memory_PreviousInput_k; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.pitch_goaround_active = FmgcComputer_DWork.Memory_PreviousInput_i; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.vs_active = rtb_AND12; - FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.fpa_active = rtb_GreaterThan3_tmp_0; + FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.fpa_active = Memory_PreviousInput_l_tmp; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.alt_acq_active = FmgcComputer_DWork.Memory_PreviousInput_ne; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.alt_hold_active = FmgcComputer_DWork.Memory_PreviousInput_cb; - FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.fma_dash_display = rtb_Compare_b; + FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.fma_dash_display = rtb_Compare_gc; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.gs_capt_active = FmgcComputer_DWork.Memory_PreviousInput_nu; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.gs_trk_active = FmgcComputer_DWork.Memory_PreviousInput_as; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.final_des_active = rtb_Logic_b[0]; @@ -4424,41 +4463,41 @@ void FmgcComputer::step() FmgcComputer_Y.out.ap_fd_logic.auto_spd_control_active = FmgcComputer_DWork.Memory_PreviousInput_hk; FmgcComputer_Y.out.ap_fd_logic.manual_spd_control_active = FmgcComputer_DWork.Memory_PreviousInput_cu; FmgcComputer_Y.out.ap_fd_logic.mach_control_active = FmgcComputer_DWork.Delay_DSTATE_c; - FmgcComputer_Y.out.ap_fd_logic.spd_target_kts = rtb_Switch_e[0]; - FmgcComputer_Y.out.ap_fd_logic.pfd_spd_target_kts = rtb_Switch_e[1]; + FmgcComputer_Y.out.ap_fd_logic.spd_target_kts = rtb_Switch_of[0]; + FmgcComputer_Y.out.ap_fd_logic.pfd_spd_target_kts = rtb_Switch_of[1]; FmgcComputer_Y.out.ap_fd_logic.alt_cstr_applicable = rtb_AND_j; FmgcComputer_Y.out.ap_fd_logic.alt_sel_or_cstr = rtb_altCstrOrFcu; FmgcComputer_Y.out.ap_fd_logic.fmgc_opp_mode_sync = rtb_OR2_l; FmgcComputer_Y.out.ap_fd_logic.any_ap_fd_engaged = apCondition; - FmgcComputer_Y.out.ap_fd_logic.any_lateral_mode_engaged = rtb_OR1_j; + FmgcComputer_Y.out.ap_fd_logic.any_lateral_mode_engaged = rtb_Compare_mh; FmgcComputer_Y.out.ap_fd_logic.any_longitudinal_mode_engaged = rtb_Compare_a5; FmgcComputer_Y.out.ap_fd_logic.lateral_mode_reset = rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset; FmgcComputer_Y.out.ap_fd_logic.longitudinal_mode_reset = rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset; FmgcComputer_Y.out.ap_fd_logic.hdg_trk_preset_available = FmgcComputer_DWork.Memory_PreviousInput_bw; FmgcComputer_Y.out.ap_fd_logic.alt_soft_mode_active = rtb_Logic_hq[0]; - FmgcComputer_Y.out.ap_fd_logic.fd_auto_disengage = rtb_y_lh; + FmgcComputer_Y.out.ap_fd_logic.fd_auto_disengage = rtb_Compare_fn; FmgcComputer_Y.out.ap_fd_logic.ap_fd_mode_reversion = rtb_NOT3_tmp_0; - FmgcComputer_Y.out.ap_fd_logic.lateral_mode_reversion = rtb_OR2_l_tmp_0; - FmgcComputer_Y.out.ap_fd_logic.longitudinal_mode_reversion_vs = Memory_PreviousInput_k_tmp_tmp_0; + FmgcComputer_Y.out.ap_fd_logic.lateral_mode_reversion = rtb_AND8; + FmgcComputer_Y.out.ap_fd_logic.longitudinal_mode_reversion_vs = rtb_NOT3_tmp; FmgcComputer_Y.out.ap_fd_logic.longitudinal_mode_reversion_op_clb = rtb_y_hy; FmgcComputer_Y.out.ap_fd_logic.pitch_fd_bars_flashing = rtb_y_a0_tmp; FmgcComputer_Y.out.ap_fd_logic.roll_fd_bars_flashing = rtb_AND_e_tmp; FmgcComputer_Y.out.ap_fd_logic.loc_bc_selection = rtP_fmgc_ap_fd_logic_output_MATLABStruct.loc_bc_selection; - FmgcComputer_Y.out.ap_fd_logic.vs_target_not_held = rtb_y_c; + FmgcComputer_Y.out.ap_fd_logic.vs_target_not_held = rtb_y_h; FmgcComputer_Y.out.ap_fd_logic.tcas_vs_target = rtb_BusAssignment_hk_ap_fd_logic_tcas_vs_target; FmgcComputer_Y.out.ap_fd_logic.tcas_ra_corrective = rtb_NOT_oj; FmgcComputer_Y.out.ap_fd_logic.active_tcas_submode = rtb_mode; FmgcComputer_Y.out.ap_fd_logic.tcas_alt_acq_cond = rtb_NOT_gj; FmgcComputer_Y.out.ap_fd_logic.tcas_alt_hold_cond = Memory_PreviousInput_k_tmp_tmp_tmp; FmgcComputer_Y.out.ap_fd_logic.tcas_ra_inhibited = rtb_NOT3; - FmgcComputer_Y.out.ap_fd_logic.trk_fpa_deselected = rtb_y_g; + FmgcComputer_Y.out.ap_fd_logic.trk_fpa_deselected = rtb_y_dm; FmgcComputer_Y.out.ap_fd_logic.longi_large_box_tcas = rtb_BusAssignment_hk_ap_fd_logic_longi_large_box_tcas; FmgcComputer_Y.out.ap_fd_logic.land_2_capability = rtb_NOT_b; FmgcComputer_Y.out.ap_fd_logic.land_3_fail_passive_capability = rtb_y_fd; FmgcComputer_Y.out.ap_fd_logic.land_3_fail_op_capability = rtb_appCapability_idx_2; FmgcComputer_Y.out.ap_fd_logic.land_2_inop = rtb_y_i2; - FmgcComputer_Y.out.ap_fd_logic.land_3_fail_passive_inop = rtb_GreaterThan3; - FmgcComputer_Y.out.ap_fd_logic.land_3_fail_op_inop = rtb_y_me; + FmgcComputer_Y.out.ap_fd_logic.land_3_fail_passive_inop = rtb_y_me; + FmgcComputer_Y.out.ap_fd_logic.land_3_fail_op_inop = rtb_appInop_idx_2; FmgcComputer_Y.out.ap_fd_logic.land_2_capacity = rtb_TmpSignalConversionAtSFunctionInport3_idx_0; FmgcComputer_Y.out.ap_fd_logic.land_3_fail_passive_capacity = rtb_TmpSignalConversionAtSFunctionInport3_idx_1; FmgcComputer_Y.out.ap_fd_logic.land_3_fail_op_capacity = rtb_TmpSignalConversionAtSFunctionInport3_idx_2; @@ -4467,8 +4506,8 @@ void FmgcComputer::step() FmgcComputer_Y.out.ap_fd_outer_loops.flight_director.Theta_c_deg = rtb_Theta_c_deg; FmgcComputer_Y.out.ap_fd_outer_loops.flight_director.Phi_c_deg = rtb_Phi_c_deg; FmgcComputer_Y.out.ap_fd_outer_loops.flight_director.Beta_c_deg = rtb_Beta_c_deg; - FmgcComputer_Y.out.ap_fd_outer_loops.autopilot.Theta_c_deg = rtb_DataTypeConversion_cm; - FmgcComputer_Y.out.ap_fd_outer_loops.autopilot.Phi_c_deg = rtb_BusAssignment_b_logic_ra_computation_data_ft; + FmgcComputer_Y.out.ap_fd_outer_loops.autopilot.Theta_c_deg = rtb_DataTypeConversion1_d; + FmgcComputer_Y.out.ap_fd_outer_loops.autopilot.Phi_c_deg = rtb_DataTypeConversion_cm; FmgcComputer_Y.out.ap_fd_outer_loops.autopilot.Beta_c_deg = rtb_Beta_c_deg_e; FmgcComputer_Y.out.ap_fd_outer_loops.flare_law.condition_Flare = rtb_Compare_du; FmgcComputer_Y.out.ap_fd_outer_loops.flare_law.H_dot_radio_fpm = rtb_H_dot_radio_fpm; @@ -4477,23 +4516,23 @@ void FmgcComputer::step() FmgcComputer_Y.out.ap_fd_outer_loops.flare_law.delta_Theta_bz_deg = rtb_delta_Theta_bz_deg; FmgcComputer_Y.out.ap_fd_outer_loops.flare_law.delta_Theta_bx_deg = rtb_delta_Theta_bx_deg; FmgcComputer_Y.out.ap_fd_outer_loops.flare_law.delta_Theta_beta_c_deg = rtb_delta_Theta_beta_c_deg; - FmgcComputer_Y.out.athr.athr_active = rtb_y_nlq; + FmgcComputer_Y.out.athr.athr_active = rtb_y_hh; FmgcComputer_Y.out.athr.athr_limited = rtb_y_oi; FmgcComputer_Y.out.athr.alpha_floor_mode_active = FmgcComputer_DWork.Memory_PreviousInput_hu; FmgcComputer_Y.out.athr.thrust_mode_active = FmgcComputer_DWork.Memory_PreviousInput_bh; FmgcComputer_Y.out.athr.thrust_target_idle = rtb_OR_m4; FmgcComputer_Y.out.athr.speed_mach_mode_active = FmgcComputer_DWork.Memory_PreviousInput_cm; FmgcComputer_Y.out.athr.retard_mode_active = FmgcComputer_DWork.Memory_PreviousInput_ol; - FmgcComputer_Y.out.athr.fma_mode = rtb_y_jr; + FmgcComputer_Y.out.athr.fma_mode = rtb_y_d; FmgcComputer_Y.out.athr.fma_message = rtb_y_nf; FmgcComputer_Y.out.athr.n1_c_percent = rtb_Switch1_a; FmgcComputer_Y.out.discrete_outputs.athr_own_engaged = FmgcComputer_DWork.Delay_DSTATE_k; - FmgcComputer_Y.out.discrete_outputs.fd_own_engaged = rtb_NOT1_i; + FmgcComputer_Y.out.discrete_outputs.fd_own_engaged = fdOwnOff; FmgcComputer_Y.out.discrete_outputs.ap_own_engaged = rtb_Logic_a2[0]; FmgcComputer_Y.out.discrete_outputs.fcu_own_fail = FmgcComputer_P.Constant_Value_m5; FmgcComputer_Y.out.discrete_outputs.fmgc_healthy = FmgcComputer_P.Constant1_Value_i5; - FmgcComputer_Y.out.discrete_outputs.ils_test_inhibit = raOppInvalid; - if ((!rtb_y_mp) && (!rtb_y_j5) && (!FmgcComputer_DWork.Memory_PreviousInput_hk)) { + FmgcComputer_Y.out.discrete_outputs.ils_test_inhibit = rtb_BusAssignment_b_logic_ils_tune_inhibit; + if ((!rtb_y_p) && (!rtb_y_n) && (!FmgcComputer_DWork.Memory_PreviousInput_hk)) { FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.pfd_sel_spd_kts.SSM = static_cast (FmgcComputer_P.EnumeratedConstant_Value); } else { @@ -4501,8 +4540,8 @@ void FmgcComputer::step() (FmgcComputer_P.EnumeratedConstant1_Value); } - FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.pfd_sel_spd_kts.Data = static_cast(rtb_Switch_e[1]); - if (rtb_y_e || raOppInvalid) { + FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.pfd_sel_spd_kts.Data = static_cast(rtb_Switch_of[1]); + if (rtb_y_cq || rtb_BusAssignment_b_logic_ils_tune_inhibit) { FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.runway_hdg_memorized_deg.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); } else { @@ -4532,8 +4571,8 @@ void FmgcComputer::step() FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.preset_speed_from_mcdu_kts.Data = static_cast (FmgcComputer_U.in.fms_inputs.preset_spd_kts); - rtb_y_j5 = !FmgcComputer_DWork.Memory_PreviousInput_m; - if (rtb_OR1_j && (!FmgcComputer_DWork.Memory_PreviousInput_c) && rtb_y_j5) { + rtb_y_n = !FmgcComputer_DWork.Memory_PreviousInput_m; + if (rtb_Compare_mh && (!FmgcComputer_DWork.Memory_PreviousInput_c) && rtb_y_n) { FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.roll_fd_command.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); } else { @@ -4542,7 +4581,7 @@ void FmgcComputer::step() } FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.roll_fd_command.Data = static_cast(rtb_Phi_c_deg); - if (rtb_Compare_a5 && rtb_y_j5) { + if (rtb_Compare_a5 && rtb_y_n) { FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.pitch_fd_command.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); } else { @@ -4581,7 +4620,7 @@ void FmgcComputer::step() FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.mach.Data = rtb_adrComputationBus_mach_Data; FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.cas_kts = rtb_BusAssignment_i2_logic_adr_computation_data_airspeed_computed_kn; - if (FmgcComputer_U.in.fms_inputs.flex_temp_deg_c != FmgcComputer_P.CompareToConstant_const_ce) { + if (FmgcComputer_U.in.fms_inputs.flex_temp_deg_c != FmgcComputer_P.CompareToConstant_const_c) { FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.flx_to_temp_deg_c.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); } else { @@ -4593,37 +4632,37 @@ void FmgcComputer::step() (FmgcComputer_U.in.fms_inputs.flex_temp_deg_c); FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.ats_discrete_word.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); - FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.ats_discrete_word.Data = rtb_y_d; + FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.ats_discrete_word.Data = rtb_y_g; FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.ats_fma_discrete_word.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.discrete_word_3.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); - FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.discrete_word_3.Data = rtb_y_fl; + FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.discrete_word_3.Data = rtb_y_gtq; FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.discrete_word_1.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.discrete_word_1.Data = rtb_y_jq; FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.discrete_word_2.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); - FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.discrete_word_2.Data = rtb_y_gtq; + FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.discrete_word_2.Data = rtb_y_mw; FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.discrete_word_6.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.synchro_spd_mach_value.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.synchro_spd_mach_value.Data = FmgcComputer_P.Constant26_Value; - FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.low_target_speed_margin_kts.SSM = rtb_Switch_m; + FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.low_target_speed_margin_kts.SSM = rtb_Switch9; FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.low_target_speed_margin_kts.Data = static_cast (FmgcComputer_U.in.fms_inputs.v_lower_margin_kts); - FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.high_target_speed_margin_kts.SSM = rtb_Switch_m; + FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.high_target_speed_margin_kts.SSM = rtb_Switch9; FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.high_target_speed_margin_kts.Data = static_cast (FmgcComputer_U.in.fms_inputs.v_upper_margin_kts); FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.delta_p_ail_voted_cmd_deg.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.delta_p_ail_voted_cmd_deg.Data = static_cast - (rtb_BusAssignment_b_logic_ra_computation_data_ft); + (rtb_DataTypeConversion_cm); FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.delta_p_splr_voted_cmd_deg.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.delta_p_splr_voted_cmd_deg.Data = static_cast - (rtb_BusAssignment_b_logic_ra_computation_data_ft); + (rtb_DataTypeConversion_cm); FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.delta_r_voted_cmd_deg.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.delta_r_voted_cmd_deg.Data = static_cast(rtb_Beta_c_deg_e); @@ -4633,7 +4672,7 @@ void FmgcComputer::step() FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.delta_q_voted_cmd_deg.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.delta_q_voted_cmd_deg.Data = static_cast - (rtb_DataTypeConversion_cm); + (rtb_DataTypeConversion1_d); FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.track_deg = rtb_BusAssignment_jc_logic_ir_computation_data_track_angle_magnetic_deg; FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.heading_deg = @@ -4659,41 +4698,33 @@ void FmgcComputer::step() (FmgcComputer_P.EnumeratedConstant1_Value_d); FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.fm_cg_percent.Data = static_cast (FmgcComputer_U.in.fms_inputs.fms_cg_percent); - if (rtb_dualRaFailure) { - FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.fg_radio_height_ft.SSM = static_cast - (FmgcComputer_P.EnumeratedConstant_Value_i); - } else { - FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.fg_radio_height_ft.SSM = static_cast - (FmgcComputer_P.EnumeratedConstant1_Value_d); - } - - FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.fg_radio_height_ft.Data = rtb_raComputationData; + FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.fg_radio_height_ft.SSM = rtb_raComputationData_radio_height_ft_SSM; + FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.fg_radio_height_ft.Data = rtb_raComputationData_radio_height_ft_Data; FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.discrete_word_4.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.discrete_word_4.Data = rtb_DataTypeConversion2_bh; FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.ats_discrete_word.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); - FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.ats_discrete_word.Data = rtb_y_d; + FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.ats_discrete_word.Data = rtb_y_g; FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.discrete_word_3.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); - FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.discrete_word_3.Data = rtb_y_fl; + FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.discrete_word_3.Data = rtb_y_gtq; FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.discrete_word_1.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.discrete_word_1.Data = rtb_y_jq; FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.discrete_word_2.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); - FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.discrete_word_2.Data = rtb_y_gtq; + FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.discrete_word_2.Data = rtb_y_mw; FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.approach_spd_target_kn.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value_d); FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.approach_spd_target_kn.Data = FmgcComputer_P.Constant11_Value; FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.delta_p_ail_cmd_deg.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); - FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.delta_p_ail_cmd_deg.Data = static_cast - (rtb_BusAssignment_b_logic_ra_computation_data_ft); + FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.delta_p_ail_cmd_deg.Data = static_cast(rtb_DataTypeConversion_cm); FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.delta_p_splr_cmd_deg.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.delta_p_splr_cmd_deg.Data = static_cast - (rtb_BusAssignment_b_logic_ra_computation_data_ft); + (rtb_DataTypeConversion_cm); FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.delta_r_cmd_deg.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.delta_r_cmd_deg.Data = static_cast(rtb_Beta_c_deg_e); @@ -4702,14 +4733,14 @@ void FmgcComputer::step() FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.delta_nose_wheel_cmd_deg.Data = static_cast(rtb_Nosewheel_c); FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.delta_q_cmd_deg.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); - FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.delta_q_cmd_deg.Data = static_cast(rtb_DataTypeConversion_cm); + FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.delta_q_cmd_deg.Data = static_cast(rtb_DataTypeConversion1_d); FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.n1_left_percent.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value_d); FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.n1_left_percent.Data = FmgcComputer_P.Constant2_Value_n; FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.n1_right_percent.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value_d); FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.n1_right_percent.Data = FmgcComputer_P.Constant2_Value_n; - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_active = rtb_y_fi; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_active = rtb_y_cj; FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active = FmgcComputer_DWork.Memory_PreviousInput_ip; FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active = FmgcComputer_DWork.Memory_PreviousInput_cv; FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active = FmgcComputer_DWork.Memory_PreviousInput_lq; @@ -4730,10 +4761,10 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active = FmgcComputer_DWork.Memory_PreviousInput_k; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active = FmgcComputer_DWork.Memory_PreviousInput_i; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.vs_active = rtb_AND12; - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fpa_active = rtb_GreaterThan3_tmp_0; + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fpa_active = Memory_PreviousInput_l_tmp; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active = FmgcComputer_DWork.Memory_PreviousInput_ne; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_hold_active = FmgcComputer_DWork.Memory_PreviousInput_cb; - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fma_dash_display = rtb_Compare_b; + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fma_dash_display = rtb_Compare_gc; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active = FmgcComputer_DWork.Memory_PreviousInput_nu; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active = FmgcComputer_DWork.Memory_PreviousInput_as; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active = rtb_Logic_b[0]; @@ -4756,40 +4787,40 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.auto_spd_control_active = FmgcComputer_DWork.Memory_PreviousInput_hk; FmgcComputer_DWork.Delay_DSTATE.manual_spd_control_active = FmgcComputer_DWork.Memory_PreviousInput_cu; FmgcComputer_DWork.Delay_DSTATE.mach_control_active = FmgcComputer_DWork.Delay_DSTATE_c; - FmgcComputer_DWork.Delay_DSTATE.spd_target_kts = rtb_Switch_e[0]; - FmgcComputer_DWork.Delay_DSTATE.pfd_spd_target_kts = rtb_Switch_e[1]; + FmgcComputer_DWork.Delay_DSTATE.spd_target_kts = rtb_Switch_of[0]; + FmgcComputer_DWork.Delay_DSTATE.pfd_spd_target_kts = rtb_Switch_of[1]; FmgcComputer_DWork.Delay_DSTATE.alt_cstr_applicable = rtb_AND_j; FmgcComputer_DWork.Delay_DSTATE.alt_sel_or_cstr = rtb_altCstrOrFcu; FmgcComputer_DWork.Delay_DSTATE.fmgc_opp_mode_sync = rtb_OR2_l; FmgcComputer_DWork.Delay_DSTATE.any_ap_fd_engaged = apCondition; - FmgcComputer_DWork.Delay_DSTATE.any_lateral_mode_engaged = rtb_OR1_j; + FmgcComputer_DWork.Delay_DSTATE.any_lateral_mode_engaged = rtb_Compare_mh; FmgcComputer_DWork.Delay_DSTATE.lateral_mode_reset = rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset; FmgcComputer_DWork.Delay_DSTATE.longitudinal_mode_reset = rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset; FmgcComputer_DWork.Delay_DSTATE.hdg_trk_preset_available = FmgcComputer_DWork.Memory_PreviousInput_bw; FmgcComputer_DWork.Delay_DSTATE.alt_soft_mode_active = rtb_Logic_hq[0]; - FmgcComputer_DWork.Delay_DSTATE.fd_auto_disengage = rtb_y_lh; + FmgcComputer_DWork.Delay_DSTATE.fd_auto_disengage = rtb_Compare_fn; FmgcComputer_DWork.Delay_DSTATE.ap_fd_mode_reversion = rtb_NOT3_tmp_0; - FmgcComputer_DWork.Delay_DSTATE.lateral_mode_reversion = rtb_OR2_l_tmp_0; - FmgcComputer_DWork.Delay_DSTATE.longitudinal_mode_reversion_vs = Memory_PreviousInput_k_tmp_tmp_0; + FmgcComputer_DWork.Delay_DSTATE.lateral_mode_reversion = rtb_AND8; + FmgcComputer_DWork.Delay_DSTATE.longitudinal_mode_reversion_vs = rtb_NOT3_tmp; FmgcComputer_DWork.Delay_DSTATE.longitudinal_mode_reversion_op_clb = rtb_y_hy; FmgcComputer_DWork.Delay_DSTATE.pitch_fd_bars_flashing = rtb_y_a0_tmp; FmgcComputer_DWork.Delay_DSTATE.roll_fd_bars_flashing = rtb_AND_e_tmp; FmgcComputer_DWork.Delay_DSTATE.loc_bc_selection = rtP_fmgc_ap_fd_logic_output_MATLABStruct.loc_bc_selection; - FmgcComputer_DWork.Delay_DSTATE.vs_target_not_held = rtb_y_c; + FmgcComputer_DWork.Delay_DSTATE.vs_target_not_held = rtb_y_h; FmgcComputer_DWork.Delay_DSTATE.tcas_vs_target = rtb_BusAssignment_hk_ap_fd_logic_tcas_vs_target; FmgcComputer_DWork.Delay_DSTATE.tcas_ra_corrective = rtb_NOT_oj; FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode = rtb_mode; FmgcComputer_DWork.Delay_DSTATE.tcas_alt_acq_cond = rtb_NOT_gj; FmgcComputer_DWork.Delay_DSTATE.tcas_alt_hold_cond = Memory_PreviousInput_k_tmp_tmp_tmp; FmgcComputer_DWork.Delay_DSTATE.tcas_ra_inhibited = rtb_NOT3; - FmgcComputer_DWork.Delay_DSTATE.trk_fpa_deselected = rtb_y_g; + FmgcComputer_DWork.Delay_DSTATE.trk_fpa_deselected = rtb_y_dm; FmgcComputer_DWork.Delay_DSTATE.longi_large_box_tcas = rtb_BusAssignment_hk_ap_fd_logic_longi_large_box_tcas; FmgcComputer_DWork.Delay_DSTATE.land_2_capability = rtb_NOT_b; FmgcComputer_DWork.Delay_DSTATE.land_3_fail_passive_capability = rtb_y_fd; FmgcComputer_DWork.Delay_DSTATE.land_3_fail_op_capability = rtb_appCapability_idx_2; FmgcComputer_DWork.Delay_DSTATE.land_2_inop = rtb_y_i2; - FmgcComputer_DWork.Delay_DSTATE.land_3_fail_passive_inop = rtb_GreaterThan3; - FmgcComputer_DWork.Delay_DSTATE.land_3_fail_op_inop = rtb_y_me; + FmgcComputer_DWork.Delay_DSTATE.land_3_fail_passive_inop = rtb_y_me; + FmgcComputer_DWork.Delay_DSTATE.land_3_fail_op_inop = rtb_appInop_idx_2; FmgcComputer_DWork.Delay_DSTATE.land_2_capacity = rtb_TmpSignalConversionAtSFunctionInport3_idx_0; FmgcComputer_DWork.Delay_DSTATE.land_3_fail_passive_capacity = rtb_TmpSignalConversionAtSFunctionInport3_idx_1; FmgcComputer_DWork.Delay_DSTATE.land_3_fail_op_capacity = rtb_TmpSignalConversionAtSFunctionInport3_idx_2; @@ -4818,14 +4849,14 @@ void FmgcComputer::step() FmgcComputer_DWork.Memory_PreviousInput_bo = FmgcComputer_DWork.Delay_DSTATE_c; FmgcComputer_DWork.Memory_PreviousInput_ak = rtb_Logic_hq[0]; FmgcComputer_DWork.Memory_PreviousInput_j = FmgcComputer_P.Logic_table_lwo[static_cast(absVsTarget)]; - FmgcComputer_DWork.Delay1_DSTATE.athr_active = rtb_y_nlq; + FmgcComputer_DWork.Delay1_DSTATE.athr_active = rtb_y_hh; FmgcComputer_DWork.Delay1_DSTATE.athr_limited = rtb_y_oi; FmgcComputer_DWork.Delay1_DSTATE.alpha_floor_mode_active = FmgcComputer_DWork.Memory_PreviousInput_hu; FmgcComputer_DWork.Delay1_DSTATE.thrust_mode_active = FmgcComputer_DWork.Memory_PreviousInput_bh; FmgcComputer_DWork.Delay1_DSTATE.thrust_target_idle = rtb_OR_m4; FmgcComputer_DWork.Delay1_DSTATE.speed_mach_mode_active = FmgcComputer_DWork.Memory_PreviousInput_cm; FmgcComputer_DWork.Delay1_DSTATE.retard_mode_active = FmgcComputer_DWork.Memory_PreviousInput_ol; - FmgcComputer_DWork.Delay1_DSTATE.fma_mode = rtb_y_jr; + FmgcComputer_DWork.Delay1_DSTATE.fma_mode = rtb_y_d; FmgcComputer_DWork.Delay1_DSTATE.fma_message = rtb_y_nf; FmgcComputer_DWork.Delay1_DSTATE.n1_c_percent = rtb_Switch1_a; FmgcComputer_DWork.icLoad = false; diff --git a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.h b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.h index a7feaf05606..242bde9d4f5 100644 --- a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.h +++ b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.h @@ -188,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; @@ -247,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; @@ -459,11 +459,9 @@ class FmgcComputer final 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; @@ -472,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; @@ -524,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; @@ -646,9 +631,8 @@ class FmgcComputer final SignStatusMatrix EnumeratedConstant_Value; SignStatusMatrix EnumeratedConstant1_Value; SignStatusMatrix EnumeratedConstant1_Value_d; - SignStatusMatrix EnumeratedConstant_Value_i; fmgc_des_submode EnumeratedConstant1_Value_i; - fmgc_flight_phase EnumeratedConstant_Value_i5; + fmgc_flight_phase EnumeratedConstant_Value_i; fmgc_flight_phase EnumeratedConstant_Value_a; fmgc_flight_phase EnumeratedConstant1_Value_dg; fmgc_flight_phase EnumeratedConstant_Value_p; @@ -677,17 +661,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; @@ -1198,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); diff --git a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_data.cpp b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_data.cpp index b842ed20beb..8ff4b19e2fb 100644 --- a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_data.cpp +++ b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_data.cpp @@ -297,8 +297,6 @@ FmgcComputer::Parameters_FmgcComputer_T FmgcComputer::FmgcComputer_P{ 18.0, 20.0, 29.0, - 900.0, - 700.0, 20.0, 36.7, 36.7, @@ -311,20 +309,9 @@ FmgcComputer::Parameters_FmgcComputer_T FmgcComputer::FmgcComputer_P{ 36.7, 33.3, 0.4, - 30.0, - 400.0, - 400.0, - 50.0, - 30.0, - 400.0, 36.7, 36.7, - 100.0, - 30.0, - 100.0, - 400.0, 0.16, - 400.0, 40.0, 60.0, 250.0, @@ -339,7 +326,6 @@ FmgcComputer::Parameters_FmgcComputer_T FmgcComputer::FmgcComputer_P{ 0.133, 0.133, 250.0, - 30.0, 0.0, 0.0, 0.0, @@ -363,7 +349,6 @@ FmgcComputer::Parameters_FmgcComputer_T FmgcComputer::FmgcComputer_P{ 34.0, 24.0, 24.0, - 40.0, 500.0, 500.0, 0.0, @@ -485,7 +470,6 @@ FmgcComputer::Parameters_FmgcComputer_T FmgcComputer::FmgcComputer_P{ SignStatusMatrix::NoComputedData, SignStatusMatrix::NormalOperation, SignStatusMatrix::NormalOperation, - SignStatusMatrix::NoComputedData, fmgc_des_submode::SPEED_THRUST, fmgc_flight_phase::Approach, fmgc_flight_phase::Takeoff, @@ -518,17 +502,32 @@ FmgcComputer::Parameters_FmgcComputer_T FmgcComputer::FmgcComputer_P{ { -100.0F, -20.0F, 0.0F, 10.0F, 100.0F }, { 1.8F, 1.8F, 1.0F, 1.2F, 1.2F }, + 900.0F, + 700.0F, -10.0F, 22.0F, 40.0F, 20.0F, + 30.0F, + 400.0F, + 400.0F, + 50.0F, + 30.0F, + 400.0F, + 100.0F, + 30.0F, + 100.0F, + 400.0F, 250.0F, 40.0F, 0.0F, + 400.0F, 0.0F, 0.0F, + 30.0F, 24.0F, 24.0F, + 40.0F, 0.0F, 0.0F, 0.0F, @@ -2520,7 +2519,13 @@ FmgcComputer::Parameters_FmgcComputer_T FmgcComputer::FmgcComputer_P{ 0.0F } }, - 0.0, + + { + { + 0U, + 0.0F + } + }, false, false, false, @@ -3330,7 +3335,13 @@ FmgcComputer::Parameters_FmgcComputer_T FmgcComputer::FmgcComputer_P{ 0.0F } }, - 0.0, + + { + { + 0U, + 0.0F + } + }, false, false, false, diff --git a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_types.h b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_types.h index a6624521673..7ccc5d94dfc 100644 --- a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_types.h +++ b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_types.h @@ -79,6 +79,49 @@ struct base_arinc_429 #endif +#ifndef DEFINED_TYPEDEF_FOR_base_fmgc_a_bus_ +#define DEFINED_TYPEDEF_FOR_base_fmgc_a_bus_ + +struct base_fmgc_a_bus +{ + base_arinc_429 pfd_sel_spd_kts; + base_arinc_429 runway_hdg_memorized_deg; + base_arinc_429 preset_mach_from_mcdu; + base_arinc_429 preset_speed_from_mcdu_kts; + base_arinc_429 roll_fd_command; + base_arinc_429 pitch_fd_command; + base_arinc_429 yaw_fd_command; + base_arinc_429 discrete_word_5; + base_arinc_429 discrete_word_4; + base_arinc_429 fm_alt_constraint_ft; + base_arinc_429 altitude_ft; + base_arinc_429 mach; + base_arinc_429 cas_kts; + base_arinc_429 flx_to_temp_deg_c; + base_arinc_429 ats_discrete_word; + base_arinc_429 ats_fma_discrete_word; + base_arinc_429 discrete_word_3; + base_arinc_429 discrete_word_1; + base_arinc_429 discrete_word_2; + base_arinc_429 discrete_word_6; + base_arinc_429 synchro_spd_mach_value; + base_arinc_429 low_target_speed_margin_kts; + base_arinc_429 high_target_speed_margin_kts; + base_arinc_429 delta_p_ail_voted_cmd_deg; + base_arinc_429 delta_p_splr_voted_cmd_deg; + base_arinc_429 delta_r_voted_cmd_deg; + base_arinc_429 delta_nosewheel_voted_cmd_deg; + base_arinc_429 delta_q_voted_cmd_deg; + base_arinc_429 track_deg; + base_arinc_429 heading_deg; + base_arinc_429 fpa_deg; + base_arinc_429 n1_command_percent; + base_arinc_429 vertical_speed_ft_min; + base_arinc_429 discrete_word_7; +}; + +#endif + #ifndef DEFINED_TYPEDEF_FOR_base_ils_bus_ #define DEFINED_TYPEDEF_FOR_base_ils_bus_ @@ -92,6 +135,33 @@ struct base_ils_bus #endif +#ifndef DEFINED_TYPEDEF_FOR_base_fmgc_b_bus_ +#define DEFINED_TYPEDEF_FOR_base_fmgc_b_bus_ + +struct base_fmgc_b_bus +{ + base_arinc_429 fac_weight_lbs; + base_arinc_429 fm_weight_lbs; + base_arinc_429 fac_cg_percent; + base_arinc_429 fm_cg_percent; + base_arinc_429 fg_radio_height_ft; + base_arinc_429 discrete_word_4; + base_arinc_429 ats_discrete_word; + base_arinc_429 discrete_word_3; + base_arinc_429 discrete_word_1; + base_arinc_429 discrete_word_2; + base_arinc_429 approach_spd_target_kn; + base_arinc_429 delta_p_ail_cmd_deg; + base_arinc_429 delta_p_splr_cmd_deg; + base_arinc_429 delta_r_cmd_deg; + base_arinc_429 delta_nose_wheel_cmd_deg; + base_arinc_429 delta_q_cmd_deg; + base_arinc_429 n1_left_percent; + base_arinc_429 n1_right_percent; +}; + +#endif + #ifndef DEFINED_TYPEDEF_FOR_base_fmgc_discrete_inputs_ #define DEFINED_TYPEDEF_FOR_base_fmgc_discrete_inputs_ @@ -136,76 +206,6 @@ struct base_fmgc_discrete_inputs #endif -#ifndef DEFINED_TYPEDEF_FOR_base_fmgc_b_bus_ -#define DEFINED_TYPEDEF_FOR_base_fmgc_b_bus_ - -struct base_fmgc_b_bus -{ - base_arinc_429 fac_weight_lbs; - base_arinc_429 fm_weight_lbs; - base_arinc_429 fac_cg_percent; - base_arinc_429 fm_cg_percent; - base_arinc_429 fg_radio_height_ft; - base_arinc_429 discrete_word_4; - base_arinc_429 ats_discrete_word; - base_arinc_429 discrete_word_3; - base_arinc_429 discrete_word_1; - base_arinc_429 discrete_word_2; - base_arinc_429 approach_spd_target_kn; - base_arinc_429 delta_p_ail_cmd_deg; - base_arinc_429 delta_p_splr_cmd_deg; - base_arinc_429 delta_r_cmd_deg; - base_arinc_429 delta_nose_wheel_cmd_deg; - base_arinc_429 delta_q_cmd_deg; - base_arinc_429 n1_left_percent; - base_arinc_429 n1_right_percent; -}; - -#endif - -#ifndef DEFINED_TYPEDEF_FOR_base_fmgc_a_bus_ -#define DEFINED_TYPEDEF_FOR_base_fmgc_a_bus_ - -struct base_fmgc_a_bus -{ - base_arinc_429 pfd_sel_spd_kts; - base_arinc_429 runway_hdg_memorized_deg; - base_arinc_429 preset_mach_from_mcdu; - base_arinc_429 preset_speed_from_mcdu_kts; - base_arinc_429 roll_fd_command; - base_arinc_429 pitch_fd_command; - base_arinc_429 yaw_fd_command; - base_arinc_429 discrete_word_5; - base_arinc_429 discrete_word_4; - base_arinc_429 fm_alt_constraint_ft; - base_arinc_429 altitude_ft; - base_arinc_429 mach; - base_arinc_429 cas_kts; - base_arinc_429 flx_to_temp_deg_c; - base_arinc_429 ats_discrete_word; - base_arinc_429 ats_fma_discrete_word; - base_arinc_429 discrete_word_3; - base_arinc_429 discrete_word_1; - base_arinc_429 discrete_word_2; - base_arinc_429 discrete_word_6; - base_arinc_429 synchro_spd_mach_value; - base_arinc_429 low_target_speed_margin_kts; - base_arinc_429 high_target_speed_margin_kts; - base_arinc_429 delta_p_ail_voted_cmd_deg; - base_arinc_429 delta_p_splr_voted_cmd_deg; - base_arinc_429 delta_r_voted_cmd_deg; - base_arinc_429 delta_nosewheel_voted_cmd_deg; - base_arinc_429 delta_q_voted_cmd_deg; - base_arinc_429 track_deg; - base_arinc_429 heading_deg; - base_arinc_429 fpa_deg; - base_arinc_429 n1_command_percent; - base_arinc_429 vertical_speed_ft_min; - base_arinc_429 discrete_word_7; -}; - -#endif - #ifndef DEFINED_TYPEDEF_FOR_base_time_ #define DEFINED_TYPEDEF_FOR_base_time_ @@ -507,7 +507,7 @@ struct base_fmgc_logic_outputs boolean_T all_ir_valid; base_adr_bus adr_computation_data; base_ir_bus ir_computation_data; - real_T ra_computation_data_ft; + base_ra_bus ra_computation_data; boolean_T dual_ra_failure; boolean_T both_ra_valid; boolean_T fac_lg_data_failure; From ed713aa039f5685ffb15f00a38ccefa1153cc690 Mon Sep 17 00:00:00 2001 From: Lukas Michels Date: Fri, 27 Dec 2024 00:46:54 +0100 Subject: [PATCH 03/17] feat(fmgc): add FM RNAV selected input --- .../wasm/fbw_a320/src/FlyByWireInterface.cpp | 3 +- .../wasm/fbw_a320/src/model/FmgcComputer.cpp | 1910 +++++++++-------- .../wasm/fbw_a320/src/model/FmgcComputer.h | 6 +- .../fbw_a320/src/model/FmgcComputer_data.cpp | 4 +- .../fbw_a320/src/model/FmgcComputer_types.h | 134 +- 5 files changed, 1036 insertions(+), 1021 deletions(-) diff --git a/fbw-a32nx/src/wasm/fbw_a320/src/FlyByWireInterface.cpp b/fbw-a32nx/src/wasm/fbw_a320/src/FlyByWireInterface.cpp index deb3e49da1e..009e4bfcd33 100644 --- a/fbw-a32nx/src/wasm/fbw_a320/src/FlyByWireInterface.cpp +++ b/fbw-a32nx/src/wasm/fbw_a320/src/FlyByWireInterface.cpp @@ -1780,7 +1780,8 @@ 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(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; diff --git a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.cpp b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.cpp index a2be9c8b1ad..b98f09508ef 100644 --- a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.cpp +++ b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.cpp @@ -355,9 +355,9 @@ void FmgcComputer::step() real32_T rtb_raComputationData_radio_height_ft_Data; real32_T rtb_y_cf; real32_T rtb_y_fl; - real32_T rtb_y_g; real32_T rtb_y_gtq; real32_T rtb_y_jq; + real32_T rtb_y_jv; real32_T rtb_y_mw; uint32_T rtb_DataTypeConversion1_e; uint32_T rtb_DataTypeConversion1_j; @@ -400,10 +400,11 @@ void FmgcComputer::step() boolean_T fdOwnOff; boolean_T raOppInvalid; boolean_T raOwnInvalid; + boolean_T rtb_AND10_b; + boolean_T rtb_AND10_k; boolean_T rtb_AND12; boolean_T rtb_AND1_c0; boolean_T rtb_AND8; - boolean_T rtb_AND9; boolean_T rtb_AND_j; boolean_T rtb_BusAssignment_b_logic_ils_tune_inhibit; boolean_T rtb_BusAssignment_gk_logic_ap_fd_common_condition; @@ -411,28 +412,28 @@ void FmgcComputer::step() boolean_T rtb_BusAssignment_h_logic_fcu_failure; boolean_T rtb_BusAssignment_h_logic_one_engine_out; boolean_T rtb_BusAssignment_hk_ap_fd_logic_longi_large_box_tcas; + boolean_T rtb_BusAssignment_hk_ap_fd_logic_trk_fpa_deselected; boolean_T rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset; boolean_T rtb_BusAssignment_n_logic_fac_speeds_failure; boolean_T rtb_BusAssignment_n_logic_fac_weights_failure; boolean_T rtb_BusAssignment_o_logic_both_ils_valid; boolean_T rtb_BusAssignment_o_logic_ils_failure; - boolean_T rtb_Compare_a5; - boolean_T rtb_Compare_bm; - boolean_T rtb_Compare_d2; - boolean_T rtb_Compare_du; - boolean_T rtb_Compare_fn; + boolean_T rtb_Compare_bb; + boolean_T rtb_Compare_bj; + boolean_T rtb_Compare_d0; boolean_T rtb_Compare_gc; - boolean_T rtb_Compare_mh; + boolean_T rtb_Compare_kg; + boolean_T rtb_Compare_ov; boolean_T rtb_GreaterThan3; + boolean_T rtb_GreaterThan3_e; boolean_T rtb_NOT1_i; boolean_T rtb_NOT3; boolean_T rtb_NOT_b; - boolean_T rtb_NOT_c; - boolean_T rtb_NOT_gj; boolean_T rtb_NOT_oj; boolean_T rtb_OR1_j; boolean_T rtb_OR2_l; - boolean_T rtb_OR_m4; + boolean_T rtb_OR_i; + boolean_T rtb_OR_iw; boolean_T rtb_TmpSignalConversionAtSFunctionInport3_idx_0; boolean_T rtb_TmpSignalConversionAtSFunctionInport3_idx_1; boolean_T rtb_TmpSignalConversionAtSFunctionInport3_idx_2; @@ -446,29 +447,27 @@ void FmgcComputer::step() boolean_T rtb_doubleAdrFault; boolean_T rtb_ir3Invalid; boolean_T rtb_irOwnInvalid; - boolean_T rtb_y_ai; - boolean_T rtb_y_cj; - boolean_T rtb_y_cq; - boolean_T rtb_y_da; - boolean_T rtb_y_dm; - boolean_T rtb_y_e; - boolean_T rtb_y_fd; - boolean_T rtb_y_ff; - boolean_T rtb_y_h; - boolean_T rtb_y_hh; - boolean_T rtb_y_hy; - boolean_T rtb_y_i2; + boolean_T rtb_y_bk; + boolean_T rtb_y_c; + boolean_T rtb_y_c2; + boolean_T rtb_y_d; + boolean_T rtb_y_dk; + boolean_T rtb_y_e2; + boolean_T rtb_y_hi; boolean_T rtb_y_j; + boolean_T rtb_y_j1; + boolean_T rtb_y_js; + boolean_T rtb_y_jt; boolean_T rtb_y_k3; - boolean_T rtb_y_km; boolean_T rtb_y_lh; boolean_T rtb_y_me; - boolean_T rtb_y_n; - boolean_T rtb_y_o; + boolean_T rtb_y_mj; + boolean_T rtb_y_od; + boolean_T rtb_y_ogh; boolean_T rtb_y_oi; - boolean_T rtb_y_p; - athr_fma_message rtb_y_nf; - athr_fma_mode rtb_y_d; + boolean_T rtb_y_pw; + athr_fma_message rtb_y_nc; + athr_fma_mode rtb_y_lu; lateral_law rtb_active_lateral_law; tcas_submode rtb_mode; vertical_law rtb_active_longitudinal_law; @@ -486,15 +485,16 @@ void FmgcComputer::step() boolean_T Memory_PreviousInput_k_tmp_tmp_0; boolean_T Memory_PreviousInput_k_tmp_tmp_tmp; boolean_T Memory_PreviousInput_l_tmp; + boolean_T Memory_PreviousInput_l_tmp_0; boolean_T absVsTarget_tmp; - boolean_T absVsTarget_tmp_0; boolean_T absVsTarget_tmp_tmp; boolean_T guard1; - boolean_T rtb_AND_e_tmp; + boolean_T rtb_GreaterThan3_tmp; boolean_T rtb_NOT3_tmp; boolean_T rtb_NOT3_tmp_0; boolean_T rtb_OR2_l_tmp; - boolean_T rtb_y_a0_tmp; + boolean_T rtb_OR2_l_tmp_0; + boolean_T rtb_OR2_l_tmp_1; boolean_T rtb_y_lh_tmp; if (FmgcComputer_U.in.sim_data.computer_running) { if (!FmgcComputer_DWork.Runtime_MODE) { @@ -1135,12 +1135,12 @@ void FmgcComputer::step() (SignStatusMatrix::FailureWarning)); raOppInvalid = (FmgcComputer_U.in.bus_inputs.ra_opp_bus.radio_height_ft.SSM == static_cast (SignStatusMatrix::FailureWarning)); - rtb_y_n = !raOppInvalid; + rtb_y_d = !raOppInvalid; rtb_OR1_j = !raOwnInvalid; - if (rtb_OR1_j && rtb_y_n) { + if (rtb_OR1_j && rtb_y_d) { rtb_raComputationData_radio_height_ft_SSM = FmgcComputer_U.in.bus_inputs.ra_own_bus.radio_height_ft.SSM; rtb_raComputationData_radio_height_ft_Data = FmgcComputer_U.in.bus_inputs.ra_own_bus.radio_height_ft.Data; - } else if (raOwnInvalid && rtb_y_n) { + } else if (raOwnInvalid && rtb_y_d) { rtb_raComputationData_radio_height_ft_SSM = FmgcComputer_U.in.bus_inputs.ra_opp_bus.radio_height_ft.SSM; rtb_raComputationData_radio_height_ft_Data = FmgcComputer_U.in.bus_inputs.ra_opp_bus.radio_height_ft.Data; } else if (rtb_OR1_j && raOppInvalid) { @@ -1254,32 +1254,31 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fac_own_bus.discrete_word_2, FmgcComputer_P.BitfromLabel_bit, &rtb_y_jm); - rtb_irOwnInvalid = (rtb_y_jm != 0U); + rtb_y_jt = (rtb_y_jm != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fac_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel2_bit, &rtb_y_jm); - rtb_irOwnInvalid = (rtb_irOwnInvalid || (rtb_y_jm != 0U)); + rtb_irOwnInvalid = (rtb_y_jt || (rtb_y_jm != 0U)); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fac_own_bus.discrete_word_2, FmgcComputer_P.BitfromLabel1_bit, &rtb_y_jm); - rtb_y_hy = (rtb_y_jm != 0U); + rtb_AND10_b = (rtb_y_jm != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fac_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel3_bit, &rtb_y_jm); - rtb_ir3Invalid = ((!rtb_irOwnInvalid) || ((!rtb_y_hy) && (rtb_y_jm == 0U)) || (!FmgcComputer_P.Constant_Value_a) || - ((!FmgcComputer_U.in.discrete_inputs.fac_own_healthy) && - (!FmgcComputer_U.in.discrete_inputs.fac_opp_healthy))); + rtb_irOwnInvalid = ((!rtb_irOwnInvalid) || ((!rtb_AND10_b) && (rtb_y_jm == 0U)) || (!FmgcComputer_P.Constant_Value_a) + || ((!FmgcComputer_U.in.discrete_inputs.fac_own_healthy) && + (!FmgcComputer_U.in.discrete_inputs.fac_opp_healthy))); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fac_own_bus.discrete_word_2, FmgcComputer_P.BitfromLabel4_bit, &rtb_y_jm); - rtb_irOwnInvalid = (rtb_y_jm != 0U); + rtb_y_jt = (rtb_y_jm != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fac_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel6_bit, &rtb_y_jm); - rtb_irOwnInvalid = (rtb_irOwnInvalid || (rtb_y_jm != 0U)); + rtb_y_jt = (rtb_y_jt || (rtb_y_jm != 0U)); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fac_own_bus.discrete_word_2, FmgcComputer_P.BitfromLabel5_bit, &rtb_y_jm); - rtb_y_fd = (rtb_y_jm != 0U); + rtb_y_dk = (rtb_y_jm != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fac_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel7_bit, &rtb_y_jm); - rtb_irOwnInvalid = (FmgcComputer_U.in.discrete_inputs.fac_opp_healthy && - FmgcComputer_U.in.discrete_inputs.fac_own_healthy && rtb_irOwnInvalid && (rtb_y_fd || (rtb_y_jm - != 0U))); + rtb_ir3Invalid = (FmgcComputer_U.in.discrete_inputs.fac_opp_healthy && + FmgcComputer_U.in.discrete_inputs.fac_own_healthy && rtb_y_jt && (rtb_y_dk || (rtb_y_jm != 0U))); rtb_BusAssignment_lz_logic_chosen_fac_bus_total_weight_lbs.SSM = rtb_Switch_total_weight_lbs_SSM; rtb_BusAssignment_lz_logic_chosen_fac_bus_total_weight_lbs.Data = rtb_Switch_total_weight_lbs_Data; rtb_BusAssignment_lz_logic_chosen_fac_bus_center_of_gravity_pos_percent.SSM = @@ -1295,29 +1294,29 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_f(&rtb_BusAssignment_lz_logic_chosen_fac_bus_v_max_kn, &rtb_y_me); FmgcComputer_MATLABFunction_f(&rtb_BusAssignment_lz_logic_chosen_fac_bus_v_ls_kn, &rtb_y_j); rtb_BusAssignment_n_logic_fac_speeds_failure = ((!rtb_y_me) || (!rtb_y_j)); - FmgcComputer_MATLABFunction_f(&rtb_BusAssignment_lz_logic_chosen_fac_bus_v_man_kn, &rtb_y_da); + FmgcComputer_MATLABFunction_f(&rtb_BusAssignment_lz_logic_chosen_fac_bus_v_man_kn, &rtb_y_bk); FmgcComputer_MATLABFunction_f(&rtb_BusAssignment_lz_logic_chosen_fac_bus_center_of_gravity_pos_percent, &rtb_y_me); FmgcComputer_MATLABFunction_f(&rtb_BusAssignment_lz_logic_chosen_fac_bus_total_weight_lbs, &rtb_y_j); rtb_BusAssignment_n_logic_chosen_fac_bus_discrete_word_5.SSM = rtb_Switch_discrete_word_5_SSM; rtb_BusAssignment_n_logic_chosen_fac_bus_discrete_word_5.Data = rtb_Switch_discrete_word_5_Data; - rtb_BusAssignment_n_logic_fac_weights_failure = ((!rtb_y_da) || (!rtb_y_me) || (!rtb_y_j)); + rtb_BusAssignment_n_logic_fac_weights_failure = ((!rtb_y_bk) || (!rtb_y_me) || (!rtb_y_j)); FmgcComputer_MATLABFunction_i(&rtb_BusAssignment_n_logic_chosen_fac_bus_discrete_word_5, FmgcComputer_P.BitfromLabel_bit_p, &rtb_y_jm); - rtb_y_i2 = (rtb_y_jm != 0U); + rtb_y_e2 = (rtb_y_jm != 0U); FmgcComputer_MATLABFunction_i(&rtb_BusAssignment_n_logic_chosen_fac_bus_discrete_word_5, FmgcComputer_P.BitfromLabel1_bit_a, &rtb_y_jm); - rtb_y_fd = (rtb_y_jm != 0U); + rtb_y_dk = (rtb_y_jm != 0U); FmgcComputer_MATLABFunction_i(&rtb_BusAssignment_n_logic_chosen_fac_bus_discrete_word_5, FmgcComputer_P.BitfromLabel2_bit_p, &rtb_y_jm); - rtb_y_hy = (rtb_y_jm == 0U); + rtb_AND10_b = (rtb_y_jm == 0U); FmgcComputer_MATLABFunction_f(&rtb_BusAssignment_n_logic_chosen_fac_bus_discrete_word_5, &rtb_y_j); - rtb_y_km = (rtb_y_i2 && rtb_y_fd && rtb_y_hy && rtb_y_j); - rtb_y_o = ((!rtb_y_j) || (!rtb_y_hy)); - rtb_OR_m4 = !rtb_y_km; - FmgcComputer_MATLABFunction_a(rtb_OR_m4, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge, + rtb_y_mj = (rtb_y_e2 && rtb_y_dk && rtb_AND10_b && rtb_y_j); + rtb_AND10_k = ((!rtb_y_j) || (!rtb_AND10_b)); + rtb_OR_i = !rtb_y_mj; + FmgcComputer_MATLABFunction_a(rtb_OR_i, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge, FmgcComputer_P.ConfirmNode1_timeDelay, &rtb_y_j, &FmgcComputer_DWork.sf_MATLABFunction_fw); - rtb_y_e = ((FmgcComputer_U.in.discrete_inputs.eng_opp_stop && FmgcComputer_U.in.discrete_inputs.eng_own_stop && - rtb_y_km) || rtb_y_j); + rtb_y_ogh = ((FmgcComputer_U.in.discrete_inputs.eng_opp_stop && FmgcComputer_U.in.discrete_inputs.eng_own_stop && + rtb_y_mj) || rtb_y_j); FmgcComputer_MATLABFunction_i(&rtb_BusAssignment_n_logic_chosen_fac_bus_discrete_word_5, FmgcComputer_P.BitfromLabel8_bit, &rtb_DataTypeConversion1_j); FmgcComputer_MATLABFunction_i(&rtb_BusAssignment_n_logic_chosen_fac_bus_discrete_word_5, @@ -1354,13 +1353,13 @@ void FmgcComputer::step() (!FmgcComputer_U.in.discrete_inputs.fcu_own_healthy)); FmgcComputer_MATLABFunction_f(&FmgcComputer_U.in.bus_inputs.ils_opp_bus.glideslope_deviation_deg, &rtb_y_me); FmgcComputer_MATLABFunction_f(&FmgcComputer_U.in.bus_inputs.ils_opp_bus.localizer_deviation_deg, &rtb_y_j); - rtb_y_i2 = (rtb_y_me && rtb_y_j); + rtb_y_e2 = (rtb_y_me && rtb_y_j); FmgcComputer_MATLABFunction_f(&FmgcComputer_U.in.bus_inputs.ils_own_bus.glideslope_deviation_deg, &rtb_y_me); FmgcComputer_MATLABFunction_f(&FmgcComputer_U.in.bus_inputs.ils_own_bus.localizer_deviation_deg, &rtb_y_j); - rtb_y_fd = (rtb_y_me && rtb_y_j); - rtb_BusAssignment_o_logic_ils_failure = ((!rtb_y_i2) && (!rtb_y_fd)); - rtb_BusAssignment_o_logic_both_ils_valid = (rtb_y_i2 && rtb_y_fd); - if (rtb_y_fd) { + rtb_y_dk = (rtb_y_me && rtb_y_j); + rtb_BusAssignment_o_logic_ils_failure = ((!rtb_y_e2) && (!rtb_y_dk)); + rtb_BusAssignment_o_logic_both_ils_valid = (rtb_y_e2 && rtb_y_dk); + if (rtb_y_dk) { rtb_Switch9 = FmgcComputer_U.in.bus_inputs.ils_own_bus.runway_heading_deg.SSM; rtb_Switch_i_runway_heading_deg_Data = FmgcComputer_U.in.bus_inputs.ils_own_bus.runway_heading_deg.Data; FmgcComputer_Y.out.logic.ils_computation_data.ils_frequency_mhz = @@ -1395,33 +1394,33 @@ void FmgcComputer::step() rtb_NOT1_i = (rtb_DataTypeConversion1_e == 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.sensitivity_level, FmgcComputer_P.BitfromLabel1_bit_aq, &rtb_DataTypeConversion1_e); - rtb_y_fd = (rtb_DataTypeConversion1_e != 0U); + rtb_y_dk = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.sensitivity_level, FmgcComputer_P.BitfromLabel2_bit_f, &rtb_DataTypeConversion1_e); - rtb_NOT1_i = (rtb_y_j && (rtb_y_gtq > FmgcComputer_P.CompareToConstant_const_n) && rtb_NOT1_i && rtb_y_fd && + rtb_NOT1_i = (rtb_y_j && (rtb_y_gtq > FmgcComputer_P.CompareToConstant_const_n) && rtb_NOT1_i && rtb_y_dk && (rtb_DataTypeConversion1_e != 0U)); rtb_BusAssignment_f_logic_ils_computation_data_runway_heading_deg.SSM = rtb_Switch9; rtb_BusAssignment_f_logic_ils_computation_data_runway_heading_deg.Data = rtb_Switch_i_runway_heading_deg_Data; FmgcComputer_Y.out.logic.tcas_failure = !rtb_y_j; FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_o_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); - rtb_y_i2 = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_loc_submode_active || + rtb_y_e2 = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_loc_submode_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active || (FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed && (rtb_y_gtq <= FmgcComputer_P.CompareToConstant_const_o2))); FmgcComputer_MATLABFunction(&rtb_BusAssignment_f_logic_ils_computation_data_runway_heading_deg, FmgcComputer_P.A429ValueOrDefault3_defaultValue, &rtb_y_gtq); - rtb_y_n = !rtb_y_i2; - if (rtb_y_n) { + rtb_y_d = !rtb_y_e2; + if (rtb_y_d) { FmgcComputer_B.u_lyjj = rtb_y_gtq; } rtb_BusAssignment_b_logic_ir_computation_data_heading_true_deg.SSM = rtb_irComputationBus_heading_true_deg_SSM; rtb_BusAssignment_b_logic_ir_computation_data_heading_true_deg.Data = rtb_irComputationBus_heading_true_deg_Data; - rtb_BusAssignment_b_logic_ils_tune_inhibit = rtb_y_i2; - rtb_y_hh = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active || + rtb_BusAssignment_b_logic_ils_tune_inhibit = rtb_y_e2; + rtb_y_js = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active); - FmgcComputer_MATLABFunction_a(((!rtb_doubleAdrFault) && (!rtb_adr3Invalid) && ((!rtb_y_o) || rtb_y_hh) && - (FmgcComputer_U.in.fms_inputs.fm_valid || rtb_y_hh || + FmgcComputer_MATLABFunction_a(((!rtb_doubleAdrFault) && (!rtb_adr3Invalid) && ((!rtb_AND10_k) || rtb_y_js) && + (FmgcComputer_U.in.fms_inputs.fm_valid || rtb_y_js || (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active && (rtb_raComputationData_radio_height_ft_Data < 700.0F)))), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge_b, FmgcComputer_P.ConfirmNode1_timeDelay_e, &rtb_y_j, &FmgcComputer_DWork.sf_MATLABFunction_kv); @@ -1433,11 +1432,11 @@ void FmgcComputer::step() FmgcComputer_P.MTrigNode_triggerDuration, &FmgcComputer_DWork.sf_MATLABFunction_m3); rtb_OR1_j = !rtb_BusAssignment_h_logic_fcu_failure; rtb_GreaterThan3 = !rtb_BusAssignment_n_logic_fac_speeds_failure; - rtb_Compare_mh = !raOwnInvalid; + rtb_Compare_ov = !raOwnInvalid; FmgcComputer_MATLABFunction_a((((!rtb_BusAssignment_n_logic_fac_weights_failure) || (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active)) && (rtb_GreaterThan3 || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (rtb_Compare_mh || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (rtb_Compare_ov || ((!FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed) && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active) && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active) && @@ -1474,21 +1473,21 @@ void FmgcComputer::step() rtb_BusAssignment_gk_logic_chosen_fac_bus_v_max_kn.SSM = rtb_Switch_v_max_kn_SSM; rtb_BusAssignment_gk_logic_chosen_fac_bus_v_max_kn.Data = rtb_Switch_v_max_kn_Data; FmgcComputer_MATLABFunction_g(FmgcComputer_U.in.discrete_inputs.fcu_ap_button, FmgcComputer_P.PulseNode_isRisingEdge, - &rtb_y_da, &FmgcComputer_DWork.sf_MATLABFunction_il); + &rtb_y_bk, &FmgcComputer_DWork.sf_MATLABFunction_il); FmgcComputer_MATLABFunction_g(rtb_BusAssignment_h_logic_engine_running, FmgcComputer_P.PulseNode3_isRisingEdge, &rtb_y_k3, &FmgcComputer_DWork.sf_MATLABFunction_jp); FmgcComputer_MATLABFunction_g(FmgcComputer_U.in.discrete_inputs.ap_opp_engaged, FmgcComputer_P.PulseNode2_isRisingEdge, &rtb_y_j, &FmgcComputer_DWork.sf_MATLABFunction_cb); - rtb_y_h = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active; + rtb_OR2_l_tmp = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active; rtb_appInop_idx_2 = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active; - rtb_OR2_l_tmp = !FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed; - rtb_NOT_gj = (rtb_OR2_l_tmp && rtb_appInop_idx_2); - rtb_OR2_l = (rtb_NOT_gj && rtb_y_h); + rtb_OR2_l_tmp_0 = !FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed; + rtb_OR2_l_tmp_1 = (rtb_OR2_l_tmp_0 && rtb_appInop_idx_2); + rtb_OR2_l = (rtb_OR2_l_tmp_1 && rtb_OR2_l_tmp); FmgcComputer_MATLABFunction_g(rtb_OR2_l, FmgcComputer_P.PulseNode1_isRisingEdge, &rtb_y_me, &FmgcComputer_DWork.sf_MATLABFunction_hp); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault_defaultValue_l, &rtb_y_gtq); - rtb_y_i2 = (rtb_y_gtq >= FmgcComputer_P.CompareToConstant3_const); + rtb_y_e2 = (rtb_y_gtq >= FmgcComputer_P.CompareToConstant3_const); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault1_defaultValue, &rtb_y_gtq); rtb_Phi_c_deg = rtb_y_gtq; @@ -1502,29 +1501,29 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault5_defaultValue, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_gk_logic_ir_computation_data_roll_angle_deg, FmgcComputer_P.A429ValueOrDefault6_defaultValue, &rtb_y_gtq); - rtb_NOT_c = !rtb_ir3Invalid; + rtb_GreaterThan3_e = !rtb_irOwnInvalid; rtb_TmpSignalConversionAtSFunctionInport3_idx_0 = !FmgcComputer_U.in.discrete_inputs.elac_own_ap_disc; rtb_TmpSignalConversionAtSFunctionInport3_idx_1 = !FmgcComputer_U.in.discrete_inputs.elac_opp_ap_disc; apCondition = ((!FmgcComputer_U.in.discrete_inputs.ap_instinctive_disc) && (rtb_TmpSignalConversionAtSFunctionInport3_idx_0 || rtb_TmpSignalConversionAtSFunctionInport3_idx_1) && - rtb_NOT_c); + rtb_GreaterThan3_e); rtb_ap_inop_tmp_tmp = !fdOppOff; rtb_ap_inop_tmp = (rtb_ap_inop_tmp_tmp || (!rtb_BusAssignment_gk_logic_ap_fd_common_condition) || (!apCondition)); - rtb_y_hy = !FmgcComputer_U.in.discrete_inputs.is_unit_1; - FmgcComputer_DWork.Memory_PreviousInput = FmgcComputer_P.Logic_table[(((static_cast(rtb_y_da && - (!FmgcComputer_DWork.Delay_DSTATE_p) && rtb_y_e && rtb_BusAssignment_gk_logic_ap_fd_common_condition && fdOppOff && - apCondition && ((rtb_y_mw >= rtb_y_cf) && (rtb_y_cf >= rtb_y_fl) && (rtb_y_jq >= + rtb_appCapability_idx_2 = !FmgcComputer_U.in.discrete_inputs.is_unit_1; + FmgcComputer_DWork.Memory_PreviousInput = FmgcComputer_P.Logic_table[(((static_cast(rtb_y_bk && + (!FmgcComputer_DWork.Delay_DSTATE_p) && rtb_y_ogh && rtb_BusAssignment_gk_logic_ap_fd_common_condition && fdOppOff + && apCondition && ((rtb_y_mw >= rtb_y_cf) && (rtb_y_cf >= rtb_y_fl) && (rtb_y_jq >= FmgcComputer_P.CompareToConstant_const_hu) && (rtb_y_jq <= FmgcComputer_P.CompareToConstant1_const_bt) && (std:: - abs(rtb_y_gtq) <= FmgcComputer_P.CompareToConstant2_const_c))) << 1) + (rtb_ap_inop_tmp || (rtb_y_da && + abs(rtb_y_gtq) <= FmgcComputer_P.CompareToConstant2_const_c))) << 1) + (rtb_ap_inop_tmp || (rtb_y_bk && FmgcComputer_DWork.Delay_DSTATE_p) || FmgcComputer_U.in.discrete_inputs.ap_instinctive_disc || ((rtb_y_j && - rtb_OR2_l) || (FmgcComputer_U.in.discrete_inputs.ap_opp_engaged && rtb_y_me && rtb_y_hy)) || (rtb_y_km && - (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || rtb_y_i2 || (rtb_Phi_c_deg >= - FmgcComputer_P.CompareToConstant5_const))) || (rtb_y_k3 && rtb_y_km))) << 1) + + rtb_OR2_l) || (FmgcComputer_U.in.discrete_inputs.ap_opp_engaged && rtb_y_me && rtb_appCapability_idx_2)) || + (rtb_y_mj && (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || rtb_y_e2 || + (rtb_Phi_c_deg >= FmgcComputer_P.CompareToConstant5_const))) || (rtb_y_k3 && rtb_y_mj))) << 1) + FmgcComputer_DWork.Memory_PreviousInput]; FmgcComputer_MATLABFunction_a(FmgcComputer_DWork.Memory_PreviousInput, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_k, FmgcComputer_P.ConfirmNode_timeDelay_b, &rtb_y_k3, &FmgcComputer_DWork.sf_MATLABFunction_it); - absVsTarget = static_cast((((static_cast(rtb_y_da && FmgcComputer_DWork.Memory_PreviousInput) << + absVsTarget = static_cast((((static_cast(rtb_y_bk && FmgcComputer_DWork.Memory_PreviousInput) << 1) + ((!rtb_y_k3) || FmgcComputer_U.in.discrete_inputs.ap_instinctive_disc)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_g); rtb_Logic_a2[0U] = FmgcComputer_P.Logic_table_h[static_cast(absVsTarget)]; @@ -1537,12 +1536,12 @@ void FmgcComputer::step() FmgcComputer_DWork.Memory_PreviousInput_g1 = FmgcComputer_P.Logic_table_f[(((static_cast(rtb_y_k3) << 1) + FmgcComputer_P.Constant_Value_e) << 1) + FmgcComputer_DWork.Memory_PreviousInput_g1]; FmgcComputer_MATLABFunction_g(FmgcComputer_U.in.discrete_inputs.fcu_athr_button, - FmgcComputer_P.PulseNode_isRisingEdge_k, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_o1); + FmgcComputer_P.PulseNode_isRisingEdge_k, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_o1); FmgcComputer_MATLABFunction_a((FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode2_isRisingEdge, FmgcComputer_P.ConfirmNode2_timeDelay, &rtb_y_j, &FmgcComputer_DWork.sf_MATLABFunction_mn); - FmgcComputer_MATLABFunction_g(rtb_y_j, FmgcComputer_P.PulseNode1_isRisingEdge_h, &rtb_Compare_du, + FmgcComputer_MATLABFunction_g(rtb_y_j, FmgcComputer_P.PulseNode1_isRisingEdge_h, &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_jt); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault_defaultValue_n, &rtb_y_gtq); @@ -1550,10 +1549,10 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault1_defaultValue_p, &rtb_y_gtq); FmgcComputer_MATLABFunction_g((rtb_y_k3 && (rtb_y_gtq < FmgcComputer_P.CompareToConstant1_const)), - FmgcComputer_P.PulseNode2_isRisingEdge_n, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_d4); + FmgcComputer_P.PulseNode2_isRisingEdge_n, &rtb_y_j1, &FmgcComputer_DWork.sf_MATLABFunction_d4); FmgcComputer_MATLABFunction_i(&rtb_BusAssignment_i_logic_chosen_fac_bus_discrete_word_5, FmgcComputer_P.BitfromLabel_bit_g, &rtb_y_jm); - FmgcComputer_MATLABFunction_g((rtb_y_jm != 0U), FmgcComputer_P.PulseNode3_isRisingEdge_a, &rtb_y_da, + FmgcComputer_MATLABFunction_g((rtb_y_jm != 0U), FmgcComputer_P.PulseNode3_isRisingEdge_a, &rtb_y_bk, &FmgcComputer_DWork.sf_MATLABFunction_ga); FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.fmgc_opp_mode_sync && (!FmgcComputer_U.in.discrete_inputs.athr_opp_engaged)), FmgcComputer_P.PulseNode4_isRisingEdge, &rtb_y_me, @@ -1562,10 +1561,10 @@ void FmgcComputer::step() FmgcComputer_P.PulseNode5_isRisingEdge, &rtb_y_j, &FmgcComputer_DWork.sf_MATLABFunction_ag); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.ecu_status_word_3, FmgcComputer_P.BitfromLabel1_bit_iq, &rtb_y_jm); - rtb_y_i2 = (rtb_y_jm != 0U); + rtb_y_e2 = (rtb_y_jm != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.ecu_status_word_3, FmgcComputer_P.BitfromLabel2_bit_b, &rtb_y_jm); - FmgcComputer_MATLABFunction_a((((!rtb_y_i2) || (rtb_y_jm == 0U)) && FmgcComputer_DWork.Delay_DSTATE_k), + FmgcComputer_MATLABFunction_a((((!rtb_y_e2) || (rtb_y_jm == 0U)) && FmgcComputer_DWork.Delay_DSTATE_k), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode3_isRisingEdge, FmgcComputer_P.ConfirmNode3_timeDelay, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_dx); rtb_y_k3 = ((FmgcComputer_DWork.Delay_DSTATE.manual_spd_control_active || @@ -1573,44 +1572,44 @@ void FmgcComputer::step() (!FmgcComputer_DWork.Memory_PreviousInput_g1) && rtb_OR1_j && rtb_GreaterThan3); rtb_ap_inop_tmp_tmp = (rtb_ap_inop_tmp_tmp || (!rtb_y_k3)); FmgcComputer_DWork.Delay_DSTATE_k = FmgcComputer_P.Logic_table_n[(((static_cast(fdOppOff && rtb_y_k3 && - ((rtb_Compare_a5 && ((rtb_raComputationData_radio_height_ft_Data > 100.0F) || raOwnInvalid)) || rtb_Compare_du || - rtb_y_da || rtb_y_j)) << 1) + (rtb_ap_inop_tmp_tmp || rtb_y_me || (FmgcComputer_DWork.Delay_DSTATE_k && - rtb_Compare_a5 && (!rtP_fmgc_ap_fd_logic_output_MATLABStruct.lateral_modes.land_active)) || - FmgcComputer_U.in.discrete_inputs.athr_instinctive_disc || rtb_y_ff || rtb_NOT_b)) << 1) + + ((rtb_y_jt && ((rtb_raComputationData_radio_height_ft_Data > 100.0F) || raOwnInvalid)) || rtb_Compare_bj || + rtb_y_bk || rtb_y_j)) << 1) + (rtb_ap_inop_tmp_tmp || rtb_y_me || (FmgcComputer_DWork.Delay_DSTATE_k && rtb_y_jt && + (!rtP_fmgc_ap_fd_logic_output_MATLABStruct.lateral_modes.land_active)) || + FmgcComputer_U.in.discrete_inputs.athr_instinctive_disc || rtb_y_j1 || rtb_NOT_b)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_p]; - rtb_Compare_fn = !rtb_Logic_a2[0]; + rtb_Compare_gc = !rtb_Logic_a2[0]; rtb_y_k3 = !fdOwnOff; - rtb_y_p = !FmgcComputer_DWork.Delay_DSTATE_k; - rtb_y_j = (FmgcComputer_U.in.discrete_inputs.ap_opp_engaged || FmgcComputer_U.in.discrete_inputs.fd_opp_engaged); - rtb_y_da = (rtb_y_j || FmgcComputer_U.in.discrete_inputs.athr_opp_engaged); - rtb_y_k3 = ((rtb_y_hy || (rtb_Compare_fn && (FmgcComputer_U.in.discrete_inputs.ap_opp_engaged || rtb_y_k3) && - (rtb_y_j || rtb_y_p) && rtb_y_da)) && (FmgcComputer_U.in.discrete_inputs.is_unit_1 || ((rtb_Compare_fn || - FmgcComputer_U.in.discrete_inputs.ap_opp_engaged) && (rtb_y_j || rtb_y_k3) && (rtb_y_da || rtb_y_p) && - (rtb_Logic_a2[0] || fdOwnOff || FmgcComputer_DWork.Delay_DSTATE_k || - (!FmgcComputer_U.in.discrete_inputs.fmgc_opp_healthy))))); - rtb_y_oi = !FmgcComputer_U.in.discrete_inputs.ap_opp_engaged; - rtb_OR2_l = (rtb_y_k3 && (rtb_Compare_fn || rtb_y_oi)); - rtb_y_fd = (rtb_Logic_a2[0] || FmgcComputer_U.in.discrete_inputs.ap_opp_engaged || fdOwnOff || + rtb_y_c2 = !FmgcComputer_DWork.Delay_DSTATE_k; + rtb_y_jt = (FmgcComputer_U.in.discrete_inputs.ap_opp_engaged || FmgcComputer_U.in.discrete_inputs.fd_opp_engaged); + rtb_y_j = (rtb_y_jt || FmgcComputer_U.in.discrete_inputs.athr_opp_engaged); + rtb_y_k3 = ((rtb_appCapability_idx_2 || (rtb_Compare_gc && (FmgcComputer_U.in.discrete_inputs.ap_opp_engaged || + rtb_y_k3) && (rtb_y_jt || rtb_y_c2) && rtb_y_j)) && (FmgcComputer_U.in.discrete_inputs.is_unit_1 || + ((rtb_Compare_gc || FmgcComputer_U.in.discrete_inputs.ap_opp_engaged) && (rtb_y_jt || rtb_y_k3) && (rtb_y_j || + rtb_y_c2) && (rtb_Logic_a2[0] || fdOwnOff || FmgcComputer_DWork.Delay_DSTATE_k || + (!FmgcComputer_U.in.discrete_inputs.fmgc_opp_healthy))))); + rtb_y_pw = !FmgcComputer_U.in.discrete_inputs.ap_opp_engaged; + rtb_OR2_l = (rtb_y_k3 && (rtb_Compare_gc || rtb_y_pw)); + rtb_y_dk = (rtb_Logic_a2[0] || FmgcComputer_U.in.discrete_inputs.ap_opp_engaged || fdOwnOff || FmgcComputer_U.in.discrete_inputs.fd_opp_engaged); FmgcComputer_MATLABFunction_g(rtb_BusAssignment_h_logic_engine_running, FmgcComputer_P.PulseNode3_isRisingEdge_f, - &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_p2o); - rtb_appCapability_idx_2 = !rtb_y_fd; - rtb_y_hy = (rtb_appCapability_idx_2 || (rtb_Compare_du && rtb_y_km)); + &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_p2o); + rtb_appCapability_idx_2 = !rtb_y_dk; + rtb_AND10_b = (rtb_appCapability_idx_2 || (rtb_Compare_bj && rtb_y_mj)); rtb_BusAssignment_m_logic_adr_computation_data_vertical_speed_ft_min.SSM = rtb_adrComputationBus_vertical_speed_ft_min_SSM; rtb_BusAssignment_m_logic_adr_computation_data_vertical_speed_ft_min.Data = rtb_adrComputationBus_vertical_speed_ft_min_Data; - apCondition = rtb_y_fd; - rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset = rtb_y_hy; + apCondition = rtb_y_dk; + rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset = rtb_AND10_b; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel1_bit_c, &rtb_DataTypeConversion1_e); rtb_NOT_oj = (rtb_DataTypeConversion1_e == 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel3_bit_m, &rtb_DataTypeConversion1_e); - rtb_y_i2 = (rtb_DataTypeConversion1_e != 0U); + rtb_y_e2 = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel4_bit_p, &rtb_DataTypeConversion1_e); - rtb_y_i2 = ((!rtb_NOT_oj) || (!rtb_y_i2) || (rtb_DataTypeConversion1_e == 0U)); + rtb_y_e2 = ((!rtb_NOT_oj) || (!rtb_y_e2) || (rtb_DataTypeConversion1_e == 0U)); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel2_bit_a, &rtb_DataTypeConversion1_e); rtb_NOT_oj = (rtb_DataTypeConversion1_e != 0U); @@ -1636,12 +1635,12 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault3_defaultValue_c, &rtb_y_mw); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel5_bit_b, &rtb_DataTypeConversion1_e); - rtb_OR1_j = !rtb_y_i2; + rtb_OR1_j = !rtb_y_e2; if (rtb_OR1_j || (rtb_DataTypeConversion1_e == 0U)) { FmgcComputer_B.u_lyjjlj = rtb_y_mw; } - if (rtb_y_i2) { + if (rtb_y_e2) { if (rtb_NOT_oj) { rtb_Phi_c_deg = -static_cast(absVsTarget); } else { @@ -1659,37 +1658,37 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_i, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_l, - &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_bz); + &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_bz); FmgcComputer_DWork.Memory_PreviousInput_e = FmgcComputer_P.Logic_table_l[(((static_cast - (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active && rtb_Compare_du) << 1) + + (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active && rtb_Compare_bj) << 1) + FmgcComputer_DWork.Delay_DSTATE_o) << 1) + FmgcComputer_DWork.Memory_PreviousInput_e]; - rtb_Compare_gc = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active; - FmgcComputer_DWork.Delay_DSTATE_o = (FmgcComputer_DWork.Memory_PreviousInput_e && rtb_Compare_gc); - FmgcComputer_MATLABFunction_m(FmgcComputer_DWork.Delay_DSTATE_o, FmgcComputer_U.in.time.dt, &rtb_Compare_a5, + rtb_Compare_bb = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active; + FmgcComputer_DWork.Delay_DSTATE_o = (FmgcComputer_DWork.Memory_PreviousInput_e && rtb_Compare_bb); + FmgcComputer_MATLABFunction_m(FmgcComputer_DWork.Delay_DSTATE_o, FmgcComputer_U.in.time.dt, &rtb_y_jt, FmgcComputer_P.MTrigNode1_isRisingEdge, FmgcComputer_P.MTrigNode1_retriggerable, FmgcComputer_P.MTrigNode1_triggerDuration, &FmgcComputer_DWork.sf_MATLABFunction_g0); FmgcComputer_MATLABFunction_m((FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active && (FmgcComputer_DWork.Delay_DSTATE.armed_modes.clb_armed || FmgcComputer_DWork.Delay_DSTATE.armed_modes.des_armed || FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed || FmgcComputer_DWork.Delay_DSTATE.armed_modes.glide_armed || - FmgcComputer_DWork.Delay_DSTATE.armed_modes.alt_acq_armed)), FmgcComputer_U.in.time.dt, &rtb_Compare_du, + FmgcComputer_DWork.Delay_DSTATE.armed_modes.alt_acq_armed)), FmgcComputer_U.in.time.dt, &rtb_Compare_bj, FmgcComputer_P.MTrigNode2_isRisingEdge, FmgcComputer_P.MTrigNode2_retriggerable, FmgcComputer_P.MTrigNode2_triggerDuration, &FmgcComputer_DWork.sf_MATLABFunction_pl4); rtb_BusAssignment_j_logic_adr_computation_data_altitude_corrected_ft.SSM = rtb_adrComputationBus_altitude_corrected_ft_SSM; rtb_BusAssignment_j_logic_adr_computation_data_altitude_corrected_ft.Data = rtb_adrComputationBus_altitude_corrected_ft_Data; - rtb_NOT_oj = rtb_y_i2; + rtb_NOT_oj = rtb_y_e2; FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_m, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_j_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault1_defaultValue_c, &rtb_y_gtq); - rtb_AND_e_tmp = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_hold_active); + rtb_y_e2 = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_hold_active); rtb_TmpSignalConversionAtSFunctionInport3_idx_2 = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active); - rtb_AND_j = (rtb_AND_e_tmp && FmgcComputer_DWork.Delay_DSTATE.alt_cstr_applicable && + rtb_AND_j = (rtb_y_e2 && FmgcComputer_DWork.Delay_DSTATE.alt_cstr_applicable && rtb_TmpSignalConversionAtSFunctionInport3_idx_2 && FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid); if (rtb_y_jq > rtb_y_gtq) { @@ -1712,33 +1711,34 @@ void FmgcComputer::step() } rtb_BusAssignment_hk_ap_fd_logic_tcas_vs_target = rtb_Phi_c_deg; - rtb_BusAssignment_hk_ap_fd_logic_longi_large_box_tcas = rtb_Compare_du; + rtb_BusAssignment_hk_ap_fd_logic_trk_fpa_deselected = rtb_y_jt; + rtb_BusAssignment_hk_ap_fd_logic_longi_large_box_tcas = rtb_Compare_bj; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel_bit_c, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_a(rtb_y_km, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_h, - FmgcComputer_P.ConfirmNode_timeDelay_i, &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_hz); + FmgcComputer_MATLABFunction_a(rtb_y_mj, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_h, + FmgcComputer_P.ConfirmNode_timeDelay_i, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_hz); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault_defaultValue_l2, &rtb_y_gtq); - rtb_GreaterThan3 = (rtb_y_gtq < FmgcComputer_P.CompareToConstant3_const_n); - rtb_NOT3 = !rtb_GreaterThan3; - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_flex_temp_deg, &rtb_y_dm); - rtb_y_dm = (rtb_GreaterThan3 && (rtb_y_gtq > FmgcComputer_P.CompareToConstant4_const) && rtb_y_dm); + rtb_y_od = (rtb_y_gtq < FmgcComputer_P.CompareToConstant3_const_n); + rtb_NOT3 = !rtb_y_od; + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_flex_temp_deg, &rtb_y_hi); + rtb_y_hi = (rtb_y_od && (rtb_y_gtq > FmgcComputer_P.CompareToConstant4_const) && rtb_y_hi); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault1_defaultValue_b, &rtb_y_gtq); - rtb_GreaterThan3 = (rtb_y_gtq < FmgcComputer_P.CompareToConstant5_const_a); - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_flex_temp_deg, &rtb_y_cj); - FmgcComputer_MATLABFunction_g((rtb_NOT3 || rtb_y_dm || (!rtb_GreaterThan3) || (rtb_GreaterThan3 && (rtb_y_gtq > - FmgcComputer_P.CompareToConstant6_const) && rtb_y_cj)), FmgcComputer_P.PulseNode_isRisingEdge_p, &rtb_y_ff, + rtb_y_od = (rtb_y_gtq < FmgcComputer_P.CompareToConstant5_const_a); + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_flex_temp_deg, &rtb_y_c); + FmgcComputer_MATLABFunction_g((rtb_NOT3 || rtb_y_hi || (!rtb_y_od) || (rtb_y_od && (rtb_y_gtq > + FmgcComputer_P.CompareToConstant6_const) && rtb_y_c)), FmgcComputer_P.PulseNode_isRisingEdge_p, &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_gk); - rtb_y_cq = !rtb_OR2_l; - rtb_y_ai = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active; - rtb_NOT3_tmp = (rtb_y_cq && rtb_y_ai && rtb_y_h); + rtb_y_c = !rtb_OR2_l; + rtb_y_oi = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active; + rtb_NOT3_tmp = (rtb_y_c && rtb_y_oi); rtb_NOT3 = (((FmgcComputer_U.in.fms_inputs.v_2_kts > FmgcComputer_P.CompareToConstant1_const_k) && - (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_NOT3_tmp && rtb_Compare_du && + (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_NOT3_tmp && rtb_OR2_l_tmp && rtb_y_jt && (FmgcComputer_U.in.fms_inputs.v_2_kts > FmgcComputer_P.CompareToConstant2_const) && (rtb_handleIndex >= - FmgcComputer_P.CompareToConstant_const_b) && rtb_y_ff)); + FmgcComputer_P.CompareToConstant_const_b) && rtb_Compare_bj)); FmgcComputer_MATLABFunction_a(rtb_NOT3, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_c, - FmgcComputer_P.ConfirmNode_timeDelay_h, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_fx); + FmgcComputer_P.ConfirmNode_timeDelay_h, &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_fx); Memory_PreviousInput_k_tmp_tmp = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.vs_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fpa_active); Memory_PreviousInput_k_tmp_tmp_tmp = (Memory_PreviousInput_k_tmp_tmp || @@ -1754,12 +1754,12 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active); - rtb_y_i2 = (Memory_PreviousInput_k_tmp_tmp_0 || + rtb_y_me = (Memory_PreviousInput_k_tmp_tmp_0 || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active); - FmgcComputer_DWork.Memory_PreviousInput_k = FmgcComputer_P.Logic_table_b[(((rtb_y_hy || ((rtb_y_i2 || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_ff))) + (static_cast(rtb_NOT3) << - 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_k]; + FmgcComputer_DWork.Memory_PreviousInput_k = FmgcComputer_P.Logic_table_b[(((rtb_AND10_b || ((rtb_y_me || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_Compare_bj))) + (static_cast + (rtb_NOT3) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_k]; rtb_BusAssignment_f4_logic_ir_computation_data_heading_magnetic_deg.SSM = rtb_irComputationBus_heading_magnetic_deg_SSM; rtb_BusAssignment_f4_logic_ir_computation_data_heading_magnetic_deg.Data = @@ -1770,12 +1770,12 @@ void FmgcComputer::step() rtb_BusAssignment_f4_logic_ils_computation_data_localizer_deviation_deg.Data = rtb_DataTypeConversion2_bh; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel_bit_m, &rtb_DataTypeConversion1_e); - rtb_GreaterThan3 = (rtb_DataTypeConversion1_e != 0U); + rtb_y_od = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel1_bit_g, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_a(FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge_f, FmgcComputer_P.ConfirmNode1_timeDelay_ex, - &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_ngt); + &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_ngt); FmgcComputer_MATLABFunction(&rtb_BusAssignment_f4_logic_ils_computation_data_runway_heading_deg, FmgcComputer_P.A429ValueOrDefault1_defaultValue_m, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_f4_logic_ir_computation_data_heading_magnetic_deg, @@ -1784,23 +1784,23 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction(&rtb_BusAssignment_f4_logic_ils_computation_data_localizer_deviation_deg, FmgcComputer_P.A429ValueOrDefault_defaultValue_e, &rtb_y_gtq); FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_f4_logic_ils_computation_data_localizer_deviation_deg, &rtb_NOT3); - FmgcComputer_MATLABFunction_a(rtb_y_km, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_p, - FmgcComputer_P.ConfirmNode_timeDelay_o, &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_fm); + FmgcComputer_MATLABFunction_a(rtb_y_mj, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_p, + FmgcComputer_P.ConfirmNode_timeDelay_o, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_fm); if (rtb_y_gtq < 0.0F) { rtb_DataTypeConversion8 = -rtb_y_gtq; } else { rtb_DataTypeConversion8 = rtb_y_gtq; } - rtb_NOT3 = ((rtb_GreaterThan3 && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && + rtb_NOT3 = ((rtb_y_od && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_c && (!FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_loc_submode_active) && ((rtb_handleIndex >= - FmgcComputer_P.CompareToConstant_const_cq) && rtb_y_ff && (rtb_DataTypeConversion2_kb <= + FmgcComputer_P.CompareToConstant_const_cq) && rtb_Compare_bj && (rtb_DataTypeConversion2_kb <= FmgcComputer_P.CompareToConstant2_const_b) && (rtb_DataTypeConversion8 < FmgcComputer_P.CompareToConstant1_const_i) - && FmgcComputer_P.Constant_Value_j && rtb_NOT3 && rtb_Compare_du))); + && FmgcComputer_P.Constant_Value_j && rtb_NOT3 && rtb_y_jt))); FmgcComputer_MATLABFunction_a(rtb_NOT3, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_l, - FmgcComputer_P.ConfirmNode_timeDelay_f, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_jl); - FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_f4_logic_ils_computation_data_localizer_deviation_deg, &rtb_y_dm); - FmgcComputer_DWork.Memory_PreviousInput_c = FmgcComputer_P.Logic_table_hz[(((((!rtb_y_ff) && + FmgcComputer_P.ConfirmNode_timeDelay_f, &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_jl); + FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_f4_logic_ils_computation_data_localizer_deviation_deg, &rtb_y_hi); + FmgcComputer_DWork.Memory_PreviousInput_c = FmgcComputer_P.Logic_table_hz[(((((!rtb_Compare_bj) && (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_trk_submode_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.roll_goaround_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || @@ -1808,27 +1808,27 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_y_hy || (!rtb_y_dm)) + (static_cast - (rtb_NOT3) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_c]; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_AND10_b || (!rtb_y_hi)) + + (static_cast(rtb_NOT3) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_c]; rtb_BusAssignment_na_logic_ra_computation_data_radio_height_ft.SSM = rtb_raComputationData_radio_height_ft_SSM; rtb_BusAssignment_na_logic_ra_computation_data_radio_height_ft.Data = rtb_raComputationData_radio_height_ft_Data; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel_bit_f, &rtb_DataTypeConversion1_e); - rtb_GreaterThan3 = (rtb_DataTypeConversion1_e != 0U); + rtb_y_od = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel1_bit_n, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_na_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); FmgcComputer_MATLABFunction_g((rtb_y_gtq >= FmgcComputer_P.CompareToConstant_const_l0), - FmgcComputer_P.PulseNode_isRisingEdge_b, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_fh); - FmgcComputer_MATLABFunction_m(rtb_y_ff, FmgcComputer_U.in.time.dt, &rtb_Compare_du, + FmgcComputer_P.PulseNode_isRisingEdge_b, &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_fh); + FmgcComputer_MATLABFunction_m(rtb_Compare_bj, FmgcComputer_U.in.time.dt, &rtb_y_jt, FmgcComputer_P.MTrigNode_isRisingEdge_jv, FmgcComputer_P.MTrigNode_retriggerable_p, FmgcComputer_P.MTrigNode_triggerDuration_n, &FmgcComputer_DWork.sf_MATLABFunction_mnt); rtb_NOT3_tmp_0 = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active; - rtb_NOT3 = ((rtb_GreaterThan3 && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && (rtb_NOT3_tmp_0 && - (!FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed)) && rtb_Compare_du)); + rtb_NOT3 = ((rtb_y_od && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_c && (rtb_NOT3_tmp_0 && + (!FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed)) && rtb_y_jt)); FmgcComputer_MATLABFunction_a(rtb_NOT3, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_hu, - FmgcComputer_P.ConfirmNode_timeDelay_j, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_kz1); - FmgcComputer_DWork.Memory_PreviousInput_b = FmgcComputer_P.Logic_table_d[(((((!rtb_y_ff) && + FmgcComputer_P.ConfirmNode_timeDelay_j, &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_kz1); + FmgcComputer_DWork.Memory_PreviousInput_b = FmgcComputer_P.Logic_table_d[(((((!rtb_Compare_bj) && (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_loc_submode_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.roll_goaround_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || @@ -1836,27 +1836,27 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_y_hy) + (static_cast(rtb_NOT3) << 1)) - << 1) + FmgcComputer_DWork.Memory_PreviousInput_b]; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_AND10_b) + (static_cast(rtb_NOT3) << + 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_b]; rtb_NOT3 = rtb_NOT_b; - rtb_y_dm = rtb_Compare_a5; - rtb_y_cj = (FmgcComputer_DWork.Memory_PreviousInput_c || FmgcComputer_DWork.Memory_PreviousInput_b); + rtb_y_hi = (FmgcComputer_DWork.Memory_PreviousInput_c || FmgcComputer_DWork.Memory_PreviousInput_b); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_k, &rtb_DataTypeConversion1_e); rtb_y_j = ((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l); FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_na_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_br, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_l, - &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_hh); + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_l, &rtb_NOT_b, + &FmgcComputer_DWork.sf_MATLABFunction_hh); FmgcComputer_MATLABFunction_a(FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed, FmgcComputer_U.in.time.dt, - FmgcComputer_P.ConfirmNode_isRisingEdge_f, FmgcComputer_P.ConfirmNode_timeDelay_d, &rtb_y_ff, + FmgcComputer_P.ConfirmNode_isRisingEdge_f, FmgcComputer_P.ConfirmNode_timeDelay_d, &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_ha); - rtb_AND9 = !rtb_BusAssignment_h_logic_engine_running; + rtb_OR_iw = !rtb_BusAssignment_h_logic_engine_running; rtb_AND1_c0 = !rtb_BusAssignment_o_logic_ils_failure; - rtb_Compare_d2 = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active; - rtb_y_da = (FmgcComputer_P.Constant_Value_l && rtb_AND1_c0 && (rtb_AND9 || (rtb_y_gtq >= - FmgcComputer_P.CompareToConstant_const_gv)) && rtb_Compare_mh && rtb_Compare_a5 && (!rtb_y_ff) && (rtb_Compare_d2 && + rtb_Compare_d0 = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active; + rtb_y_j1 = ((FmgcComputer_U.in.fms_inputs.selected_approach_type == FmgcComputer_P.EnumeratedConstant_Value_a) && + rtb_AND1_c0 && (rtb_OR_iw || (rtb_y_gtq >= FmgcComputer_P.CompareToConstant_const_gv)) && rtb_Compare_ov + && rtb_NOT_b && (!rtb_Compare_bj) && (rtb_Compare_d0 && (!FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed))); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.ils_opp_bus.ils_frequency_mhz, FmgcComputer_P.A429ValueOrDefault_defaultValue_ek, &rtb_y_mw); @@ -1866,9 +1866,9 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault2_defaultValue_c, &rtb_y_jq); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.ils_own_bus.runway_heading_deg, FmgcComputer_P.A429ValueOrDefault3_defaultValue_o, &rtb_y_gtq); - rtb_NOT_b = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active); - rtb_y_a0_tmp = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || + rtb_GreaterThan3 = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active); + rtb_y_lh_tmp = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active); FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.vs_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fpa_active || @@ -1876,122 +1876,125 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active), FmgcComputer_P.PulseNode2_isRisingEdge_e, - &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_kb); + &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_kb); FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active), FmgcComputer_P.PulseNode3_isRisingEdge_j, &rtb_y_ff, - &FmgcComputer_DWork.sf_MATLABFunction_eb2); - rtb_AND8 = (rtb_y_a0_tmp && rtb_y_ff); + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active), FmgcComputer_P.PulseNode3_isRisingEdge_j, + &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_eb2); + rtb_AND8 = (rtb_y_lh_tmp && rtb_Compare_bj); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel1_bit_l, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_c, &rtb_y_ff, - &FmgcComputer_DWork.sf_MATLABFunction_es); - rtb_GreaterThan3 = !FmgcComputer_P.Constant2_Value_p; + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_c, + &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_es); + rtb_y_od = !FmgcComputer_P.Constant2_Value_p; Memory_PreviousInput_l_tmp = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_active; - rtb_AND12 = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.roll_goaround_active; + Memory_PreviousInput_l_tmp_0 = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.roll_goaround_active; FmgcComputer_DWork.Memory_PreviousInput_l = FmgcComputer_P.Logic_table_k[(((static_cast(rtb_appInop_idx_2 && - (rtb_y_j || (rtb_y_cq && rtb_y_da && rtb_y_ai && rtb_y_h && Memory_PreviousInput_l_tmp && rtb_AND12 && - rtb_GreaterThan3 && rtb_GreaterThan3 && (((rtb_y_mw == rtb_y_fl) && (rtb_y_jq == rtb_y_gtq)) || - (!rtb_BusAssignment_o_logic_both_ils_valid))))) << 1) + (rtb_y_hh || ((!rtb_NOT_b) && (!rtb_y_a0_tmp) && - FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed) || ((rtb_NOT_b && rtb_Compare_du) || rtb_AND8) || - (rtb_Compare_a5 && FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed) || rtb_y_ff || rtb_y_hy || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_l]; + (rtb_y_j || (rtb_y_c && rtb_y_j1 && rtb_y_oi && rtb_OR2_l_tmp && Memory_PreviousInput_l_tmp && + Memory_PreviousInput_l_tmp_0 && rtb_y_od && rtb_y_od && (((rtb_y_mw == rtb_y_fl) && (rtb_y_jq == + rtb_y_gtq)) || (!rtb_BusAssignment_o_logic_both_ils_valid))))) << 1) + (rtb_y_js || ((!rtb_GreaterThan3) && + (!rtb_y_lh_tmp) && FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed) || ((rtb_GreaterThan3 && rtb_y_jt) || + rtb_AND8) || (rtb_NOT_b && FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed) || rtb_Compare_bj || + rtb_AND10_b || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active)) << 1) + + FmgcComputer_DWork.Memory_PreviousInput_l]; FmgcComputer_MATLABFunction_a(!FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active, FmgcComputer_U.in.time.dt, - FmgcComputer_P.ConfirmNode_isRisingEdge_e, FmgcComputer_P.ConfirmNode_timeDelay_l, &rtb_Compare_du, + FmgcComputer_P.ConfirmNode_isRisingEdge_e, FmgcComputer_P.ConfirmNode_timeDelay_l, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_mq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_4, FmgcComputer_P.BitfromLabel_bit_ff, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_na_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); FmgcComputer_MATLABFunction_a((rtb_y_gtq < FmgcComputer_P.CompareToConstant_const_dt), FmgcComputer_U.in.time.dt, - FmgcComputer_P.ConfirmNode1_isRisingEdge_g, FmgcComputer_P.ConfirmNode1_timeDelay_d, &rtb_y_ff, + FmgcComputer_P.ConfirmNode1_isRisingEdge_g, FmgcComputer_P.ConfirmNode1_timeDelay_d, &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_cr); - rtb_y_j = (rtb_Compare_du && (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && + rtb_y_j = (rtb_y_jt && (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_c && FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active && - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active && rtb_y_ff))); + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active && rtb_Compare_bj))); FmgcComputer_MATLABFunction_a(rtb_y_j, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_d, - FmgcComputer_P.ConfirmNode_timeDelay_a, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_op); - rtb_Compare_a5 = !rtb_y_ff; + FmgcComputer_P.ConfirmNode_timeDelay_a, &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_op); + rtb_y_j1 = !rtb_Compare_bj; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_ft, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_a, &rtb_y_ff, - &FmgcComputer_DWork.sf_MATLABFunction_fa); - FmgcComputer_MATLABFunction_a(rtb_y_km, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode2_isRisingEdge_l, - FmgcComputer_P.ConfirmNode2_timeDelay_b, &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_fo0); + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_a, + &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_fa); + FmgcComputer_MATLABFunction_a(rtb_y_mj, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode2_isRisingEdge_l, + FmgcComputer_P.ConfirmNode2_timeDelay_b, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_fo0); Memory_PreviousInput_d_tmp_tmp = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.roll_goaround_active); rtb_AND8 = (Memory_PreviousInput_d_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active); Memory_PreviousInput_d_tmp = (rtb_AND8 || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active); - FmgcComputer_DWork.Memory_PreviousInput_d = FmgcComputer_P.Logic_table_p[(((((rtb_y_i2 || + FmgcComputer_DWork.Memory_PreviousInput_d = FmgcComputer_P.Logic_table_p[(((((rtb_y_me || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || (Memory_PreviousInput_d_tmp || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active)) && rtb_Compare_a5) || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || (rtb_Compare_fn && rtb_y_oi && - rtb_y_ff && rtb_Compare_du) || rtb_y_hy) + (static_cast(rtb_y_j) << 1)) << 1) + + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active)) && rtb_y_j1) || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || (rtb_Compare_gc && rtb_y_pw && + rtb_Compare_bj && rtb_y_jt) || rtb_AND10_b) + (static_cast(rtb_y_j) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_d]; FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_na_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); - rtb_y_hh = (FmgcComputer_U.in.discrete_inputs.bscu_opp_valid || FmgcComputer_U.in.discrete_inputs.bscu_own_valid); + rtb_y_js = (FmgcComputer_U.in.discrete_inputs.bscu_opp_valid || FmgcComputer_U.in.discrete_inputs.bscu_own_valid); FmgcComputer_MATLABFunction_a((FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active && (rtb_y_gtq <= FmgcComputer_P.CompareToConstant2_const_i0) && (((FmgcComputer_U.in.discrete_inputs.left_wheel_spd_abv_70_kts || - FmgcComputer_U.in.discrete_inputs.right_wheel_spd_abv_70_kts) && rtb_y_hh) || ((!rtb_y_hh) && rtb_y_km))), + FmgcComputer_U.in.discrete_inputs.right_wheel_spd_abv_70_kts) && rtb_y_js) || ((!rtb_y_js) && rtb_y_mj))), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge_bk, FmgcComputer_P.ConfirmNode1_timeDelay_ef, &rtb_y_j, &FmgcComputer_DWork.sf_MATLABFunction_mb); FmgcComputer_DWork.Memory_PreviousInput_m = FmgcComputer_P.Logic_table_m[(((static_cast(rtb_y_j) << 1) + rtb_appInop_idx_2) << 1) + FmgcComputer_DWork.Memory_PreviousInput_m]; FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_na_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); - rtb_NOT_c = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active && (rtb_y_gtq <= - FmgcComputer_P.CompareToConstant1_const_ht) && rtb_NOT_c); - rtb_y_j = (rtb_Compare_mh && FmgcComputer_DWork.Delay2_DSTATE.flare_law.condition_Flare && + rtb_GreaterThan3_e = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active && (rtb_y_gtq <= + FmgcComputer_P.CompareToConstant1_const_ht) && rtb_GreaterThan3_e); + rtb_y_j = (rtb_Compare_ov && FmgcComputer_DWork.Delay2_DSTATE.flare_law.condition_Flare && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active); FmgcComputer_MATLABFunction_a(rtb_y_j, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge_d, - FmgcComputer_P.ConfirmNode1_timeDelay_dj, &rtb_y_da, &FmgcComputer_DWork.sf_MATLABFunction_j2); - FmgcComputer_DWork.Memory_PreviousInput_bc = FmgcComputer_P.Logic_table_bp[(((static_cast(rtb_y_da) << 1) + FmgcComputer_P.ConfirmNode1_timeDelay_dj, &rtb_y_j1, &FmgcComputer_DWork.sf_MATLABFunction_j2); + FmgcComputer_DWork.Memory_PreviousInput_bc = FmgcComputer_P.Logic_table_bp[(((static_cast(rtb_y_j1) << 1) + rtb_appInop_idx_2) << 1) + FmgcComputer_DWork.Memory_PreviousInput_bc]; rtb_y_j = (rtb_y_j || FmgcComputer_DWork.Memory_PreviousInput_bc); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_l, &rtb_DataTypeConversion1_e); - rtb_GreaterThan3 = ((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l); + rtb_y_od = ((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l); + rtb_y_pw = (FmgcComputer_U.in.fms_inputs.selected_approach_type == FmgcComputer_P.EnumeratedConstant_Value_f); FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_na_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); - rtb_y_oi = (rtb_AND9 || (rtb_y_gtq >= FmgcComputer_P.CompareToConstant_const_lj) || raOwnInvalid); + rtb_NOT_b = rtb_OR2_l_tmp; FmgcComputer_MATLABFunction_a(FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed, FmgcComputer_U.in.time.dt, - FmgcComputer_P.ConfirmNode_isRisingEdge_le, FmgcComputer_P.ConfirmNode_timeDelay_n, &rtb_y_ff, + FmgcComputer_P.ConfirmNode_isRisingEdge_le, FmgcComputer_P.ConfirmNode_timeDelay_n, &rtb_y_me, &FmgcComputer_DWork.sf_MATLABFunction_pu); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_e, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_h, &rtb_y_me, + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_h, &rtb_y_bk, &FmgcComputer_DWork.sf_MATLABFunction_d3); - rtb_y_i2 = (rtb_y_cq && FmgcComputer_U.in.fms_inputs.lateral_flight_plan_valid); - rtb_NOT_b = (rtb_appInop_idx_2 && (rtb_GreaterThan3 || (rtb_y_i2 && - FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && FmgcComputer_P.Constant_Value_hg && rtb_y_oi && - rtb_OR2_l_tmp && (rtb_y_ai && Memory_PreviousInput_l_tmp && rtb_y_h && rtb_AND12 && rtb_Compare_d2 && (!rtb_y_ff) && - rtb_y_me)))); + rtb_AND12 = (rtb_y_c && FmgcComputer_U.in.fms_inputs.lateral_flight_plan_valid); + rtb_y_js = (rtb_AND12 && FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && rtb_y_pw && (rtb_OR_iw || + (rtb_y_gtq >= FmgcComputer_P.CompareToConstant_const_lj) || raOwnInvalid) && rtb_OR2_l_tmp_0 && (rtb_y_oi && + Memory_PreviousInput_l_tmp && rtb_OR2_l_tmp && Memory_PreviousInput_l_tmp_0 && rtb_Compare_d0 && (!rtb_y_me) && + rtb_y_bk)); + rtb_GreaterThan3 = (rtb_appInop_idx_2 && (rtb_y_od || rtb_y_js)); FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active), FmgcComputer_P.PulseNode3_isRisingEdge_k, &rtb_y_ff, + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active), FmgcComputer_P.PulseNode3_isRisingEdge_k, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_bbv); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel1_bit_o, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_li, - &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_bk); - rtb_Compare_bm = !FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid; + &rtb_y_od, &FmgcComputer_DWork.sf_MATLABFunction_bk); + rtb_Compare_kg = !FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid; FmgcComputer_DWork.Memory_PreviousInput_dv = FmgcComputer_P.Logic_table_c [(((FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || rtb_Compare_bm || rtb_y_ff || - (rtb_y_me && FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed) || rtb_GreaterThan3 || rtb_y_hy || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active) + (static_cast(rtb_NOT_b) << 1)) << - 1) + FmgcComputer_DWork.Memory_PreviousInput_dv]; + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || rtb_Compare_kg || rtb_NOT_b || + (rtb_y_bk && FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed) || rtb_y_od || rtb_AND10_b || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active) + (static_cast(rtb_GreaterThan3) << + 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_dv]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel_bit_a, &rtb_DataTypeConversion1_e); - rtb_Compare_a5 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && + rtb_y_jt = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_c && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed && FmgcComputer_U.in.fms_inputs.final_app_can_engage && (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant_Value_i))); - FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ha, + FmgcComputer_MATLABFunction_a(rtb_y_jt, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ha, FmgcComputer_P.ConfirmNode_timeDelay_on, &rtb_y_me, &FmgcComputer_DWork.sf_MATLABFunction_mm); absVsTarget_tmp = (Memory_PreviousInput_k_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_hold_active); absVsTarget_tmp_tmp = (absVsTarget_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active); - absVsTarget_tmp_0 = (absVsTarget_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active); - absVsTarget = static_cast((((rtb_y_hy || ((absVsTarget_tmp_0 || + rtb_y_bk = (absVsTarget_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active); + absVsTarget = static_cast((((rtb_AND10_b || ((rtb_y_bk || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || @@ -2002,203 +2005,211 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_me))) + (static_cast - (rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_f); + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_me))) + (static_cast(rtb_y_jt) << + 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_f); rtb_Logic_b[0U] = FmgcComputer_P.Logic_table_pl[static_cast(absVsTarget)]; rtb_Logic_b[1U] = FmgcComputer_P.Logic_table_pl[static_cast(absVsTarget) + 8U]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel_bit_cs, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_a(rtb_y_km, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_m, - FmgcComputer_P.ConfirmNode_timeDelay_j5, &rtb_y_oi, &FmgcComputer_DWork.sf_MATLABFunction_hvs); - rtb_y_hh = (rtb_handleIndex >= FmgcComputer_P.CompareToConstant_const_ja); + rtb_GreaterThan3 = rtb_OR2_l_tmp; + FmgcComputer_MATLABFunction_a(rtb_y_mj, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_m, + FmgcComputer_P.ConfirmNode_timeDelay_j5, &rtb_y_pw, &FmgcComputer_DWork.sf_MATLABFunction_hvs); + rtb_y_od = (rtb_handleIndex >= FmgcComputer_P.CompareToConstant_const_ja); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault_defaultValue_p, &rtb_y_gtq); - rtb_Compare_a5 = (rtb_y_gtq >= FmgcComputer_P.CompareToConstant3_const_i); + rtb_y_jt = (rtb_y_gtq >= FmgcComputer_P.CompareToConstant3_const_i); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault1_defaultValue_d, &rtb_y_gtq); - FmgcComputer_MATLABFunction_g((rtb_Compare_a5 || (rtb_y_gtq >= FmgcComputer_P.CompareToConstant5_const_k)), - FmgcComputer_P.PulseNode_isRisingEdge_c, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_fn5); - rtb_Compare_a5 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_NOT3_tmp && (!rtb_y_oi) && rtb_y_hh && - rtb_y_ff)); - FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_hj, - FmgcComputer_P.ConfirmNode_timeDelay_a3, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_lml); - FmgcComputer_DWork.Memory_PreviousInput_i = FmgcComputer_P.Logic_table_o[((((rtb_y_hy || + FmgcComputer_MATLABFunction_g((rtb_y_jt || (rtb_y_gtq >= FmgcComputer_P.CompareToConstant5_const_k)), + FmgcComputer_P.PulseNode_isRisingEdge_c, &rtb_y_js, &FmgcComputer_DWork.sf_MATLABFunction_fn5); + rtb_OR_iw = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_NOT3_tmp && rtb_OR2_l_tmp && (!rtb_y_pw) && + rtb_y_od && rtb_y_js)); + FmgcComputer_MATLABFunction_a(rtb_OR_iw, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_hj, + FmgcComputer_P.ConfirmNode_timeDelay_a3, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_lml); + FmgcComputer_DWork.Memory_PreviousInput_i = FmgcComputer_P.Logic_table_o[((((rtb_AND10_b || (Memory_PreviousInput_k_tmp_tmp_0 || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) && (!rtb_y_ff)) + (static_cast - (rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_i]; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) && (!rtb_y_jt)) + (static_cast(rtb_OR_iw) << + 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_i]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel_bit_e, &rtb_DataTypeConversion1_e); + rtb_y_jt = rtb_y_c; FmgcComputer_MATLABFunction_m(FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active, - FmgcComputer_U.in.time.dt, &rtb_y_ff, FmgcComputer_P.MTrigNode_isRisingEdge_d, + FmgcComputer_U.in.time.dt, &rtb_GreaterThan3, FmgcComputer_P.MTrigNode_isRisingEdge_d, FmgcComputer_P.MTrigNode_retriggerable_h, FmgcComputer_P.MTrigNode_triggerDuration_a, &FmgcComputer_DWork.sf_MATLABFunction_e3); - rtb_Compare_a5 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && (rtb_AND12 && rtb_NOT3_tmp_0 && ( - !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active) && - (!FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active) && rtb_y_ff))); - FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_mf, - FmgcComputer_P.ConfirmNode_timeDelay_dw, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_mtz); - FmgcComputer_DWork.Memory_PreviousInput_el = FmgcComputer_P.Logic_table_c2[(((rtb_y_hy || + rtb_OR_iw = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_c && (Memory_PreviousInput_l_tmp_0 && + rtb_NOT3_tmp_0 && (!FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active) && + (!FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active) && rtb_GreaterThan3))); + FmgcComputer_MATLABFunction_a(rtb_OR_iw, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_mf, + FmgcComputer_P.ConfirmNode_timeDelay_dw, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_mtz); + FmgcComputer_DWork.Memory_PreviousInput_el = FmgcComputer_P.Logic_table_c2[(((rtb_AND10_b || ((FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_ff))) + (static_cast - (rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_el]; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_jt))) + (static_cast(rtb_OR_iw) << + 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_el]; rtb_BusAssignment_cp_logic_ra_computation_data_radio_height_ft.SSM = rtb_raComputationData_radio_height_ft_SSM; rtb_BusAssignment_cp_logic_ra_computation_data_radio_height_ft.Data = rtb_raComputationData_radio_height_ft_Data; FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active), FmgcComputer_P.PulseNode3_isRisingEdge_l, &rtb_y_hh, + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active), FmgcComputer_P.PulseNode3_isRisingEdge_l, &rtb_y_od, &FmgcComputer_DWork.sf_MATLABFunction_gb); - Memory_PreviousInput_k_tmp_tmp_0 = ((!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.vs_active) && + Memory_PreviousInput_l_tmp = (Memory_PreviousInput_l_tmp && Memory_PreviousInput_l_tmp_0); + rtb_NOT_b = (Memory_PreviousInput_l_tmp && rtb_NOT3_tmp_0 && rtb_appInop_idx_2); + rtb_GreaterThan3_tmp = ((!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.vs_active) && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fpa_active)); rtb_y_me = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active; - rtb_GreaterThan3 = (Memory_PreviousInput_k_tmp_tmp_0 && - (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active) && + rtb_GreaterThan3 = (rtb_GreaterThan3_tmp && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active) && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active) && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active) && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active) && rtb_y_me && (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active)); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel4_bit_k, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_m((rtb_DataTypeConversion1_e != 0U), FmgcComputer_U.in.time.dt, &rtb_y_ff, + FmgcComputer_MATLABFunction_m((rtb_DataTypeConversion1_e != 0U), FmgcComputer_U.in.time.dt, &rtb_y_js, FmgcComputer_P.MTrigNode_isRisingEdge_g, FmgcComputer_P.MTrigNode_retriggerable_f, FmgcComputer_P.MTrigNode_triggerDuration_bm, &FmgcComputer_DWork.sf_MATLABFunction_aw); - rtb_Compare_du = (Memory_PreviousInput_l_tmp && rtb_AND12); - rtb_y_da = (rtb_y_a0_tmp && rtb_y_hh && (rtb_Compare_du && rtb_NOT3_tmp_0 && rtb_appInop_idx_2) && rtb_GreaterThan3 && - (!rtb_y_ff)); + rtb_OR_iw = (rtb_y_lh_tmp && rtb_y_od && rtb_NOT_b && rtb_GreaterThan3 && (!rtb_y_js)); FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active), FmgcComputer_P.PulseNode5_isRisingEdge_h, - &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_aj); - Memory_PreviousInput_l_tmp = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active; - rtb_NOT3_tmp = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active; - rtb_GreaterThan3 = (rtb_GreaterThan3 && rtb_y_ff && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && - (rtb_Compare_du && Memory_PreviousInput_l_tmp && rtb_NOT3_tmp && rtb_appInop_idx_2)); - rtb_Compare_a5 = rtb_y_a0_tmp; - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode2_isRisingEdge_b, &rtb_y_ff, + &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_aj); + rtb_y_jt = rtb_y_lh_tmp; + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode2_isRisingEdge_b, &rtb_y_js, &FmgcComputer_DWork.sf_MATLABFunction_at); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel5_bit_f, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_j, - &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_o3); - rtb_OR2_l_tmp = !FmgcComputer_U.in.fms_inputs.lateral_flight_plan_valid; - rtb_Compare_du = ((FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && rtb_OR2_l_tmp && rtb_Compare_d2) || - rtb_y_da || rtb_GreaterThan3 || (rtb_y_a0_tmp && rtb_NOT_gj && rtb_y_ff) || + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_j, &rtb_y_jt, + &FmgcComputer_DWork.sf_MATLABFunction_o3); + rtb_OR2_l_tmp_0 = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active; + rtb_AND10_b = !FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active; + rtb_NOT3_tmp = !FmgcComputer_U.in.fms_inputs.lateral_flight_plan_valid; + rtb_Compare_bj = ((FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && rtb_NOT3_tmp && rtb_Compare_d0) || + rtb_OR_iw || (rtb_GreaterThan3 && rtb_NOT_b && + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && (Memory_PreviousInput_l_tmp && rtb_OR2_l_tmp_0 && + rtb_AND10_b && rtb_appInop_idx_2)) || (rtb_y_lh_tmp && rtb_OR2_l_tmp_1 && rtb_y_js) || (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active && rtb_Compare_a5)); + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active && rtb_y_jt)); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel_bit_pg, &rtb_DataTypeConversion1_e); - rtb_Compare_a5 = (rtb_DataTypeConversion1_e != 0U); + rtb_y_jt = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel1_bit_ok, &rtb_DataTypeConversion1_e); - rtb_Compare_a5 = (rtb_Compare_a5 || (rtb_DataTypeConversion1_e != 0U)); + rtb_y_jt = (rtb_y_jt || (rtb_DataTypeConversion1_e != 0U)); + rtb_NOT_b = rtb_y_c; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel2_bit_i, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_i, &rtb_y_ff, + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_i, &rtb_y_js, &FmgcComputer_DWork.sf_MATLABFunction_di2); FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_cp_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); - rtb_GreaterThan3 = (rtb_y_e && rtb_y_ff && rtb_appInop_idx_2 && (rtb_AND12 || (rtb_y_gtq >= + rtb_GreaterThan3 = (rtb_y_ogh && rtb_y_js && rtb_appInop_idx_2 && (Memory_PreviousInput_l_tmp_0 || (rtb_y_gtq >= FmgcComputer_P.CompareToConstant_const_a))); - rtb_y_hh = rtb_OR_m4; - FmgcComputer_MATLABFunction_g(rtb_y_fd, FmgcComputer_P.PulseNode4_isRisingEdge_e, &rtb_y_ff, + rtb_y_od = rtb_OR_i; + FmgcComputer_MATLABFunction_g(rtb_y_dk, FmgcComputer_P.PulseNode4_isRisingEdge_e, &rtb_y_pw, &FmgcComputer_DWork.sf_MATLABFunction_a5); - rtb_y_lh_tmp = !FmgcComputer_DWork.Delay_DSTATE.any_lateral_mode_engaged; - rtb_y_oi = (rtb_y_lh_tmp && rtb_y_h); - rtb_Compare_a5 = ((rtb_Compare_a5 && rtb_OR2_l) || (rtb_y_cq && (rtb_GreaterThan3 || (rtb_OR_m4 && rtb_y_ff && - rtb_y_oi) || rtb_Compare_du))); - FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_a, - FmgcComputer_P.ConfirmNode_timeDelay_a2, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_hdw); - FmgcComputer_DWork.Memory_PreviousInput_f2 = FmgcComputer_P.Logic_table_i[(((((!rtb_y_ff) && (rtb_AND8 || + rtb_y_dk = !FmgcComputer_DWork.Delay_DSTATE.any_lateral_mode_engaged; + rtb_y_js = (rtb_y_dk && rtb_OR2_l_tmp); + rtb_y_jt = ((rtb_y_jt && rtb_OR2_l) || (rtb_y_c && (rtb_GreaterThan3 || (rtb_OR_i && rtb_y_pw && rtb_y_js) || + rtb_Compare_bj))); + FmgcComputer_MATLABFunction_a(rtb_y_jt, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_a, + FmgcComputer_P.ConfirmNode_timeDelay_a2, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_hdw); + FmgcComputer_DWork.Memory_PreviousInput_f2 = FmgcComputer_P.Logic_table_i[(((((!rtb_NOT_b) && (rtb_AND8 || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_y_hy) + (static_cast(rtb_Compare_a5) << - 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_f2]; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset) + + (static_cast(rtb_y_jt) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_f2]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_k, &rtb_DataTypeConversion1_e); - rtb_y_da = ((rtb_DataTypeConversion1_e != 0U) && FmgcComputer_DWork.Memory_PreviousInput_f2); - rtb_AND9 = (FmgcComputer_DWork.Memory_PreviousInput_f2 && (rtb_DataTypeConversion1_e == 0U)); - rtb_AND8 = rtb_Compare_du; + rtb_OR_iw = ((rtb_DataTypeConversion1_e != 0U) && FmgcComputer_DWork.Memory_PreviousInput_f2); + rtb_y_j1 = (FmgcComputer_DWork.Memory_PreviousInput_f2 && (rtb_DataTypeConversion1_e == 0U)); + rtb_AND8 = rtb_Compare_bj; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_fu, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel2_bit_m, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_j, &rtb_y_hh, + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_j, &rtb_y_js, &FmgcComputer_DWork.sf_MATLABFunction_m1w); FmgcComputer_MATLABFunction_g(FmgcComputer_U.in.fms_inputs.lateral_flight_plan_valid, - FmgcComputer_P.PulseNode3_isRisingEdge_e, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_hu); - rtb_GreaterThan3 = !FmgcComputer_DWork.Delay_DSTATE.hdg_trk_preset_available; - rtb_NOT_b = (rtb_GreaterThan3 || rtb_y_ff); + FmgcComputer_P.PulseNode3_isRisingEdge_e, &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_hu); + Memory_PreviousInput_l_tmp = !FmgcComputer_DWork.Delay_DSTATE.hdg_trk_preset_available; + rtb_NOT_b = (Memory_PreviousInput_l_tmp || rtb_GreaterThan3); FmgcComputer_MATLABFunction_g(FmgcComputer_DWork.Delay_DSTATE.armed_modes.final_des_armed, - FmgcComputer_P.PulseNode4_isRisingEdge_b, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_idz); + FmgcComputer_P.PulseNode4_isRisingEdge_b, &rtb_y_od, &FmgcComputer_DWork.sf_MATLABFunction_idz); FmgcComputer_MATLABFunction_m(FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active, - FmgcComputer_U.in.time.dt, &rtb_y_oi, FmgcComputer_P.MTrigNode_isRisingEdge_i, + FmgcComputer_U.in.time.dt, &rtb_y_pw, FmgcComputer_P.MTrigNode_isRisingEdge_i, FmgcComputer_P.MTrigNode_retriggerable_a, FmgcComputer_P.MTrigNode_triggerDuration_l, &FmgcComputer_DWork.sf_MATLABFunction_fi); - rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || (rtb_y_i2 && ((Memory_PreviousInput_l_tmp && rtb_NOT3_tmp && - rtb_appInop_idx_2 && rtb_y_hh) || (rtb_y_km && rtb_NOT_b && (rtb_y_lh_tmp || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_loc_submode_active)) || rtb_y_ff || (rtb_y_oi && - rtb_GreaterThan3)))); + rtb_GreaterThan3 = Memory_PreviousInput_l_tmp; + rtb_Compare_bj = ((rtb_Compare_bj && rtb_OR2_l) || (rtb_AND12 && ((rtb_OR2_l_tmp_0 && rtb_AND10_b && + rtb_appInop_idx_2 && rtb_y_js) || (rtb_y_mj && rtb_NOT_b && (rtb_y_dk || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_loc_submode_active)) || rtb_y_od || (rtb_y_pw && + Memory_PreviousInput_l_tmp)))); FmgcComputer_MATLABFunction_g(FmgcComputer_DWork.Delay_DSTATE.hdg_trk_preset_available, - FmgcComputer_P.PulseNode2_isRisingEdge_i, &rtb_y_hh, &FmgcComputer_DWork.sf_MATLABFunction_h0); + FmgcComputer_P.PulseNode2_isRisingEdge_i, &rtb_y_js, &FmgcComputer_DWork.sf_MATLABFunction_h0); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel1_bit_p, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_k, &rtb_y_oi, + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_k, &rtb_y_pw, &FmgcComputer_DWork.sf_MATLABFunction_jle); FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active || FmgcComputer_DWork.Delay_DSTATE.armed_modes.loc_armed || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active), - FmgcComputer_P.PulseNode6_isRisingEdge, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_jd); + FmgcComputer_P.PulseNode6_isRisingEdge, &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_jd); FmgcComputer_MATLABFunction_g(FmgcComputer_DWork.Memory_PreviousInput_dv, FmgcComputer_P.PulseNode5_isRisingEdge_a, - &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_ew); - FmgcComputer_DWork.Memory_PreviousInput_i1 = FmgcComputer_P.Logic_table_g[(((rtb_y_hh || rtb_y_oi || rtb_y_ff || - rtb_OR2_l_tmp || rtb_GreaterThan3 || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || - rtb_appCapability_idx_2) + (static_cast(rtb_Compare_du) << 1)) << 1) + + &rtb_y_od, &FmgcComputer_DWork.sf_MATLABFunction_ew); + rtb_NOT_b = FmgcComputer_DWork.Memory_PreviousInput_i1; + FmgcComputer_DWork.Memory_PreviousInput_i1 = FmgcComputer_P.Logic_table_g[(((rtb_y_js || rtb_y_pw || + rtb_GreaterThan3 || rtb_NOT3_tmp || rtb_y_od || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || + rtb_appCapability_idx_2) + (static_cast(rtb_Compare_bj) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_i1]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel_bit_nk, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_m(FmgcComputer_U.in.fms_inputs.direct_to_nav_engage, FmgcComputer_U.in.time.dt, - &rtb_y_ff, FmgcComputer_P.MTrigNode_isRisingEdge_h, FmgcComputer_P.MTrigNode_retriggerable_g, + &rtb_NOT_b, FmgcComputer_P.MTrigNode_isRisingEdge_h, FmgcComputer_P.MTrigNode_retriggerable_g, FmgcComputer_P.MTrigNode_triggerDuration_e, &FmgcComputer_DWork.sf_MATLABFunction_prl); + rtb_NOT_b = (FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed || rtb_NOT_b); FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_cp_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); - rtb_Compare_a5 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && - FmgcComputer_U.in.fms_inputs.nav_capture_condition && (FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed || - rtb_y_ff) && ((rtb_y_gtq >= FmgcComputer_P.CompareToConstant_const_oh) || raOwnInvalid) && (rtb_AND12 || - (rtb_y_gtq >= FmgcComputer_P.CompareToConstant1_const_bh)))); - FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_co, - FmgcComputer_P.ConfirmNode_timeDelay_d1, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_ge4); - FmgcComputer_DWork.Memory_PreviousInput_ip = FmgcComputer_P.Logic_table_a[(((rtb_OR2_l_tmp || rtb_y_hy || - ((Memory_PreviousInput_d_tmp || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_ff))) + ( - static_cast(rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ip]; + rtb_y_jt = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_c && + FmgcComputer_U.in.fms_inputs.nav_capture_condition && rtb_NOT_b && ((rtb_y_gtq >= + FmgcComputer_P.CompareToConstant_const_oh) || raOwnInvalid) && (Memory_PreviousInput_l_tmp_0 || (rtb_y_gtq >= + FmgcComputer_P.CompareToConstant1_const_bh)))); + FmgcComputer_MATLABFunction_a(rtb_y_jt, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_co, + FmgcComputer_P.ConfirmNode_timeDelay_d1, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_ge4); + FmgcComputer_DWork.Memory_PreviousInput_ip = FmgcComputer_P.Logic_table_a[(((rtb_NOT3_tmp || + rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((Memory_PreviousInput_d_tmp || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_NOT_b))) + (static_cast(rtb_y_jt) << + 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ip]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_o, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); - rtb_Compare_a5 = rtb_y_cq; + rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); + rtb_y_jt = rtb_y_c; FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active), FmgcComputer_P.PulseNode1_isRisingEdge_cs, &rtb_y_oi, + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active), FmgcComputer_P.PulseNode1_isRisingEdge_cs, &rtb_y_pw, &FmgcComputer_DWork.sf_MATLABFunction_ma); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel1_bit_ls, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode2_isRisingEdge_o, &rtb_y_ff, + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode2_isRisingEdge_o, &rtb_y_js, &FmgcComputer_DWork.sf_MATLABFunction_k4c); rtb_NOT_b = rtb_AND1_c0; FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_cp_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); - rtb_AND1_c0 = (rtb_y_ff && rtb_AND1_c0 && (rtb_y_gtq >= FmgcComputer_P.CompareToConstant_const_m) && - ((FmgcComputer_P.EnumeratedConstant_Value_a != FmgcComputer_U.in.fms_inputs.fms_flight_phase) && - (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant1_Value_dg))); + rtb_GreaterThan3 = (FmgcComputer_P.EnumeratedConstant_Value_ah == FmgcComputer_U.in.fms_inputs.fms_flight_phase); + rtb_AND1_c0 = (rtb_y_js && rtb_AND1_c0 && (rtb_y_gtq >= FmgcComputer_P.CompareToConstant_const_m) && + ((!rtb_GreaterThan3) && (FmgcComputer_U.in.fms_inputs.fms_flight_phase != + FmgcComputer_P.EnumeratedConstant1_Value_dg))); FmgcComputer_MATLABFunction_a(rtb_AND1_c0, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_n, FmgcComputer_P.ConfirmNode_timeDelay_g, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_ah); FmgcComputer_MATLABFunction_g(FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed, - FmgcComputer_P.PulseNode_isRisingEdge_g, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_ol); - rtb_NOT_gj = (rtb_NOT_gj && rtb_y_ff && FmgcComputer_DWork.Delay_DSTATE.armed_modes.loc_armed); + FmgcComputer_P.PulseNode_isRisingEdge_g, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_ol); FmgcComputer_MATLABFunction_g(FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed, - FmgcComputer_P.PulseNode3_isRisingEdge_d, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_mne); - FmgcComputer_DWork.Memory_PreviousInput_a = FmgcComputer_P.Logic_table_ku[(((((!rtb_NOT_b) && rtb_Compare_a5) || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || rtb_NOT_gj || rtb_y_ff) + ( - static_cast((rtb_Compare_du && rtb_OR2_l) || (rtb_y_cq && (rtb_y_oi || rtb_AND1_c0))) << 1)) << 1) + + FmgcComputer_P.PulseNode3_isRisingEdge_d, &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_mne); + rtb_y_jt = (((!rtb_NOT_b) && rtb_y_jt) || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || (rtb_OR2_l_tmp_1 && rtb_y_js + && FmgcComputer_DWork.Delay_DSTATE.armed_modes.loc_armed) || rtb_GreaterThan3); + rtb_NOT_b = FmgcComputer_DWork.Memory_PreviousInput_a; + FmgcComputer_DWork.Memory_PreviousInput_a = FmgcComputer_P.Logic_table_ku[(((static_cast((rtb_Compare_bj && + rtb_OR2_l) || (rtb_y_c && (rtb_y_pw || rtb_AND1_c0))) << 1) + rtb_y_jt) << 1) + FmgcComputer_DWork.Memory_PreviousInput_a]; rtb_BusAssignment_kv_logic_ir_computation_data_heading_magnetic_deg.SSM = rtb_irComputationBus_heading_magnetic_deg_SSM; @@ -2255,7 +2266,7 @@ void FmgcComputer::step() guard1 = false; if (rtb_DataTypeConversion8 > 5.0) { if (std::abs(rtb_y_jq) <= 5.0F) { - rtb_Compare_a5 = true; + rtb_y_jt = true; } else { if (rtb_y_jq < 0.0F) { absVsTarget = -1; @@ -2264,7 +2275,7 @@ void FmgcComputer::step() } if (low_ip1 != absVsTarget) { - rtb_Compare_a5 = true; + rtb_y_jt = true; } else { guard1 = true; } @@ -2280,10 +2291,10 @@ void FmgcComputer::step() absVsTarget = (rtb_y_jq > 0.0F); } - rtb_Compare_a5 = ((rtb_DataTypeConversion8 >= std::abs(rtb_y_jq)) && (low_ip1 == absVsTarget)); + rtb_y_jt = ((rtb_DataTypeConversion8 >= std::abs(rtb_y_jq)) && (low_ip1 == absVsTarget)); } } else { - rtb_Compare_a5 = false; + rtb_y_jt = false; } rtb_DataTypeConversion2_kb = std::abs(rtb_y_gtq); @@ -2295,29 +2306,29 @@ void FmgcComputer::step() low_ip1 = (rtb_y_fl > 0.0F); } - if (((rtb_DataTypeConversion2_kb > 25.0F) && ((rtb_y_jq < 10.0F) && ((high_i != low_ip1) && rtb_Compare_a5))) || + if (((rtb_DataTypeConversion2_kb > 25.0F) && ((rtb_y_jq < 10.0F) && ((high_i != low_ip1) && rtb_y_jt))) || (rtb_y_jq < 1.92)) { - rtb_Compare_a5 = (rtb_Compare_a5 || ((rtb_DataTypeConversion2_kb < 15.0F) && (rtb_y_jq < 1.1))); + rtb_y_jt = (rtb_y_jt || ((rtb_DataTypeConversion2_kb < 15.0F) && (rtb_y_jq < 1.1))); } else { - rtb_Compare_a5 = false; + rtb_y_jt = false; } } else { - rtb_Compare_a5 = false; + rtb_y_jt = false; } FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_kv_logic_ils_computation_data_localizer_deviation_deg, - &rtb_Compare_du); - rtb_Compare_a5 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && - FmgcComputer_DWork.Delay_DSTATE.armed_modes.loc_armed && rtb_Compare_a5 && rtb_Compare_du)); - FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_at, - FmgcComputer_P.ConfirmNode_timeDelay_h4, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_p4); - rtb_Compare_du = (Memory_PreviousInput_d_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active); - FmgcComputer_DWork.Memory_PreviousInput_cv = FmgcComputer_P.Logic_table_g4[(((((!rtb_y_ff) && (rtb_Compare_du || + &rtb_Compare_bj); + rtb_y_jt = (rtb_y_c && FmgcComputer_DWork.Delay_DSTATE.armed_modes.loc_armed && rtb_y_jt && rtb_Compare_bj); + rtb_Compare_bj = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || rtb_y_jt); + FmgcComputer_MATLABFunction_a(rtb_Compare_bj, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_at, + FmgcComputer_P.ConfirmNode_timeDelay_h4, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_p4); + rtb_y_dk = (Memory_PreviousInput_d_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active); + FmgcComputer_DWork.Memory_PreviousInput_cv = FmgcComputer_P.Logic_table_g4[(((((!rtb_y_jt) && (rtb_y_dk || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_y_hy) + (static_cast(rtb_Compare_a5) << - 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_cv]; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset) + + (static_cast(rtb_Compare_bj) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_cv]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_2, FmgcComputer_P.BitfromLabel_bit_es, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction(&rtb_BusAssignment_kv_logic_ils_computation_data_localizer_deviation_deg, @@ -2330,17 +2341,17 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_a((rtb_DataTypeConversion8 < FmgcComputer_P.CompareToConstant1_const_n), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_nd, FmgcComputer_P.ConfirmNode_timeDelay_e, - &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_is); - rtb_Compare_a5 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active && rtb_y_ff)); - FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ea, - FmgcComputer_P.ConfirmNode_timeDelay_es, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_pr); - FmgcComputer_DWork.Memory_PreviousInput_lq = FmgcComputer_P.Logic_table_j[(((((!rtb_y_ff) && (rtb_Compare_du || + &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_is); + rtb_y_jt = (rtb_y_c && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active && rtb_NOT_b); + rtb_Compare_bj = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || rtb_y_jt); + FmgcComputer_MATLABFunction_a(rtb_Compare_bj, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ea, + FmgcComputer_P.ConfirmNode_timeDelay_es, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_pr); + FmgcComputer_DWork.Memory_PreviousInput_lq = FmgcComputer_P.Logic_table_j[(((((!rtb_y_jt) && (rtb_y_dk || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_y_hy) + (static_cast(rtb_Compare_a5) << - 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_lq]; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset) + + (static_cast(rtb_Compare_bj) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_lq]; rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft.SSM = rtb_adrComputationBus_altitude_corrected_ft_SSM; rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft.Data = @@ -2359,6 +2370,7 @@ void FmgcComputer::step() FmgcComputer_P.CompareToConstant_const_mh))) << 1) + FmgcComputer_DWork.Memory_PreviousInput_n]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_et, &rtb_DataTypeConversion1_e); + rtb_NOT_b = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active; FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_vz_ft_min, FmgcComputer_P.A429ValueOrDefault1_defaultValue_j, &rtb_y_fl); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_fpa_deg, @@ -2373,7 +2385,7 @@ void FmgcComputer::step() } } - rtb_y_hy = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || + rtb_y_dk = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active); rtb_BusAssignment_gt_logic_ir_computation_data_inertial_vertical_speed_ft_s.SSM = rtb_irComputationBus_inertial_vertical_speed_ft_s_SSM; @@ -2388,25 +2400,25 @@ void FmgcComputer::step() } rtb_GreaterThan3 = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_hold_active; - Memory_PreviousInput_d_tmp_tmp = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active; - Memory_PreviousInput_d_tmp = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active; - rtb_AND1_c0 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && - (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active) && rtb_GreaterThan3 && - Memory_PreviousInput_d_tmp && Memory_PreviousInput_d_tmp_tmp && rtb_Compare_d2 && rtb_appInop_idx_2 && - ((!rtb_OR1_j) || (Memory_PreviousInput_k_tmp_tmp_0 && rtb_Compare_gc)) && ((!rtb_y_hy) || - (rtb_DataTypeConversion2_kb <= FmgcComputer_P.CompareToConstant2_const_jy)) && rtb_y_fd && - FmgcComputer_DWork.Memory_PreviousInput_n)); + Memory_PreviousInput_d_tmp = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active; + Memory_PreviousInput_k_tmp_tmp_0 = !FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active; + rtb_AND1_c0 = (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_c && rtb_NOT_b && rtb_GreaterThan3 && + Memory_PreviousInput_k_tmp_tmp_0 && Memory_PreviousInput_d_tmp && rtb_Compare_d0 && rtb_appInop_idx_2 && + ((!rtb_OR1_j) || (rtb_GreaterThan3_tmp && rtb_Compare_bb)) && ((!rtb_y_dk) || (rtb_DataTypeConversion2_kb <= + FmgcComputer_P.CompareToConstant2_const_jy)) && apCondition && FmgcComputer_DWork.Memory_PreviousInput_n)); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_ng, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_n, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_Compare_du && (rtb_DataTypeConversion1_e != 0U)); + rtb_Compare_bj = (rtb_Compare_bj && (rtb_DataTypeConversion1_e != 0U)); + rtb_y_jt = rtb_y_c; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_f, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_m((rtb_DataTypeConversion1_e != 0U), FmgcComputer_U.in.time.dt, &rtb_y_ff, + FmgcComputer_MATLABFunction_m((rtb_DataTypeConversion1_e != 0U), FmgcComputer_U.in.time.dt, &rtb_NOT_b, FmgcComputer_P.MTrigNode_isRisingEdge_k, FmgcComputer_P.MTrigNode_retriggerable_pd, FmgcComputer_P.MTrigNode_triggerDuration_bh, &FmgcComputer_DWork.sf_MATLABFunction_bq); + rtb_NOT_b = !rtb_NOT_b; FmgcComputer_MATLABFunction(&rtb_BusAssignment_gt_logic_ir_computation_data_inertial_vertical_speed_ft_s, FmgcComputer_P.A429ValueOrDefault1_defaultValue_h, &rtb_y_jq); rtb_DataTypeConversion2_kb = std::abs(rtb_y_jq); @@ -2440,7 +2452,7 @@ void FmgcComputer::step() low_ip1 = (rtb_y_jq > 0.0F); } - rtb_NOT_b = (FmgcComputer_DWork.Delay_DSTATE.armed_modes.alt_acq_armed && (!rtb_y_ff) && ((std::fmin(3000.0F, std:: + rtb_NOT_b = (FmgcComputer_DWork.Delay_DSTATE.armed_modes.alt_acq_armed && rtb_NOT_b && ((std::fmin(3000.0F, std:: fmax(80.0F, rtb_y_fl * rtb_y_fl / ((((rtb_DataTypeConversion2_kb * static_cast(c[absVsTarget]) + static_cast(c[absVsTarget + 6])) * rtb_DataTypeConversion2_kb + static_cast(c[absVsTarget + 12])) * rtb_DataTypeConversion2_kb + static_cast(c[absVsTarget + 18])) * 9.81F) * 3.28084F)) > std::abs @@ -2448,13 +2460,13 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_gt_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel7_bit_j, &rtb_DataTypeConversion1_e); - rtb_y_oi = rtb_y_lh; - rtb_Compare_a5 = ((rtb_Compare_du && rtb_OR2_l) || (rtb_y_cq && rtb_NOT_b && ((rtb_y_gtq >= - FmgcComputer_P.CompareToConstant_const_l5) || (rtb_y_h && rtb_y_ai)) && (rtb_Compare_gc || + rtb_y_js = rtb_y_lh; + rtb_Compare_bj = ((rtb_Compare_bj && rtb_OR2_l) || (rtb_y_c && rtb_NOT_b && ((rtb_y_gtq >= + FmgcComputer_P.CompareToConstant_const_l5) || (rtb_OR2_l_tmp && rtb_y_oi)) && (rtb_Compare_bb || ((rtb_DataTypeConversion1_e == 0U) && (FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode == FmgcComputer_P.EnumeratedConstant3_Value_l) && (!rtb_y_lh))))); - FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_hux, - FmgcComputer_P.ConfirmNode_timeDelay_lk, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_hw); + FmgcComputer_MATLABFunction_a(rtb_Compare_bj, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_hux, + FmgcComputer_P.ConfirmNode_timeDelay_lk, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_hw); FmgcComputer_DWork.Memory_PreviousInput_ne = FmgcComputer_P.Logic_table_nz [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((absVsTarget_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || @@ -2469,28 +2481,28 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_ff))) + (static_cast - (rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ne]; - rtb_NOT_gj = rtb_NOT_b; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_jt))) + (static_cast + (rtb_Compare_bj) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ne]; + rtb_OR2_l_tmp_1 = rtb_NOT_b; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_p2, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_fr, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_Compare_du && (rtb_DataTypeConversion1_e != 0U)); + rtb_Compare_bj = (rtb_Compare_bj && (rtb_DataTypeConversion1_e != 0U)); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault1_defaultValue_g, &rtb_y_gtq); FmgcComputer_MATLABFunction_a((std::abs(rtb_altCstrOrFcu - rtb_y_gtq) < FmgcComputer_P.CompareToConstant_const_f), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_nf, FmgcComputer_P.ConfirmNode_timeDelay_at, - &rtb_y_oi, &FmgcComputer_DWork.sf_MATLABFunction_ee); + &rtb_y_js, &FmgcComputer_DWork.sf_MATLABFunction_ee); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel7_bit_k, &rtb_DataTypeConversion1_e); - rtb_Compare_a5 = ((rtb_Compare_du && rtb_OR2_l) || (rtb_y_cq && - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active && rtb_y_oi && (rtb_Compare_gc || - ((rtb_DataTypeConversion1_e == 0U) && (FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode == - FmgcComputer_P.EnumeratedConstant3_Value_p) && rtb_NOT1_i)))); - FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_lj, - FmgcComputer_P.ConfirmNode_timeDelay_bd, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_dt); + rtb_y_jt = (rtb_y_c && FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active && rtb_y_js && + (rtb_Compare_bb || ((rtb_DataTypeConversion1_e == 0U) && + (FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode == FmgcComputer_P.EnumeratedConstant3_Value_p) && rtb_NOT1_i))); + rtb_Compare_bj = ((rtb_Compare_bj && rtb_OR2_l) || rtb_y_jt); + FmgcComputer_MATLABFunction_a(rtb_Compare_bj, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_lj, + FmgcComputer_P.ConfirmNode_timeDelay_bd, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_dt); FmgcComputer_DWork.Memory_PreviousInput_cb = FmgcComputer_P.Logic_table_ob [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((Memory_PreviousInput_k_tmp_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || @@ -2505,16 +2517,16 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_ff))) + (static_cast - (rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_cb]; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_jt))) + (static_cast + (rtb_Compare_bj) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_cb]; FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault3_defaultValue_m, &rtb_y_gtq); - rtb_Compare_a5 = rtb_GreaterThan3; + rtb_y_jt = rtb_GreaterThan3; FmgcComputer_DWork.Memory_PreviousInput_no = FmgcComputer_P.Logic_table_ay[(((static_cast(std::abs (FmgcComputer_U.in.fms_inputs.cruise_alt_ft - rtb_y_gtq) < FmgcComputer_P.CompareToConstant1_const_a) << 1) + rtb_GreaterThan3) << 1) + FmgcComputer_DWork.Memory_PreviousInput_no]; - rtb_OR2_l_tmp = !rtb_AND_j; - rtb_Compare_gc = (FmgcComputer_DWork.Memory_PreviousInput_cb && rtb_OR2_l_tmp && + rtb_NOT3_tmp = !rtb_AND_j; + rtb_Compare_bb = (FmgcComputer_DWork.Memory_PreviousInput_cb && rtb_NOT3_tmp && FmgcComputer_DWork.Memory_PreviousInput_no); rtb_BusAssignment_o3_logic_adr_computation_data_airspeed_computed_kn.SSM = rtb_adrComputationBus_airspeed_computed_kn_SSM; @@ -2523,19 +2535,19 @@ void FmgcComputer::step() rtb_BusAssignment_o3_logic_chosen_fac_bus_v_ls_kn.Data = rtb_Switch_v_ls_kn_Data; rtb_BusAssignment_o3_logic_chosen_fac_bus_v_max_kn.SSM = rtb_Switch_v_max_kn_SSM; rtb_BusAssignment_o3_logic_chosen_fac_bus_v_max_kn.Data = rtb_Switch_v_max_kn_Data; - Memory_PreviousInput_k_tmp_tmp_tmp = rtb_y_oi; - rtb_Compare_du = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || + Memory_PreviousInput_k_tmp_tmp_tmp = rtb_y_js; + rtb_Compare_bj = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active); FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active), FmgcComputer_P.PulseNode3_isRisingEdge_n, &rtb_y_hy, + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active), FmgcComputer_P.PulseNode3_isRisingEdge_n, &rtb_y_dk, &FmgcComputer_DWork.sf_MATLABFunction_fed); - rtb_AND12 = (rtb_Compare_du && rtb_y_hy); + rtb_AND12 = (rtb_Compare_bj && rtb_y_dk); FmgcComputer_MATLABFunction_g(FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active, - FmgcComputer_P.PulseNode4_isRisingEdge_f, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_bbb); + FmgcComputer_P.PulseNode4_isRisingEdge_f, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_bbb); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel6_bit_d, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode5_isRisingEdge_p, - &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_jc); + &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_jc); if (!FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active) { FmgcComputer_B.u_ly = rtb_altCstrOrFcu; } @@ -2554,56 +2566,56 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault7_defaultValue, &rtb_y_gtq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel7_bit_o, &rtb_DataTypeConversion1_e); - rtb_y_i2 = (rtb_y_lh || (FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode == + rtb_y_pw = (rtb_y_lh || (FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode == FmgcComputer_P.EnumeratedConstant3_Value_ls)); - absVsTarget_tmp = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active); - rtb_y_hy = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active); - rtb_OR1_j = (rtb_NOT3_tmp_0 && Memory_PreviousInput_l_tmp && rtb_NOT3_tmp); - rtb_Compare_du = (rtb_AND12 || (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active && - (rtb_Compare_a5 || rtb_Compare_du)) || (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active && + rtb_y_dk = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active); + rtb_GreaterThan3 = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active); + rtb_OR2_l_tmp_0 = (rtb_NOT3_tmp_0 && rtb_OR2_l_tmp_0 && rtb_AND10_b); + rtb_Compare_bj = (rtb_AND12 || (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active && (rtb_y_jt || + rtb_Compare_bj)) || (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active && ((FmgcComputer_P.EnumeratedConstant_Value_p == FmgcComputer_U.in.fms_inputs.fms_flight_phase) || (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant1_Value_m) || - (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant2_Value) || rtb_OR1_j || - rtb_Compare_bm)) || (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active && (std::abs - (FmgcComputer_B.u_ly - rtb_altCstrOrFcu) >= FmgcComputer_P.CompareToConstant_const_om)) || (absVsTarget_tmp && - (rtb_DataTypeConversion2_bh > FmgcComputer_P.CompareToConstant1_const_o)) || (rtb_y_hy && - (rtb_DataTypeConversion2_bh < FmgcComputer_P.CompareToConstant2_const_g)) || ((absVsTarget_tmp || + (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant2_Value) || rtb_OR2_l_tmp_0 || + rtb_Compare_kg)) || (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active && (std::abs + (FmgcComputer_B.u_ly - rtb_altCstrOrFcu) >= FmgcComputer_P.CompareToConstant_const_om)) || (rtb_y_dk && + (rtb_DataTypeConversion2_bh > FmgcComputer_P.CompareToConstant1_const_o)) || (rtb_GreaterThan3 && + (rtb_DataTypeConversion2_bh < FmgcComputer_P.CompareToConstant2_const_g)) || ((rtb_y_dk || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active) && (rtb_DataTypeConversion2_kb > rtb_y_jq) && - rtb_Compare_fn && FmgcComputer_DWork.Delay_DSTATE_k && FmgcComputer_P.Constant_Value_m) || (rtb_y_hy && (rtb_y_jq > - rtb_y_gtq + FmgcComputer_P.Bias1_Bias) && rtb_Compare_fn && FmgcComputer_DWork.Delay_DSTATE_k && + rtb_Compare_gc && FmgcComputer_DWork.Delay_DSTATE_k && FmgcComputer_P.Constant_Value_m) || (rtb_GreaterThan3 && + (rtb_y_jq > rtb_y_gtq + FmgcComputer_P.Bias1_Bias) && rtb_Compare_gc && FmgcComputer_DWork.Delay_DSTATE_k && FmgcComputer_P.Constant_Value_m) || (((rtb_DataTypeConversion1_e == 0U) || rtb_y_lh) && - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active && rtb_y_i2)); + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active && rtb_y_pw)); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_ax, &rtb_DataTypeConversion1_e); - rtb_Compare_a5 = (rtb_DataTypeConversion1_e != 0U); + rtb_y_jt = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_k, &rtb_DataTypeConversion1_e); - rtb_Compare_a5 = (rtb_Compare_a5 || (rtb_DataTypeConversion1_e != 0U)); - rtb_NOT_b = rtb_y_cq; + rtb_y_jt = (rtb_y_jt || (rtb_DataTypeConversion1_e != 0U)); + rtb_NOT_b = rtb_y_c; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel4_bit_g, &rtb_DataTypeConversion1_e); rtb_GreaterThan3 = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel5_bit_n, &rtb_DataTypeConversion1_e); - rtb_y_hh = (rtb_DataTypeConversion1_e != 0U); + rtb_y_od = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_g((rtb_GreaterThan3 || (rtb_DataTypeConversion1_e != 0U)), - FmgcComputer_P.PulseNode_isRisingEdge_d, &rtb_y_hh, &FmgcComputer_DWork.sf_MATLABFunction_nd); - FmgcComputer_MATLABFunction_g(rtb_y_fd, FmgcComputer_P.PulseNode1_isRisingEdge_ky, &rtb_y_i2, + FmgcComputer_P.PulseNode_isRisingEdge_d, &rtb_y_od, &FmgcComputer_DWork.sf_MATLABFunction_nd); + FmgcComputer_MATLABFunction_g(apCondition, FmgcComputer_P.PulseNode1_isRisingEdge_ky, &rtb_y_pw, &FmgcComputer_DWork.sf_MATLABFunction_dsw); - rtb_y_lh_tmp = !FmgcComputer_DWork.Delay_DSTATE.any_longitudinal_mode_engaged; - rtb_y_oi = rtb_y_lh_tmp; - FmgcComputer_MATLABFunction_a(rtb_OR_m4, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ld, - FmgcComputer_P.ConfirmNode_timeDelay_op, &rtb_y_oi, &FmgcComputer_DWork.sf_MATLABFunction_cz); - rtb_Compare_a5 = ((rtb_Compare_a5 && rtb_OR2_l) || (rtb_y_cq && ((rtb_y_e && rtb_y_hh && rtb_appInop_idx_2) || - (rtb_OR_m4 && rtb_y_i2 && rtb_y_lh_tmp) || (rtb_y_oi && rtb_y_lh_tmp) || rtb_Compare_du))); - FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_lu, + rtb_AND12 = !FmgcComputer_DWork.Delay_DSTATE.any_longitudinal_mode_engaged; + rtb_y_js = rtb_AND12; + FmgcComputer_MATLABFunction_a(rtb_OR_i, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ld, + FmgcComputer_P.ConfirmNode_timeDelay_op, &rtb_y_js, &FmgcComputer_DWork.sf_MATLABFunction_cz); + rtb_y_jt = ((rtb_y_jt && rtb_OR2_l) || (rtb_y_c && ((rtb_y_ogh && rtb_y_od && rtb_appInop_idx_2) || (rtb_OR_i && + rtb_y_pw && rtb_AND12) || (rtb_y_js && rtb_AND12) || rtb_Compare_bj))); + FmgcComputer_MATLABFunction_a(rtb_y_jt, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_lu, FmgcComputer_P.ConfirmNode_timeDelay_ll, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_gbq); FmgcComputer_DWork.Memory_PreviousInput_fg = FmgcComputer_P.Logic_table_ny - [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_AND_e_tmp || + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_y_e2 || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || @@ -2617,75 +2629,75 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_NOT_b))) + (static_cast - (rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_fg]; + (rtb_y_jt) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_fg]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_e, &rtb_DataTypeConversion1_e); rtb_AND12 = ((rtb_DataTypeConversion1_e != 0U) && FmgcComputer_DWork.Memory_PreviousInput_fg); - Memory_PreviousInput_l_tmp = (FmgcComputer_DWork.Memory_PreviousInput_fg && (rtb_DataTypeConversion1_e == 0U)); - rtb_NOT3_tmp = rtb_Compare_du; + Memory_PreviousInput_l_tmp_0 = (FmgcComputer_DWork.Memory_PreviousInput_fg && (rtb_DataTypeConversion1_e == 0U)); + Memory_PreviousInput_d_tmp_tmp = rtb_Compare_bj; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_jh, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_et, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault1_defaultValue_oj, &rtb_y_gtq); - rtb_y_hh = (rtb_y_jq > rtb_y_gtq); + rtb_y_od = (rtb_y_jq > rtb_y_gtq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_px, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_bb, &rtb_y_ff, + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_bb, &rtb_y_dk, &FmgcComputer_DWork.sf_MATLABFunction_p3z); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault5_defaultValue_c, &rtb_y_gtq); - rtb_y_i2 = (rtb_AND_e_tmp && rtb_AND_j); - rtb_NOT_b = (rtb_OR_m4 && ((FmgcComputer_U.in.fms_inputs.fms_flight_phase != + Memory_PreviousInput_l_tmp = (rtb_y_e2 && rtb_AND_j); + rtb_NOT_b = (rtb_OR_i && ((FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant1_Value_f) && (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant2_Value_p)) && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && - rtb_y_hh && FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && (rtb_y_i2 || (rtb_y_ff && - rtb_AND_e_tmp && (rtb_AND_j && (std::abs(rtb_altCstrOrFcu - rtb_y_gtq) <= + rtb_y_od && FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && (Memory_PreviousInput_l_tmp || + (rtb_y_dk && rtb_y_e2 && (rtb_AND_j && (std::abs(rtb_altCstrOrFcu - rtb_y_gtq) <= FmgcComputer_P.CompareToConstant2_const_d))))); - rtb_GreaterThan3 = (rtb_y_km || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || + rtb_GreaterThan3 = (rtb_y_mj || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault4_defaultValue_k, &rtb_y_gtq); - rtb_y_hh = ((FmgcComputer_U.in.fms_inputs.acceleration_alt_ft != FmgcComputer_P.CompareToConstant_const_l) && + rtb_y_pw = (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || + FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed); + rtb_y_od = ((FmgcComputer_U.in.fms_inputs.acceleration_alt_ft != FmgcComputer_P.CompareToConstant_const_l) && (FmgcComputer_U.in.fms_inputs.acceleration_alt_ft < rtb_y_gtq) && ((FmgcComputer_U.in.fms_inputs.acceleration_alt_ft < FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft) || (FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft == FmgcComputer_P.CompareToConstant1_const_p)) && - (FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active || - FmgcComputer_DWork.Delay_DSTATE.armed_modes.nav_armed) && - ((!rtP_fmgc_ap_fd_logic_output_MATLABStruct.any_lateral_mode_engaged) || - FmgcComputer_DWork.Memory_PreviousInput_c)); + rtb_y_pw && ((!rtP_fmgc_ap_fd_logic_output_MATLABStruct.any_lateral_mode_engaged) || + FmgcComputer_DWork.Memory_PreviousInput_c)); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault2_defaultValue_jt, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault3_defaultValue_os, &rtb_y_gtq); - rtb_y_fd = (Memory_PreviousInput_k_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || + rtb_y_js = (Memory_PreviousInput_k_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active); - FmgcComputer_DWork.Memory_PreviousInput_ma = FmgcComputer_P.Logic_table_ns[((((rtb_GreaterThan3 && (!rtb_y_hh)) || - (rtb_y_fd || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || + FmgcComputer_DWork.Memory_PreviousInput_ma = FmgcComputer_P.Logic_table_ns[((((rtb_GreaterThan3 && (!rtb_y_od)) || + (rtb_y_js || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || ((FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_hold_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active) && rtb_OR2_l_tmp) || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active) || (rtb_y_jq < rtb_y_gtq) || (rtb_AND_e_tmp && - (rtb_OR2_l_tmp || rtb_NOT3_tmp_0 || rtb_Compare_bm)) || ((FmgcComputer_U.in.fms_inputs.fms_flight_phase == + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active) && rtb_NOT3_tmp) || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active) || (rtb_y_jq < rtb_y_gtq) || (rtb_y_e2 && + (rtb_NOT3_tmp || rtb_NOT3_tmp_0 || rtb_Compare_kg)) || ((FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant3_Value) || (FmgcComputer_U.in.fms_inputs.fms_flight_phase == - FmgcComputer_P.EnumeratedConstant4_Value)) || rtb_appCapability_idx_2) + (static_cast((rtb_Compare_du && - rtb_OR2_l) || (rtb_y_cq && (rtb_NOT_b || (rtb_GreaterThan3 && rtb_y_hh)))) << 1)) << 1) + + FmgcComputer_P.EnumeratedConstant4_Value)) || rtb_appCapability_idx_2) + (static_cast((rtb_Compare_bj && + rtb_OR2_l) || (rtb_y_c && (rtb_NOT_b || (rtb_GreaterThan3 && rtb_y_od)))) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ma]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_g3, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_is, &rtb_DataTypeConversion1_e); - rtb_Compare_a5 = (rtb_DataTypeConversion1_e == 0U); + rtb_y_jt = (rtb_DataTypeConversion1_e == 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel4_bit_b, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_Compare_du && rtb_Compare_a5 && (rtb_DataTypeConversion1_e == 0U)); + rtb_Compare_bj = (rtb_Compare_bj && rtb_y_jt && (rtb_DataTypeConversion1_e == 0U)); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_h, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, @@ -2694,43 +2706,43 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault2_defaultValue_j4, &rtb_y_gtq); FmgcComputer_MATLABFunction_g((rtb_y_gtq > FmgcComputer_U.in.fms_inputs.acceleration_alt_ft), - FmgcComputer_P.PulseNode_isRisingEdge_bg, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_dfk); - rtb_y_oi = (rtb_y_ff || (FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft != FmgcComputer_DWork.DelayInput1_DSTATE)); + FmgcComputer_P.PulseNode_isRisingEdge_bg, &rtb_y_pw, &FmgcComputer_DWork.sf_MATLABFunction_dfk); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_p, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_j4, - &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_dd); + &rtb_AND10_b, &FmgcComputer_DWork.sf_MATLABFunction_dd); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault5_defaultValue_d, &rtb_y_gtq); - rtb_y_hy = (rtb_OR2_l_tmp || (std::abs(rtb_altCstrOrFcu - rtb_y_gtq) > FmgcComputer_P.CompareToConstant2_const_a)); - rtb_NOT_b = (rtb_y_cq && FmgcComputer_DWork.Delay_DSTATE.armed_modes.alt_acq_arm_possible && rtb_y_e); - rtb_Compare_a5 = ((rtb_Compare_du && rtb_OR2_l) || (rtb_NOT_b && (rtb_appInop_idx_2 && - Memory_PreviousInput_d_tmp_tmp) && FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && - FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && rtb_GreaterThan3 && - ((FmgcComputer_P.EnumeratedConstant_Value_pq != FmgcComputer_U.in.fms_inputs.fms_flight_phase) && - (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant1_Value_iv)) && - ((FmgcComputer_DWork.Delay_DSTATE.armed_modes.clb_armed && rtb_y_oi) || (rtb_y_ff && ((!rtb_AND_e_tmp) || - (rtb_AND_e_tmp && (!FmgcComputer_DWork.Delay_DSTATE.armed_modes.clb_armed) && rtb_y_hy)))))); - FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_fc, - FmgcComputer_P.ConfirmNode_timeDelay_nn, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_ir); - Memory_PreviousInput_k_tmp_tmp = (absVsTarget_tmp_0 || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active); + rtb_y_dk = (rtb_NOT3_tmp || (std::abs(rtb_altCstrOrFcu - rtb_y_gtq) > FmgcComputer_P.CompareToConstant2_const_a)); + rtb_NOT_b = (rtb_y_c && FmgcComputer_DWork.Delay_DSTATE.armed_modes.alt_acq_arm_possible && rtb_y_ogh); + rtb_y_jt = (rtb_NOT_b && (rtb_appInop_idx_2 && Memory_PreviousInput_d_tmp) && + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active && + FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && rtb_GreaterThan3 && + ((FmgcComputer_P.EnumeratedConstant_Value_pq != FmgcComputer_U.in.fms_inputs.fms_flight_phase) && + (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant1_Value_iv)) && + ((FmgcComputer_DWork.Delay_DSTATE.armed_modes.clb_armed && (rtb_y_pw || + (FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft != FmgcComputer_DWork.DelayInput1_DSTATE))) || (rtb_AND10_b && + ((!rtb_y_e2) || (rtb_y_e2 && (!FmgcComputer_DWork.Delay_DSTATE.armed_modes.clb_armed) && rtb_y_dk))))); + rtb_Compare_bj = ((rtb_Compare_bj && rtb_OR2_l) || rtb_y_jt); + FmgcComputer_MATLABFunction_a(rtb_Compare_bj, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_fc, + FmgcComputer_P.ConfirmNode_timeDelay_nn, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_ir); + rtb_OR1_j = (rtb_y_bk || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active); FmgcComputer_DWork.Memory_PreviousInput_ec = FmgcComputer_P.Logic_table_kw - [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((Memory_PreviousInput_k_tmp_tmp || + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_OR1_j || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_ff))) + (static_cast - (rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ec]; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_jt))) + (static_cast + (rtb_Compare_bj) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ec]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_cq, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_nh, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, @@ -2738,21 +2750,21 @@ void FmgcComputer::step() rtb_GreaterThan3 = (rtb_y_jq < rtb_y_gtq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_nq, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_f, &rtb_y_hy, + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_f, &rtb_y_dk, &FmgcComputer_DWork.sf_MATLABFunction_mrk); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault5_defaultValue_k, &rtb_y_gtq); - rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || (rtb_y_cq && ((FmgcComputer_U.in.fms_inputs.fms_flight_phase != + rtb_Compare_bj = ((rtb_Compare_bj && rtb_OR2_l) || (rtb_y_c && ((FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant1_Value_c) && (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant2_Value_pi) && rtb_GreaterThan3 && rtb_TmpSignalConversionAtSFunctionInport3_idx_2 && FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && - (rtb_y_i2 || (rtb_y_hy && rtb_AND_e_tmp && (rtb_AND_j && (std::abs(rtb_altCstrOrFcu - rtb_y_gtq) <= + (Memory_PreviousInput_l_tmp || (rtb_y_dk && rtb_y_e2 && (rtb_AND_j && (std::abs(rtb_altCstrOrFcu - rtb_y_gtq) <= FmgcComputer_P.CompareToConstant2_const_e))))))); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault2_defaultValue_cj, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault3_defaultValue_b, &rtb_y_gtq); - FmgcComputer_DWork.Memory_PreviousInput_nt = FmgcComputer_P.Logic_table_he[(((rtb_y_fd || + FmgcComputer_DWork.Memory_PreviousInput_nt = FmgcComputer_P.Logic_table_he[(((rtb_y_js || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || @@ -2760,65 +2772,67 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || (rtb_y_jq > rtb_y_gtq) || rtb_OR1_j || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || (rtb_y_jq > rtb_y_gtq) || rtb_OR2_l_tmp_0 || ((FmgcComputer_P.EnumeratedConstant_Value_b == FmgcComputer_U.in.fms_inputs.fms_flight_phase) || (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant5_Value) || - (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant6_Value)) || rtb_Compare_bm || - (rtb_AND_e_tmp && rtb_OR2_l_tmp) || rtb_appCapability_idx_2) + (static_cast(rtb_Compare_du) << 1)) << 1) - + FmgcComputer_DWork.Memory_PreviousInput_nt]; + (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant6_Value)) || rtb_Compare_kg || + (rtb_y_e2 && rtb_NOT3_tmp) || rtb_appCapability_idx_2) + (static_cast(rtb_Compare_bj) << 1)) << 1) + + FmgcComputer_DWork.Memory_PreviousInput_nt]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_mi, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_j, &rtb_DataTypeConversion1_e); - rtb_Compare_a5 = (rtb_DataTypeConversion1_e == 0U); + rtb_y_jt = (rtb_DataTypeConversion1_e == 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel4_bit_f, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_Compare_du && rtb_Compare_a5 && (rtb_DataTypeConversion1_e == 0U)); + rtb_Compare_bj = (rtb_Compare_bj && rtb_y_jt && (rtb_DataTypeConversion1_e == 0U)); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_mo, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault1_defaultValue_b5, &rtb_y_gtq); - rtb_y_hh = (rtb_y_jq < rtb_y_gtq); + rtb_y_od = (rtb_y_jq < rtb_y_gtq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_a, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_fq, - &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_kd); - rtb_y_hy = !FmgcComputer_DWork.Delay_DSTATE.armed_modes.des_armed; + &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_kd); + rtb_y_dk = !FmgcComputer_DWork.Delay_DSTATE.armed_modes.des_armed; FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault5_defaultValue_m, &rtb_y_gtq); - rtb_Compare_a5 = ((rtb_Compare_du && rtb_OR2_l) || (rtb_NOT_b && (Memory_PreviousInput_d_tmp_tmp && - rtb_appInop_idx_2 && rtb_y_me && rtb_Compare_d2 && rtb_y_h && rtb_y_ai) && - rtb_TmpSignalConversionAtSFunctionInport3_idx_2 && FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && - rtb_y_hh && ((FmgcComputer_P.EnumeratedConstant_Value_m != FmgcComputer_U.in.fms_inputs.fms_flight_phase) && - (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant1_Value_k) && - (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant2_Value_pw)) && - ((FmgcComputer_DWork.Delay_DSTATE.armed_modes.des_armed && (FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft != - FmgcComputer_DWork.DelayInput1_DSTATE_n)) || (rtb_y_ff && ((!rtb_AND_e_tmp) || (rtb_AND_e_tmp && rtb_y_hy && - (rtb_OR2_l_tmp || (std::abs(rtb_altCstrOrFcu - rtb_y_gtq) > FmgcComputer_P.CompareToConstant2_const_l)))))))); - FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_j, - FmgcComputer_P.ConfirmNode_timeDelay_dy, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_n5); - rtb_y_h = (absVsTarget_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active); - rtb_OR1_j = (rtb_y_h || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active); - rtb_AND_e_tmp = (rtb_OR1_j || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active); + rtb_y_jt = (rtb_NOT_b && (Memory_PreviousInput_d_tmp && rtb_appInop_idx_2 && rtb_y_me && rtb_Compare_d0 && + rtb_OR2_l_tmp && rtb_y_oi) && rtb_TmpSignalConversionAtSFunctionInport3_idx_2 && + FmgcComputer_U.in.fms_inputs.vertical_flight_plan_valid && rtb_y_od && + ((FmgcComputer_P.EnumeratedConstant_Value_m != FmgcComputer_U.in.fms_inputs.fms_flight_phase) && + (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant1_Value_k) && + (FmgcComputer_U.in.fms_inputs.fms_flight_phase != FmgcComputer_P.EnumeratedConstant2_Value_pw)) && + ((FmgcComputer_DWork.Delay_DSTATE.armed_modes.des_armed && + (FmgcComputer_U.in.fms_inputs.next_alt_cstr_ft != FmgcComputer_DWork.DelayInput1_DSTATE_n)) || + (rtb_y_jt && ((!rtb_y_e2) || (rtb_y_e2 && rtb_y_dk && (rtb_NOT3_tmp || (std::abs(rtb_altCstrOrFcu - + rtb_y_gtq) > FmgcComputer_P.CompareToConstant2_const_l))))))); + rtb_Compare_bj = ((rtb_Compare_bj && rtb_OR2_l) || rtb_y_jt); + FmgcComputer_MATLABFunction_a(rtb_Compare_bj, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_j, + FmgcComputer_P.ConfirmNode_timeDelay_dy, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_n5); + rtb_AND10_b = (absVsTarget_tmp_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active); + rtb_OR2_l_tmp = (rtb_AND10_b || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active); + rtb_OR2_l_tmp_0 = (rtb_OR2_l_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active); FmgcComputer_DWork.Memory_PreviousInput_b3 = FmgcComputer_P.Logic_table_cv - [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_AND_e_tmp || + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_OR2_l_tmp_0 || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_ff))) + (static_cast - (rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_b3]; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_jt))) + (static_cast + (rtb_Compare_bj) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_b3]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_nv, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_i1, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_Compare_du && (rtb_DataTypeConversion1_e != 0U)); + rtb_Compare_bj = (rtb_Compare_bj && (rtb_DataTypeConversion1_e != 0U)); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_ht, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, @@ -2826,92 +2840,92 @@ void FmgcComputer::step() rtb_GreaterThan3 = (rtb_y_jq > rtb_y_gtq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel4_bit_d, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_n, &rtb_y_hy, + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_n, &rtb_y_dk, &FmgcComputer_DWork.sf_MATLABFunction_f0h); - rtb_y_fd = rtb_Compare_bm; - rtb_y_oi = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || + rtb_y_e2 = rtb_Compare_kg; + rtb_y_js = (FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active); - FmgcComputer_MATLABFunction_a((FmgcComputer_DWork.Delay_DSTATE.manual_spd_control_active && rtb_y_oi), + FmgcComputer_MATLABFunction_a((FmgcComputer_DWork.Delay_DSTATE.manual_spd_control_active && rtb_y_js), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_jo, FmgcComputer_P.ConfirmNode_timeDelay_jo, - &rtb_y_oi, &FmgcComputer_DWork.sf_MATLABFunction_moh); - rtb_y_hh = ((FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active && + &rtb_y_js, &FmgcComputer_DWork.sf_MATLABFunction_moh); + rtb_y_od = ((FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active && ((FmgcComputer_P.EnumeratedConstant_Value_c == FmgcComputer_U.in.fms_inputs.fms_flight_phase) || (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant1_Value_c5) || - rtb_NOT3_tmp_0 || rtb_Compare_bm)) || rtb_y_oi); + rtb_NOT3_tmp_0 || rtb_Compare_kg)) || rtb_y_js); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault2_defaultValue_e, &rtb_y_gtq); FmgcComputer_MATLABFunction_g((rtb_y_gtq > FmgcComputer_U.in.fms_inputs.acceleration_alt_ft), - FmgcComputer_P.PulseNode1_isRisingEdge_g, &rtb_y_fd, &FmgcComputer_DWork.sf_MATLABFunction_lva); - rtb_y_i2 = (rtb_NOT3_tmp_0 || rtb_Compare_bm); - rtb_y_oi = (rtb_y_hy || rtb_y_hh || (rtb_y_fd && (FmgcComputer_U.in.fms_inputs.acceleration_alt_ft != - FmgcComputer_P.CompareToConstant_const_od) && rtb_y_i2)); + FmgcComputer_P.PulseNode1_isRisingEdge_g, &rtb_y_e2, &FmgcComputer_DWork.sf_MATLABFunction_lva); + rtb_y_pw = (rtb_NOT3_tmp_0 || rtb_Compare_kg); + rtb_y_js = (rtb_y_dk || rtb_y_od || (rtb_y_e2 && (FmgcComputer_U.in.fms_inputs.acceleration_alt_ft != + FmgcComputer_P.CompareToConstant_const_od) && rtb_y_pw)); rtb_NOT_b = (rtb_NOT_b && rtb_appInop_idx_2); - rtb_Compare_a5 = (rtb_NOT_b && rtb_GreaterThan3 && rtb_y_oi); - rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || rtb_Compare_a5); - FmgcComputer_MATLABFunction_a(rtb_Compare_du, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ca, - FmgcComputer_P.ConfirmNode_timeDelay_ib, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_go); + rtb_y_jt = (rtb_NOT_b && rtb_GreaterThan3 && rtb_y_js); + rtb_Compare_bj = ((rtb_Compare_bj && rtb_OR2_l) || rtb_y_jt); + FmgcComputer_MATLABFunction_a(rtb_Compare_bj, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ca, + FmgcComputer_P.ConfirmNode_timeDelay_ib, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_go); FmgcComputer_DWork.Memory_PreviousInput_ae = FmgcComputer_P.Logic_table_jq - [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((Memory_PreviousInput_k_tmp_tmp || + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_OR1_j || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_Compare_a5))) + (static_cast - (rtb_Compare_du) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ae]; - rtb_y_hy = (FmgcComputer_DWork.Memory_PreviousInput_ae && rtb_y_hh); + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_jt))) + (static_cast + (rtb_Compare_bj) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ae]; + rtb_y_dk = (FmgcComputer_DWork.Memory_PreviousInput_ae && rtb_y_od); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_b, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_kr, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_Compare_du && (rtb_DataTypeConversion1_e != 0U)); + rtb_Compare_bj = (rtb_Compare_bj && (rtb_DataTypeConversion1_e != 0U)); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_i, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault1_defaultValue_dp, &rtb_y_gtq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel4_bit_i, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_f, &rtb_y_hh, + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_f, &rtb_y_od, &FmgcComputer_DWork.sf_MATLABFunction_ms); FmgcComputer_MATLABFunction_a((FmgcComputer_DWork.Delay_DSTATE.manual_spd_control_active && FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active), FmgcComputer_U.in.time.dt, - FmgcComputer_P.ConfirmNode_isRisingEdge_fq, FmgcComputer_P.ConfirmNode_timeDelay_lp, &rtb_y_oi, + FmgcComputer_P.ConfirmNode_isRisingEdge_fq, FmgcComputer_P.ConfirmNode_timeDelay_lp, &rtb_y_js, &FmgcComputer_DWork.sf_MATLABFunction_hj); - rtb_y_hh = (rtb_y_hh || rtb_y_oi); - rtb_Compare_a5 = (rtb_NOT_b && (rtb_y_jq < rtb_y_gtq) && rtb_y_hh); - rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || rtb_Compare_a5); - FmgcComputer_MATLABFunction_a(rtb_Compare_du, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ep, - FmgcComputer_P.ConfirmNode_timeDelay_ob, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_khd); + rtb_y_od = (rtb_y_od || rtb_y_js); + rtb_y_jt = (rtb_NOT_b && (rtb_y_jq < rtb_y_gtq) && rtb_y_od); + rtb_Compare_bj = ((rtb_Compare_bj && rtb_OR2_l) || rtb_y_jt); + FmgcComputer_MATLABFunction_a(rtb_Compare_bj, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ep, + FmgcComputer_P.ConfirmNode_timeDelay_ob, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_khd); FmgcComputer_DWork.Memory_PreviousInput_ev = FmgcComputer_P.Logic_table_lw - [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_AND_e_tmp || + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_OR2_l_tmp_0 || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_Compare_a5))) + (static_cast - (rtb_Compare_du) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ev]; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_jt))) + (static_cast + (rtb_Compare_bj) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ev]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_nh, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_fro, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_Compare_du && (rtb_DataTypeConversion1_e != 0U)); + rtb_Compare_bj = (rtb_Compare_bj && (rtb_DataTypeConversion1_e != 0U)); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_a, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault1_defaultValue_hb, &rtb_y_gtq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel4_bit_e, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_az, &rtb_y_hh, + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_az, &rtb_y_od, &FmgcComputer_DWork.sf_MATLABFunction_fl); - rtb_Compare_a5 = (rtb_NOT_b && (rtb_y_jq > rtb_y_gtq) && rtb_y_hh); - rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || rtb_Compare_a5); - FmgcComputer_MATLABFunction_a(rtb_Compare_du, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_b, - FmgcComputer_P.ConfirmNode_timeDelay_io, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_dn1); + rtb_y_jt = (rtb_NOT_b && (rtb_y_jq > rtb_y_gtq) && rtb_y_od); + rtb_Compare_bj = ((rtb_Compare_bj && rtb_OR2_l) || rtb_y_jt); + FmgcComputer_MATLABFunction_a(rtb_Compare_bj, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_b, + FmgcComputer_P.ConfirmNode_timeDelay_io, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_dn1); FmgcComputer_DWork.Memory_PreviousInput_mx = FmgcComputer_P.Logic_table_ao - [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((absVsTarget_tmp_0 || + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_y_bk || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.exp_des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || @@ -2922,28 +2936,28 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_Compare_a5))) + (static_cast - (rtb_Compare_du) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_mx]; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_jt))) + (static_cast + (rtb_Compare_bj) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_mx]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel1_bit_mz, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_b3, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_Compare_du && (rtb_DataTypeConversion1_e != 0U)); + rtb_Compare_bj = (rtb_Compare_bj && (rtb_DataTypeConversion1_e != 0U)); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_aa, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ic_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault1_defaultValue_a, &rtb_y_gtq); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel4_bit_kh, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_m, &rtb_y_hh, + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_m, &rtb_y_od, &FmgcComputer_DWork.sf_MATLABFunction_a3); - rtb_Compare_a5 = (rtb_NOT_b && (rtb_y_jq < rtb_y_gtq) && rtb_y_hh); - rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || rtb_Compare_a5); - FmgcComputer_MATLABFunction_a(rtb_Compare_du, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ef, - FmgcComputer_P.ConfirmNode_timeDelay_p, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_epf); + rtb_y_jt = (rtb_NOT_b && (rtb_y_jq < rtb_y_gtq) && rtb_y_od); + rtb_Compare_bj = ((rtb_Compare_bj && rtb_OR2_l) || rtb_y_jt); + FmgcComputer_MATLABFunction_a(rtb_Compare_bj, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ef, + FmgcComputer_P.ConfirmNode_timeDelay_p, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_epf); FmgcComputer_DWork.Memory_PreviousInput_o = FmgcComputer_P.Logic_table_om - [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_y_h || + [(((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || ((rtb_AND10_b || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || @@ -2953,19 +2967,19 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_Compare_a5))) + (static_cast - (rtb_Compare_du) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_o]; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active) && (!rtb_y_jt))) + (static_cast + (rtb_Compare_bj) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_o]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_b, &rtb_DataTypeConversion1_e); - rtb_Compare_a5 = rtb_y_cq; + rtb_y_jt = rtb_y_c; FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active), FmgcComputer_P.PulseNode1_isRisingEdge_b, &rtb_y_hh, + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active), FmgcComputer_P.PulseNode1_isRisingEdge_b, &rtb_y_od, &FmgcComputer_DWork.sf_MATLABFunction_pe); FmgcComputer_MATLABFunction_g(FmgcComputer_DWork.Delay_DSTATE.armed_modes.land_armed, - FmgcComputer_P.PulseNode_isRisingEdge_lz, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_iv); + FmgcComputer_P.PulseNode_isRisingEdge_lz, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_iv); FmgcComputer_DWork.Memory_PreviousInput_fm = FmgcComputer_P.Logic_table_dr[(((static_cast - (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && (rtb_y_hh && Memory_PreviousInput_d_tmp && - Memory_PreviousInput_d_tmp_tmp))) << 1) + (rtb_Compare_a5 || + (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_c && (rtb_y_od && Memory_PreviousInput_k_tmp_tmp_0 && + Memory_PreviousInput_d_tmp))) << 1) + (rtb_y_jt || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_fm]; @@ -2975,10 +2989,10 @@ void FmgcComputer::step() rtb_Switch_i_glideslope_deviation_deg_Data; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_n0, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_d, &rtb_DataTypeConversion1_e); - rtb_NOT_b = rtb_y_a0_tmp; + rtb_NOT_b = rtb_y_lh_tmp; FmgcComputer_MATLABFunction(&rtb_BusAssignment_b0_logic_ils_computation_data_glideslope_deviation_deg, FmgcComputer_P.A429ValueOrDefault_defaultValue_g, &rtb_y_gtq); FmgcComputer_LagFilter(rtb_y_gtq, FmgcComputer_P.LagFilter_C1, FmgcComputer_U.in.time.dt, @@ -2989,17 +3003,16 @@ void FmgcComputer::step() rtb_Nosewheel_c = rtb_y_gtq; } - FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_b0_logic_ils_computation_data_glideslope_deviation_deg, - &rtb_Compare_a5); - rtb_Compare_a5 = (rtb_y_cq && FmgcComputer_DWork.Delay_DSTATE.armed_modes.glide_armed && rtb_y_a0_tmp && - (((rtb_DataTypeConversion2_kb < FmgcComputer_DWork.DelayInput1_DSTATE_b) && (rtb_Nosewheel_c < + FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_b0_logic_ils_computation_data_glideslope_deviation_deg, &rtb_y_jt); + rtb_y_jt = (rtb_y_c && FmgcComputer_DWork.Delay_DSTATE.armed_modes.glide_armed && rtb_y_lh_tmp && + (((rtb_DataTypeConversion2_kb < FmgcComputer_DWork.DelayInput1_DSTATE_b) && (rtb_Nosewheel_c < FmgcComputer_P.CompareToConstant1_const_n2)) || (rtb_Nosewheel_c < FmgcComputer_P.CompareToConstant2_const_i)) && - rtb_Compare_a5); - rtb_Compare_du = ((rtb_Compare_du && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || rtb_Compare_a5); - FmgcComputer_MATLABFunction_a(rtb_Compare_du, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_g, - FmgcComputer_P.ConfirmNode_timeDelay_a3g, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_bs); - rtb_y_fd = (rtb_OR1_j || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active); - FmgcComputer_DWork.Memory_PreviousInput_nu = FmgcComputer_P.Logic_table_d3[(((((!rtb_Compare_a5) && (rtb_y_fd || + rtb_y_jt); + rtb_Compare_bj = ((rtb_Compare_bj && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || rtb_y_jt); + FmgcComputer_MATLABFunction_a(rtb_Compare_bj, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_g, + FmgcComputer_P.ConfirmNode_timeDelay_a3g, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_bs); + rtb_GreaterThan3 = (rtb_OR2_l_tmp || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_des_active); + FmgcComputer_DWork.Memory_PreviousInput_nu = FmgcComputer_P.Logic_table_d3[(((((!rtb_y_jt) && (rtb_GreaterThan3 || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || @@ -3007,13 +3020,13 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset) - + (static_cast(rtb_Compare_du) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_nu]; + + (static_cast(rtb_Compare_bj) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_nu]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_nl, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_g, &rtb_DataTypeConversion1_e); - rtb_Compare_a5 = rtb_y_cq; + rtb_y_jt = rtb_y_c; FmgcComputer_MATLABFunction_a(FmgcComputer_DWork.Memory_PreviousInput_nu, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_gr, FmgcComputer_P.ConfirmNode_timeDelay_m, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_muf); @@ -3025,47 +3038,47 @@ void FmgcComputer::step() rtb_DataTypeConversion8 = rtb_y_gtq; } - rtb_Compare_du = ((rtb_Compare_du && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_cq && rtb_NOT_b && + rtb_Compare_bj = ((rtb_Compare_bj && (rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_c && rtb_NOT_b && (rtb_DataTypeConversion8 < FmgcComputer_P.CompareToConstant2_const_h))); - FmgcComputer_MATLABFunction_a(rtb_Compare_du, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_o, - FmgcComputer_P.ConfirmNode_timeDelay_mu, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_dba); - rtb_y_fd = (rtb_y_fd || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active); - FmgcComputer_DWork.Memory_PreviousInput_as = FmgcComputer_P.Logic_table_fi[(((((!rtb_Compare_a5) && (rtb_y_fd || + FmgcComputer_MATLABFunction_a(rtb_Compare_bj, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_o, + FmgcComputer_P.ConfirmNode_timeDelay_mu, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_dba); + rtb_GreaterThan3 = (rtb_GreaterThan3 || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active); + FmgcComputer_DWork.Memory_PreviousInput_as = FmgcComputer_P.Logic_table_fi[(((((!rtb_y_jt) && (rtb_GreaterThan3 || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active || FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) || rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset) - + (static_cast(rtb_Compare_du) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_as]; + + (static_cast(rtb_Compare_bj) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_as]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_7, FmgcComputer_P.BitfromLabel_bit_h, &rtb_DataTypeConversion1_e); rtb_NOT_b = FmgcComputer_DWork.Memory_PreviousInput_n0; - rtb_Compare_a5 = (rtb_y_cq && rtb_NOT1_i); + rtb_y_jt = (rtb_y_c && rtb_NOT1_i); FmgcComputer_DWork.Memory_PreviousInput_n0 = FmgcComputer_P.Logic_table_id[(((static_cast - (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_Compare_a5 && + (((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l) || (rtb_y_jt && FmgcComputer_U.in.discrete_inputs.tcas_ta_display)) << 1) + ((!FmgcComputer_U.in.discrete_inputs.tcas_ta_display) || rtb_y_lh || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.tcas_active)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_n0]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_7, FmgcComputer_P.BitfromLabel2_bit_g, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_DataTypeConversion1_e != 0U); + rtb_Compare_bj = (rtb_DataTypeConversion1_e != 0U); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel1_bit_n4, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode1_isRisingEdge_i, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_owv); - rtb_Compare_a5 = (rtb_Compare_a5 && rtb_NOT_b); - rtb_Compare_du = ((rtb_Compare_du && rtb_OR2_l) || rtb_Compare_a5); - FmgcComputer_MATLABFunction_a(rtb_Compare_du, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_jj, - FmgcComputer_P.ConfirmNode_timeDelay_ae, &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_jrd); - absVsTarget = static_cast(((((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || (rtb_y_fd || + rtb_y_jt = (rtb_y_jt && rtb_NOT_b); + rtb_Compare_bj = ((rtb_Compare_bj && rtb_OR2_l) || rtb_y_jt); + FmgcComputer_MATLABFunction_a(rtb_Compare_bj, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_jj, + FmgcComputer_P.ConfirmNode_timeDelay_ae, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_jrd); + absVsTarget = static_cast(((((rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset || (rtb_GreaterThan3 || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.op_clb_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active || FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active || - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) && (!rtb_Compare_a5)) + (static_cast - (rtb_Compare_du) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_i5); + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active)) && (!rtb_y_jt)) + (static_cast + (rtb_Compare_bj) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_i5); rtb_Logic_ac[0U] = FmgcComputer_P.Logic_table_fn[static_cast(absVsTarget)]; rtb_Logic_ac[1U] = FmgcComputer_P.Logic_table_fn[static_cast(absVsTarget) + 8U]; if (FmgcComputer_P.EnumeratedConstant_Value_g != FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode) { @@ -3074,16 +3087,16 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.tcas_bus.vertical_resolution_advisory, FmgcComputer_P.BitfromLabel3_bit_h, &rtb_DataTypeConversion1_e); - rtb_Compare_du = (rtb_DataTypeConversion1_e == 0U); - rtb_Compare_a5 = !FmgcComputer_DWork.Delay_DSTATE.armed_modes.alt_acq_armed; + rtb_Compare_bj = (rtb_DataTypeConversion1_e == 0U); + rtb_y_jt = !FmgcComputer_DWork.Delay_DSTATE.armed_modes.alt_acq_armed; rtb_GreaterThan3 = FmgcComputer_DWork.Memory_PreviousInput_h; FmgcComputer_DWork.Memory_PreviousInput_h = FmgcComputer_P.Logic_table_oq[((((std::abs(FmgcComputer_B.u_lyj - - rtb_altCstrOrFcu) >= FmgcComputer_P.CompareToConstant_const_g) || rtb_Compare_du || rtb_Compare_a5) + ( - static_cast(rtb_NOT_gj) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_h]; + rtb_altCstrOrFcu) >= FmgcComputer_P.CompareToConstant_const_g) || rtb_Compare_bj || rtb_y_jt) + + (static_cast(rtb_OR2_l_tmp_1) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_h]; rtb_NOT_b = ((FmgcComputer_P.EnumeratedConstant1_Value_eq == FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode) && Memory_PreviousInput_k_tmp_tmp_tmp); FmgcComputer_DWork.Memory_PreviousInput_cp = FmgcComputer_P.Logic_table_dj[(((static_cast(rtb_NOT_b) << 1) - + (rtb_Compare_a5 || rtb_Compare_du)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_cp]; + + (rtb_y_jt || rtb_Compare_bj)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_cp]; if (FmgcComputer_DWork.Memory_PreviousInput_h) { rtb_mode = tcas_submode::ALT_ACQ; } else if (FmgcComputer_DWork.Memory_PreviousInput_cp) { @@ -3106,12 +3119,12 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault2_defaultValue_jb, &rtb_y_jq); FmgcComputer_MATLABFunction(&rtb_BusAssignment_kc_logic_chosen_fac_bus_v_ls_kn, FmgcComputer_P.A429ValueOrDefault4_defaultValue_e, &rtb_y_gtq); - rtb_OR2_l_tmp = (FmgcComputer_DWork.Memory_PreviousInput_b3 || FmgcComputer_DWork.Memory_PreviousInput_ev || - FmgcComputer_DWork.Memory_PreviousInput_o); + rtb_NOT3_tmp = (FmgcComputer_DWork.Memory_PreviousInput_b3 || FmgcComputer_DWork.Memory_PreviousInput_ev || + FmgcComputer_DWork.Memory_PreviousInput_o); rtb_y_lh = (FmgcComputer_DWork.Memory_PreviousInput_ec || FmgcComputer_DWork.Memory_PreviousInput_ae || FmgcComputer_DWork.Memory_PreviousInput_mx); - rtb_Compare_fn = (((rtb_y_lh && (rtb_y_fl < rtb_y_jq)) || ((rtb_y_jq < rtb_y_gtq + FmgcComputer_P.Bias1_Bias_c) && - rtb_OR2_l_tmp)) && rtb_Compare_fn && FmgcComputer_DWork.Delay_DSTATE_k && fdOwnOff); + rtb_Compare_gc = (((rtb_y_lh && (rtb_y_fl < rtb_y_jq)) || ((rtb_y_jq < rtb_y_gtq + FmgcComputer_P.Bias1_Bias_c) && + rtb_NOT3_tmp)) && rtb_Compare_gc && FmgcComputer_DWork.Delay_DSTATE_k && fdOwnOff); rtb_BusAssignment_ds_logic_ir_computation_data_flight_path_angle_deg.SSM = rtb_irComputationBus_flight_path_angle_deg_SSM; rtb_BusAssignment_ds_logic_ir_computation_data_flight_path_angle_deg.Data = @@ -3125,7 +3138,7 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction(&rtb_BusAssignment_ds_logic_ir_computation_data_flight_path_angle_deg, FmgcComputer_P.A429ValueOrDefault3_defaultValue_i, &rtb_y_mw); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_vz_ft_min, - FmgcComputer_P.A429ValueOrDefault_defaultValue_pc, &rtb_y_g); + FmgcComputer_P.A429ValueOrDefault_defaultValue_pc, &rtb_y_jv); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ds_logic_ir_computation_data_inertial_vertical_speed_ft_s, FmgcComputer_P.A429ValueOrDefault2_defaultValue_g, &rtb_y_cf); FmgcComputer_MATLABFunction(&rtb_BusAssignment_kc_logic_chosen_fac_bus_v_ls_kn, @@ -3134,56 +3147,56 @@ void FmgcComputer::step() FmgcComputer_P.A429ValueOrDefault4_defaultValue_b, &rtb_y_fl); FmgcComputer_MATLABFunction(&rtb_BusAssignment_kc_logic_adr_computation_data_airspeed_computed_kn, FmgcComputer_P.A429ValueOrDefault5_defaultValue_f, &rtb_y_jq); - rtb_appInop_idx_2 = (rtb_AND12 || Memory_PreviousInput_l_tmp); + rtb_appInop_idx_2 = (rtb_AND12 || Memory_PreviousInput_l_tmp_0); if (rtb_AND12) { - rtb_DataTypeConversion2_bh = rtb_y_cf - rtb_y_g; + rtb_DataTypeConversion2_bh = rtb_y_cf - rtb_y_jv; rtb_Phi_c_deg = 50.0; } else { rtb_DataTypeConversion2_bh = rtb_y_mw - rtb_DataTypeConversion2_bh; rtb_Phi_c_deg = 0.1; } - rtb_Compare_a5 = (rtb_Logic_a2[0] && rtb_appInop_idx_2); - rtb_y_h = ((rtb_Compare_a5 && (rtb_y_jq < rtb_y_gtq + 3.0F) && (rtb_DataTypeConversion2_bh < -rtb_Phi_c_deg)) || - (rtb_Compare_a5 && (rtb_y_jq > rtb_y_fl - 3.0F) && (rtb_DataTypeConversion2_bh > rtb_Phi_c_deg))); - FmgcComputer_MATLABFunction_m((apCondition && (rtb_y_h || rtb_Compare_fn || rtb_y_hy || rtb_NOT3_tmp || rtb_AND8)), - FmgcComputer_U.in.time.dt, &rtb_NOT_b, FmgcComputer_P.MTrigNode2_isRisingEdge_p, - FmgcComputer_P.MTrigNode2_retriggerable_i, FmgcComputer_P.MTrigNode2_triggerDuration_f, - &FmgcComputer_DWork.sf_MATLABFunction_hdx); - FmgcComputer_MATLABFunction_g(apCondition, FmgcComputer_P.PulseNode_isRisingEdge_fo, &rtb_Compare_a5, + rtb_y_jt = (rtb_Logic_a2[0] && rtb_appInop_idx_2); + rtb_AND10_b = ((rtb_y_jt && (rtb_y_jq < rtb_y_gtq + 3.0F) && (rtb_DataTypeConversion2_bh < -rtb_Phi_c_deg)) || + (rtb_y_jt && (rtb_y_jq > rtb_y_fl - 3.0F) && (rtb_DataTypeConversion2_bh > rtb_Phi_c_deg))); + FmgcComputer_MATLABFunction_m((apCondition && (rtb_AND10_b || rtb_Compare_gc || rtb_y_dk || + Memory_PreviousInput_d_tmp_tmp || rtb_AND8)), FmgcComputer_U.in.time.dt, &rtb_NOT_b, + FmgcComputer_P.MTrigNode2_isRisingEdge_p, FmgcComputer_P.MTrigNode2_retriggerable_i, + FmgcComputer_P.MTrigNode2_triggerDuration_f, &FmgcComputer_DWork.sf_MATLABFunction_hdx); + FmgcComputer_MATLABFunction_g(apCondition, FmgcComputer_P.PulseNode_isRisingEdge_fo, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_h0f); - absVsTarget_tmp = !rtb_Logic_ac[0]; - rtb_Compare_du = (rtb_Compare_a5 && absVsTarget_tmp); - FmgcComputer_MATLABFunction_m((rtb_NOT3_tmp || rtb_Compare_du), FmgcComputer_U.in.time.dt, &rtb_Compare_a5, - FmgcComputer_P.MTrigNode_isRisingEdge_jn, FmgcComputer_P.MTrigNode_retriggerable_n, + rtb_OR2_l_tmp_0 = !rtb_Logic_ac[0]; + rtb_Compare_bj = (rtb_y_jt && rtb_OR2_l_tmp_0); + FmgcComputer_MATLABFunction_m((Memory_PreviousInput_d_tmp_tmp || rtb_Compare_bj), FmgcComputer_U.in.time.dt, + &rtb_y_jt, FmgcComputer_P.MTrigNode_isRisingEdge_jn, FmgcComputer_P.MTrigNode_retriggerable_n, FmgcComputer_P.MTrigNode_triggerDuration_c, &FmgcComputer_DWork.sf_MATLABFunction_ppo); - FmgcComputer_MATLABFunction_m((rtb_AND8 || rtb_Compare_du), FmgcComputer_U.in.time.dt, &rtb_Compare_du, + FmgcComputer_MATLABFunction_m((rtb_AND8 || rtb_Compare_bj), FmgcComputer_U.in.time.dt, &rtb_Compare_bj, FmgcComputer_P.MTrigNode1_isRisingEdge_g, FmgcComputer_P.MTrigNode1_retriggerable_h, FmgcComputer_P.MTrigNode1_triggerDuration_m, &FmgcComputer_DWork.sf_MATLABFunction_hd1); rtb_BusAssignment_hz_logic_ra_computation_data_radio_height_ft.SSM = rtb_raComputationData_radio_height_ft_SSM; rtb_BusAssignment_hz_logic_ra_computation_data_radio_height_ft.Data = rtb_raComputationData_radio_height_ft_Data; - rtb_NOT3_tmp_0 = rtb_NOT_b; - rtb_y_a0_tmp = rtb_Compare_a5; - rtb_AND_e_tmp = rtb_Compare_du; - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_hdg_deg, &rtb_Compare_a5); - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_trk_deg, &rtb_Compare_du); + rtb_OR2_l_tmp = rtb_NOT_b; + rtb_NOT3_tmp_0 = rtb_y_jt; + rtb_y_lh_tmp = rtb_Compare_bj; + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_hdg_deg, &rtb_y_jt); + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_trk_deg, &rtb_Compare_bj); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel2_bit_gy, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_m((rtb_Compare_a5 || rtb_Compare_du || (rtb_DataTypeConversion1_e != 0U)), + FmgcComputer_MATLABFunction_m((rtb_y_jt || rtb_Compare_bj || (rtb_DataTypeConversion1_e != 0U)), FmgcComputer_U.in.time.dt, &rtb_NOT_b, FmgcComputer_P.MTrigNode1_isRisingEdge_p, FmgcComputer_P.MTrigNode1_retriggerable_o, FmgcComputer_P.MTrigNode1_triggerDuration_g, &FmgcComputer_DWork.sf_MATLABFunction_dln); FmgcComputer_MATLABFunction_a(FmgcComputer_DWork.Memory_PreviousInput_i1, FmgcComputer_U.in.time.dt, - FmgcComputer_P.ConfirmNode1_isRisingEdge_a, FmgcComputer_P.ConfirmNode1_timeDelay_b, &rtb_Compare_a5, + FmgcComputer_P.ConfirmNode1_isRisingEdge_a, FmgcComputer_P.ConfirmNode1_timeDelay_b, &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_k4v); - rtb_Compare_du = (FmgcComputer_DWork.Memory_PreviousInput_cv || FmgcComputer_DWork.Memory_PreviousInput_lq || + rtb_Compare_bj = (FmgcComputer_DWork.Memory_PreviousInput_cv || FmgcComputer_DWork.Memory_PreviousInput_lq || FmgcComputer_DWork.Memory_PreviousInput_d || rtb_Logic_b[0] || FmgcComputer_DWork.Memory_PreviousInput_el || FmgcComputer_DWork.Memory_PreviousInput_b); - rtb_Compare_a5 = (rtb_Compare_a5 || rtb_Compare_du); + rtb_y_jt = (rtb_y_jt || rtb_Compare_bj); FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_hz_logic_ra_computation_data_radio_height_ft, &rtb_y_gtq); - rtb_Compare_du = (rtb_Compare_du || rtb_y_km || ((rtb_y_gtq < FmgcComputer_P.CompareToConstant_const_cn) && - rtb_Compare_mh)); - rtb_Compare_a5 = (rtb_NOT_b && rtb_Compare_a5 && rtb_Compare_du); + rtb_Compare_bj = (rtb_Compare_bj || rtb_y_mj || ((rtb_y_gtq < FmgcComputer_P.CompareToConstant_const_cn) && + rtb_Compare_ov)); + rtb_y_jt = (rtb_NOT_b && rtb_y_jt && rtb_Compare_bj); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_2, FmgcComputer_P.BitfromLabel1_bit_pq, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_m((rtb_DataTypeConversion1_e != 0U), FmgcComputer_U.in.time.dt, &rtb_NOT_b, @@ -3192,95 +3205,94 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_a(rtb_appCapability_idx_2, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_nz, FmgcComputer_P.ConfirmNode_timeDelay_a5, &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_k0); - FmgcComputer_DWork.Memory_PreviousInput_bw = FmgcComputer_P.Logic_table_bs[((((!rtb_Compare_du) || rtb_y_da || - rtb_AND9 || FmgcComputer_DWork.Memory_PreviousInput_ip || rtb_NOT_b || rtb_GreaterThan3) + (static_cast - (rtb_Compare_a5) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_bw]; + FmgcComputer_DWork.Memory_PreviousInput_bw = FmgcComputer_P.Logic_table_bs[((((!rtb_Compare_bj) || rtb_OR_iw || + rtb_y_j1 || FmgcComputer_DWork.Memory_PreviousInput_ip || rtb_NOT_b || rtb_GreaterThan3) + (static_cast + (rtb_y_jt) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_bw]; rtb_BusAssignment_ks_logic_adr_computation_data_altitude_corrected_ft.SSM = rtb_adrComputationBus_altitude_corrected_ft_SSM; rtb_BusAssignment_ks_logic_adr_computation_data_altitude_corrected_ft.Data = rtb_adrComputationBus_altitude_corrected_ft_Data; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_5, FmgcComputer_P.BitfromLabel1_bit_aw, &rtb_DataTypeConversion1_e); - rtb_Compare_du = ((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l); - rtb_Compare_a5 = rtb_y_cq; - FmgcComputer_MATLABFunction_a(rtb_OR_m4, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge_b4, + rtb_Compare_bj = ((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l); + rtb_y_jt = rtb_y_c; + FmgcComputer_MATLABFunction_a(rtb_OR_i, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge_b4, FmgcComputer_P.ConfirmNode1_timeDelay_h, &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_hjm); - FmgcComputer_MATLABFunction_g(rtb_GreaterThan3, FmgcComputer_P.PulseNode3_isRisingEdge_ko, &rtb_y_fd, + FmgcComputer_MATLABFunction_g(rtb_GreaterThan3, FmgcComputer_P.PulseNode3_isRisingEdge_ko, &rtb_y_e2, &FmgcComputer_DWork.sf_MATLABFunction_od); rtb_NOT_b = rtb_appCapability_idx_2; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_gv, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode2_isRisingEdge_f, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_d5); - rtb_NOT_b = (rtb_NOT_b && rtb_y_e); + rtb_NOT_b = (rtb_NOT_b && rtb_y_ogh); FmgcComputer_MATLABFunction(&rtb_BusAssignment_ks_logic_adr_computation_data_altitude_corrected_ft, FmgcComputer_P.A429ValueOrDefault3_defaultValue_a, &rtb_y_gtq); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_alt_ft, FmgcComputer_P.A429ValueOrDefault_defaultValue_mh, &rtb_y_jq); - rtb_Compare_mh = !FmgcComputer_DWork.Memory_PreviousInput_k; - rtb_GreaterThan3 = (FmgcComputer_U.in.fms_inputs.preset_spd_mach_activate && (rtb_Compare_mh || (rtb_y_gtq <= + rtb_Compare_ov = !FmgcComputer_DWork.Memory_PreviousInput_k; + rtb_GreaterThan3 = (FmgcComputer_U.in.fms_inputs.preset_spd_mach_activate && (rtb_Compare_ov || (rtb_y_gtq <= rtb_y_jq))); FmgcComputer_MATLABFunction_g((FmgcComputer_U.in.fms_inputs.v_managed_kts == - FmgcComputer_P.CompareToConstant1_const_e), FmgcComputer_P.PulseNode4_isRisingEdge_a, &rtb_y_i2, + FmgcComputer_P.CompareToConstant1_const_e), FmgcComputer_P.PulseNode4_isRisingEdge_a, &rtb_y_pw, &FmgcComputer_DWork.sf_MATLABFunction_aag); - rtb_y_hh = rtb_OR_m4; - rtb_y_ff = !FmgcComputer_DWork.Memory_PreviousInput_i; - rtb_y_oi = (rtb_Compare_mh && rtb_y_ff && (!FmgcComputer_DWork.Memory_PreviousInput_nu) && + rtb_y_od = rtb_OR_i; + rtb_y_bk = !FmgcComputer_DWork.Memory_PreviousInput_i; + rtb_y_js = (rtb_Compare_ov && rtb_y_bk && (!FmgcComputer_DWork.Memory_PreviousInput_nu) && (!FmgcComputer_DWork.Memory_PreviousInput_as) && (!FmgcComputer_DWork.Memory_PreviousInput_d)); - FmgcComputer_MATLABFunction_g(rtb_Logic_ac[0], FmgcComputer_P.PulseNode7_isRisingEdge, &rtb_y_hh, + FmgcComputer_MATLABFunction_g(rtb_Logic_ac[0], FmgcComputer_P.PulseNode7_isRisingEdge, &rtb_y_od, &FmgcComputer_DWork.sf_MATLABFunction_itu); - rtb_OR1_j = (rtb_Compare_du || (rtb_y_cq && ((FmgcComputer_DWork.Delay_DSTATE_fe && rtb_OR_m4) || - ((FmgcComputer_U.in.fms_inputs.v_managed_kts == FmgcComputer_P.CompareToConstant_const_d) && rtb_y_fd && rtb_y_oi) + rtb_OR1_j = (rtb_Compare_bj || (rtb_y_c && ((FmgcComputer_DWork.Delay_DSTATE_fe && rtb_OR_i) || + ((FmgcComputer_U.in.fms_inputs.v_managed_kts == FmgcComputer_P.CompareToConstant_const_d) && rtb_y_e2 && rtb_y_js) || (rtb_appCapability_idx_2 && (FmgcComputer_U.in.fms_inputs.fms_flight_phase != - FmgcComputer_P.EnumeratedConstant_Value_ad)) || rtb_NOT_b || rtb_GreaterThan3 || (rtb_y_i2 && rtb_OR_m4 && - rtb_y_oi) || rtb_y_hh))); + FmgcComputer_P.EnumeratedConstant_Value_ad)) || rtb_NOT_b || rtb_GreaterThan3 || (rtb_y_pw && rtb_OR_i && rtb_y_js) + || rtb_y_od))); FmgcComputer_MATLABFunction_a(rtb_OR1_j, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ch, - FmgcComputer_P.ConfirmNode_timeDelay_ht, &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_jcu); + FmgcComputer_P.ConfirmNode_timeDelay_ht, &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_jcu); FmgcComputer_MATLABFunction_g(rtb_BusAssignment_h_logic_engine_running, FmgcComputer_P.PulseNode6_isRisingEdge_j, - &rtb_Compare_a5, &FmgcComputer_DWork.sf_MATLABFunction_abn); + &rtb_y_jt, &FmgcComputer_DWork.sf_MATLABFunction_abn); FmgcComputer_MATLABFunction_g(apCondition, FmgcComputer_P.PulseNode5_isRisingEdge_i, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_kzm); FmgcComputer_DWork.Memory_PreviousInput_cu = FmgcComputer_P.Logic_table_kg - [((((FmgcComputer_DWork.Delay_DSTATE.auto_spd_control_active && (!rtb_Compare_du)) || (rtb_y_km && (rtb_Compare_a5 - || rtb_NOT_b))) + (static_cast(rtb_OR1_j) << 1)) << 1) + - FmgcComputer_DWork.Memory_PreviousInput_cu]; + [((((FmgcComputer_DWork.Delay_DSTATE.auto_spd_control_active && (!rtb_Compare_bj)) || (rtb_y_mj && (rtb_y_jt || + rtb_NOT_b))) + (static_cast(rtb_OR1_j) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_cu]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_5, FmgcComputer_P.BitfromLabel_bit_kq, &rtb_DataTypeConversion1_e); - rtb_Compare_du = ((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l); - FmgcComputer_MATLABFunction_g(apCondition, FmgcComputer_P.PulseNode1_isRisingEdge_n, &rtb_y_hh, + rtb_Compare_bj = ((rtb_DataTypeConversion1_e != 0U) && rtb_OR2_l); + FmgcComputer_MATLABFunction_g(apCondition, FmgcComputer_P.PulseNode1_isRisingEdge_n, &rtb_y_od, &FmgcComputer_DWork.sf_MATLABFunction_ab); - rtb_Compare_a5 = (FmgcComputer_U.in.fms_inputs.v_2_kts != FmgcComputer_P.CompareToConstant_const_e); + rtb_y_jt = (FmgcComputer_U.in.fms_inputs.v_2_kts != FmgcComputer_P.CompareToConstant_const_e); FmgcComputer_MATLABFunction_g(rtb_BusAssignment_h_logic_engine_running, FmgcComputer_P.PulseNode5_isRisingEdge_b, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_hkc); - FmgcComputer_MATLABFunction_g(rtb_Compare_a5, FmgcComputer_P.PulseNode2_isRisingEdge_iu, &rtb_GreaterThan3, + FmgcComputer_MATLABFunction_g(rtb_y_jt, FmgcComputer_P.PulseNode2_isRisingEdge_iu, &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_ft); rtb_GreaterThan3 = (apCondition && rtb_GreaterThan3); - rtb_NOT_b = ((rtb_y_hh && rtb_Compare_a5) || (rtb_NOT_b && rtb_Compare_a5 && apCondition) || rtb_GreaterThan3); + rtb_NOT_b = ((rtb_y_od && rtb_y_jt) || (rtb_NOT_b && rtb_y_jt && apCondition) || rtb_GreaterThan3); rtb_OR1_j = (FmgcComputer_DWork.Memory_PreviousInput_i || FmgcComputer_DWork.Memory_PreviousInput_k); - FmgcComputer_MATLABFunction_g(rtb_OR1_j, FmgcComputer_P.PulseNode3_isRisingEdge_i, &rtb_y_hh, + FmgcComputer_MATLABFunction_g(rtb_OR1_j, FmgcComputer_P.PulseNode3_isRisingEdge_i, &rtb_y_od, &FmgcComputer_DWork.sf_MATLABFunction_mrn); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel2_bit_ie, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_jp, &rtb_y_oi, + FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_jp, &rtb_y_js, &FmgcComputer_DWork.sf_MATLABFunction_ih); FmgcComputer_MATLABFunction_g((FmgcComputer_DWork.Memory_PreviousInput_mx || FmgcComputer_DWork.Memory_PreviousInput_o), FmgcComputer_P.PulseNode4_isRisingEdge_n, &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_lr); - rtb_Compare_a5 = ((rtb_y_km && rtb_NOT_b) || (rtb_y_hh || rtb_y_oi || rtb_GreaterThan3)); + rtb_y_jt = ((rtb_y_mj && rtb_NOT_b) || (rtb_y_od || rtb_y_js || rtb_GreaterThan3)); rtb_NOT_b = (FmgcComputer_U.in.fms_inputs.v_managed_kts != FmgcComputer_P.CompareToConstant2_const_m); rtb_GreaterThan3 = (FmgcComputer_U.in.fms_inputs.v_2_kts != FmgcComputer_P.CompareToConstant3_const_j); - rtb_Compare_a5 = (rtb_Compare_du || (rtb_y_cq && rtb_Compare_a5 && (rtb_NOT_b || rtb_GreaterThan3))); - FmgcComputer_MATLABFunction_a(rtb_Compare_a5, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_h2, - FmgcComputer_P.ConfirmNode_timeDelay_gz, &rtb_Compare_du, &FmgcComputer_DWork.sf_MATLABFunction_j3h); + rtb_y_jt = (rtb_Compare_bj || (rtb_y_c && rtb_y_jt && (rtb_NOT_b || rtb_GreaterThan3))); + FmgcComputer_MATLABFunction_a(rtb_y_jt, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_h2, + FmgcComputer_P.ConfirmNode_timeDelay_gz, &rtb_Compare_bj, &FmgcComputer_DWork.sf_MATLABFunction_j3h); FmgcComputer_MATLABFunction_g((FmgcComputer_U.in.fms_inputs.v_managed_kts == FmgcComputer_P.CompareToConstant4_const_n), FmgcComputer_P.PulseNode6_isRisingEdge_k, &rtb_GreaterThan3, &FmgcComputer_DWork.sf_MATLABFunction_dq); FmgcComputer_MATLABFunction_g((FmgcComputer_U.in.fms_inputs.v_2_kts == FmgcComputer_P.CompareToConstant5_const_h), FmgcComputer_P.PulseNode7_isRisingEdge_c, &rtb_NOT_b, &FmgcComputer_DWork.sf_MATLABFunction_hpe); FmgcComputer_DWork.Memory_PreviousInput_hk = FmgcComputer_P.Logic_table_ds - [((((FmgcComputer_DWork.Delay_DSTATE.manual_spd_control_active && (!rtb_Compare_du)) || (rtb_y_km && (rtb_y_ff && - rtb_Compare_mh && rtb_y_n) && (rtb_GreaterThan3 || rtb_NOT_b))) + (static_cast(rtb_Compare_a5) << - 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_hk]; + [((((FmgcComputer_DWork.Delay_DSTATE.manual_spd_control_active && (!rtb_Compare_bj)) || (rtb_y_mj && (rtb_y_bk && + rtb_Compare_ov && rtb_y_d) && (rtb_GreaterThan3 || rtb_NOT_b))) + (static_cast(rtb_y_jt) << 1)) << + 1) + FmgcComputer_DWork.Memory_PreviousInput_hk]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel_bit_as, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_g((rtb_DataTypeConversion1_e != 0U), FmgcComputer_P.PulseNode_isRisingEdge_c2, @@ -3311,10 +3323,10 @@ void FmgcComputer::step() rtb_BusAssignment_dc_logic_chosen_fac_bus_v_max_kn.Data = rtb_Switch_v_max_kn_Data; FmgcComputer_MATLABFunction(&rtb_BusAssignment_dc_logic_adr_computation_data_corrected_average_static_pressure, FmgcComputer_P.A429ValueOrDefault2_defaultValue_b, &rtb_y_gtq); - rtb_y_g = std::pow((std::pow(FmgcComputer_U.in.bus_inputs.fcu_bus.selected_mach.Data * + rtb_y_jv = std::pow((std::pow(FmgcComputer_U.in.bus_inputs.fcu_bus.selected_mach.Data * FmgcComputer_U.in.bus_inputs.fcu_bus.selected_mach.Data * 0.2F + 1.0F, 3.5F) - 1.0F) * (rtb_y_gtq / 1013.25F) + - 1.0F, 0.285714298F); - if (rtb_y_n) { + 1.0F, 0.285714298F); + if (rtb_y_d) { FmgcComputer_B.u_l = FmgcComputer_U.in.fms_inputs.v_managed_kts; } @@ -3340,7 +3352,7 @@ void FmgcComputer::step() FmgcComputer_DWork.vMemoGa_not_empty = true; } - if (rtb_y_ff) { + if (rtb_y_bk) { FmgcComputer_DWork.vMemoGa = rtb_y_cf; } @@ -3398,7 +3410,7 @@ void FmgcComputer::step() } } else { if (FmgcComputer_DWork.Delay_DSTATE_c) { - rtb_y_jq = std::sqrt(rtb_y_g - 1.0F) * 1479.1F; + rtb_y_jq = std::sqrt(rtb_y_jv - 1.0F) * 1479.1F; } else { rtb_y_jq = FmgcComputer_U.in.bus_inputs.fcu_bus.selected_spd_kts.Data; } @@ -3407,13 +3419,13 @@ void FmgcComputer::step() rtb_Switch_of[1] = rtb_y_jq; } - rtb_Compare_du = (FmgcComputer_DWork.Memory_PreviousInput_cb && (FmgcComputer_U.in.fms_inputs.fms_flight_phase == + rtb_Compare_bj = (FmgcComputer_DWork.Memory_PreviousInput_cb && (FmgcComputer_U.in.fms_inputs.fms_flight_phase == FmgcComputer_P.EnumeratedConstant_Value_a4) && FmgcComputer_DWork.Delay_DSTATE_c && FmgcComputer_DWork.Delay_DSTATE_k); rtb_Phi_c_deg = std::abs(rtb_Switch_of[0] - rtb_Max_a); - rtb_Compare_mh = (rtb_Phi_c_deg > FmgcComputer_P.CompareToConstant_const_h); - FmgcComputer_MATLABFunction_a(rtb_Compare_mh, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge_i, - FmgcComputer_P.ConfirmNode1_timeDelay_df, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_hi); + rtb_Compare_ov = (rtb_Phi_c_deg > FmgcComputer_P.CompareToConstant_const_h); + FmgcComputer_MATLABFunction_a(rtb_Compare_ov, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode1_isRisingEdge_i, + FmgcComputer_P.ConfirmNode1_timeDelay_df, &rtb_y_bk, &FmgcComputer_DWork.sf_MATLABFunction_hi); FmgcComputer_MATLABFunction_a((rtb_Phi_c_deg > FmgcComputer_P.CompareToConstant1_const_c), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode2_isRisingEdge_i, FmgcComputer_P.ConfirmNode2_timeDelay_i, &rtb_y_me, &FmgcComputer_DWork.sf_MATLABFunction_oep); @@ -3422,23 +3434,23 @@ void FmgcComputer::step() rtb_Phi_c_deg = rtb_y_mw; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fcu_bus.fcu_discrete_word_1, FmgcComputer_P.BitfromLabel3_bit_mz, &rtb_DataTypeConversion1_e); - rtb_Compare_a5 = ((!rtb_Compare_du) || rtb_y_ff || rtb_y_me || (rtb_Max_a > rtb_y_mw + FmgcComputer_P.Bias_Bias) || - (rtb_DataTypeConversion1_e != 0U)); - FmgcComputer_MATLABFunction_a((rtb_Compare_du && (!rtb_Compare_mh) && (!rtb_Compare_a5)), FmgcComputer_U.in.time.dt, + rtb_y_jt = ((!rtb_Compare_bj) || rtb_y_bk || rtb_y_me || (rtb_Max_a > rtb_y_mw + FmgcComputer_P.Bias_Bias) || + (rtb_DataTypeConversion1_e != 0U)); + FmgcComputer_MATLABFunction_a((rtb_Compare_bj && (!rtb_Compare_ov) && (!rtb_y_jt)), FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_dh, FmgcComputer_P.ConfirmNode_timeDelay_mf, &rtb_y_me, &FmgcComputer_DWork.sf_MATLABFunction_nj); - absVsTarget = static_cast((((static_cast(rtb_y_me) << 1) + rtb_Compare_a5) << 1) + + absVsTarget = static_cast((((static_cast(rtb_y_me) << 1) + rtb_y_jt) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ak); rtb_Logic_hq[0U] = FmgcComputer_P.Logic_table_am[static_cast(absVsTarget)]; rtb_Logic_hq[1U] = FmgcComputer_P.Logic_table_am[static_cast(absVsTarget) + 8U]; - rtb_Compare_a5 = (rtb_appInop_idx_2 || FmgcComputer_DWork.Memory_PreviousInput_cb || - FmgcComputer_DWork.Memory_PreviousInput_ne || FmgcComputer_DWork.Memory_PreviousInput_ec || - FmgcComputer_DWork.Memory_PreviousInput_b3 || FmgcComputer_DWork.Memory_PreviousInput_mx || - FmgcComputer_DWork.Memory_PreviousInput_o || rtb_Logic_b[0] || - FmgcComputer_DWork.Memory_PreviousInput_nu || FmgcComputer_DWork.Memory_PreviousInput_as || - FmgcComputer_DWork.Memory_PreviousInput_ae || FmgcComputer_DWork.Memory_PreviousInput_ev || - FmgcComputer_DWork.Memory_PreviousInput_i || FmgcComputer_DWork.Memory_PreviousInput_k || - rtb_Logic_ac[0] || FmgcComputer_DWork.Memory_PreviousInput_d); + rtb_y_jt = (rtb_appInop_idx_2 || FmgcComputer_DWork.Memory_PreviousInput_cb || + FmgcComputer_DWork.Memory_PreviousInput_ne || FmgcComputer_DWork.Memory_PreviousInput_ec || + FmgcComputer_DWork.Memory_PreviousInput_b3 || FmgcComputer_DWork.Memory_PreviousInput_mx || + FmgcComputer_DWork.Memory_PreviousInput_o || rtb_Logic_b[0] || + FmgcComputer_DWork.Memory_PreviousInput_nu || FmgcComputer_DWork.Memory_PreviousInput_as || + FmgcComputer_DWork.Memory_PreviousInput_ae || FmgcComputer_DWork.Memory_PreviousInput_ev || + FmgcComputer_DWork.Memory_PreviousInput_i || FmgcComputer_DWork.Memory_PreviousInput_k || rtb_Logic_ac[0] + || FmgcComputer_DWork.Memory_PreviousInput_d); rtb_active_lateral_law = lateral_law::NONE; rtb_active_longitudinal_law = vertical_law::NONE; if (FmgcComputer_DWork.Memory_PreviousInput_m || FmgcComputer_DWork.Memory_PreviousInput_c) { @@ -3449,9 +3461,9 @@ void FmgcComputer::step() rtb_active_lateral_law = lateral_law::LOC_CPT; } else if (FmgcComputer_DWork.Memory_PreviousInput_ip) { rtb_active_lateral_law = lateral_law::HPATH; - } else if (rtb_AND9 || FmgcComputer_DWork.Memory_PreviousInput_b || FmgcComputer_DWork.Memory_PreviousInput_el) { + } else if (rtb_y_j1 || FmgcComputer_DWork.Memory_PreviousInput_b || FmgcComputer_DWork.Memory_PreviousInput_el) { rtb_active_lateral_law = lateral_law::TRACK; - } else if (rtb_y_da) { + } else if (rtb_OR_iw) { rtb_active_lateral_law = lateral_law::HDG; } @@ -3462,7 +3474,7 @@ void FmgcComputer::step() rtb_active_longitudinal_law = vertical_law::GS; } else if (FmgcComputer_DWork.Memory_PreviousInput_k || FmgcComputer_DWork.Memory_PreviousInput_i) { rtb_active_longitudinal_law = vertical_law::SRS; - } else if (Memory_PreviousInput_l_tmp) { + } else if (Memory_PreviousInput_l_tmp_0) { rtb_active_longitudinal_law = vertical_law::FPA; } else if (rtb_AND12 || (rtb_Logic_ac[0] && (rtb_mode == tcas_submode::VS))) { rtb_active_longitudinal_law = vertical_law::VS; @@ -3496,45 +3508,45 @@ void FmgcComputer::step() } } - rtb_Compare_mh = (rtb_y_cj || FmgcComputer_DWork.Memory_PreviousInput_el || + rtb_Compare_ov = (rtb_y_hi || FmgcComputer_DWork.Memory_PreviousInput_el || FmgcComputer_DWork.Memory_PreviousInput_cv || FmgcComputer_DWork.Memory_PreviousInput_lq || - rtb_y_da || rtb_AND9 || FmgcComputer_DWork.Memory_PreviousInput_ip || + rtb_OR_iw || rtb_y_j1 || FmgcComputer_DWork.Memory_PreviousInput_ip || FmgcComputer_DWork.Memory_PreviousInput_d); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, FmgcComputer_P.BitfromLabel_bit_i, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, &rtb_Compare_du); - rtb_Compare_du = ((rtb_DataTypeConversion1_e != 0U) && rtb_Compare_du); + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_3, &rtb_Compare_bj); + rtb_Compare_bj = ((rtb_DataTypeConversion1_e != 0U) && rtb_Compare_bj); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_4, FmgcComputer_P.BitfromLabel1_bit_i5, &rtb_DataTypeConversion1_e); FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_4, &rtb_OR1_j); - rtb_Compare_du = ((rtb_Compare_du || ((rtb_DataTypeConversion1_e != 0U) && rtb_OR1_j)) && + rtb_Compare_bj = ((rtb_Compare_bj || ((rtb_DataTypeConversion1_e != 0U) && rtb_OR1_j)) && FmgcComputer_U.in.discrete_inputs.ap_opp_engaged); rtb_OR1_j = (rtb_Logic_a2[0] && (FmgcComputer_DWork.Memory_PreviousInput_l || FmgcComputer_DWork.Memory_PreviousInput_d)); - rtb_y_i2 = ((!rtb_ap_inop_tmp) && (FmgcComputer_U.in.discrete_inputs.fwc_own_valid || + rtb_y_me = ((!rtb_ap_inop_tmp) && (FmgcComputer_U.in.discrete_inputs.fwc_own_valid || FmgcComputer_U.in.discrete_inputs.fwc_opp_valid) && FmgcComputer_U.in.discrete_inputs.pfd_own_valid && FmgcComputer_U.in.discrete_inputs.pfd_opp_valid && rtb_BusAssignment_o_logic_both_ils_valid && (rtb_raComputationData_radio_height_ft_SSM == static_cast(SignStatusMatrix::NormalOperation))); - rtb_y_me = (rtb_y_i2 && (!rtb_ap_inop_tmp_tmp) && raOppInvalid); - rtb_y_ff = (FmgcComputer_U.in.discrete_inputs.fwc_own_valid && FmgcComputer_U.in.discrete_inputs.fwc_opp_valid && + rtb_y_od = (rtb_y_me && (!rtb_ap_inop_tmp_tmp) && raOppInvalid); + rtb_y_bk = (FmgcComputer_U.in.discrete_inputs.fwc_own_valid && FmgcComputer_U.in.discrete_inputs.fwc_opp_valid && FmgcComputer_U.in.discrete_inputs.powersupply_split && FmgcComputer_U.in.discrete_inputs.pfd_own_valid && FmgcComputer_U.in.discrete_inputs.pfd_opp_valid && rtb_TmpSignalConversionAtSFunctionInport3_idx_0 && rtb_TmpSignalConversionAtSFunctionInport3_idx_1 && raOppInvalid && rtb_BusAssignment_o_logic_both_ils_valid && rtb_adrOppInvalid && rtb_adrOwnInvalid && FmgcComputer_U.in.discrete_inputs.bscu_own_valid && FmgcComputer_U.in.discrete_inputs.bscu_opp_valid && - rtb_irOwnInvalid); - rtb_appCapability_idx_2 = (FmgcComputer_DWork.pLand3FailOp || (rtb_y_ff && rtb_OR1_j && rtb_Compare_du && + rtb_ir3Invalid); + rtb_appCapability_idx_2 = (FmgcComputer_DWork.pLand3FailOp || (rtb_y_bk && rtb_OR1_j && rtb_Compare_bj && FmgcComputer_DWork.Delay_DSTATE_k)); - rtb_NOT_b = !rtb_appCapability_idx_2; - rtb_y_fd = (FmgcComputer_DWork.pLand3FailPass || (rtb_y_me && rtb_OR1_j && FmgcComputer_DWork.Delay_DSTATE_k && - rtb_NOT_b)); - rtb_NOT_b = (rtb_y_i2 && rtb_OR1_j && (!rtb_y_fd) && rtb_NOT_b); - rtb_y_i2 = !rtb_y_i2; + rtb_y_e2 = !rtb_appCapability_idx_2; + rtb_NOT_b = (FmgcComputer_DWork.pLand3FailPass || (rtb_y_od && rtb_OR1_j && FmgcComputer_DWork.Delay_DSTATE_k && + rtb_y_e2)); + rtb_y_e2 = (rtb_y_me && rtb_OR1_j && (!rtb_NOT_b) && rtb_y_e2); rtb_y_me = !rtb_y_me; - rtb_appInop_idx_2 = !rtb_y_ff; - if ((rtb_raComputationData_radio_height_ft_Data < 100.0F) && (rtb_OR1_j || rtb_Compare_du)) { + rtb_y_pw = !rtb_y_od; + rtb_appInop_idx_2 = !rtb_y_bk; + if ((rtb_raComputationData_radio_height_ft_Data < 100.0F) && (rtb_OR1_j || rtb_Compare_bj)) { FmgcComputer_DWork.pLand3FailOp = rtb_appCapability_idx_2; - FmgcComputer_DWork.pLand3FailPass = rtb_y_fd; + FmgcComputer_DWork.pLand3FailPass = rtb_NOT_b; } else { FmgcComputer_DWork.pLand3FailOp = false; FmgcComputer_DWork.pLand3FailPass = false; @@ -3542,23 +3554,23 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_4, FmgcComputer_P.BitfromLabel2_bit_o, &rtb_DataTypeConversion1_e); - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_4, &rtb_Compare_du); - rtb_TmpSignalConversionAtSFunctionInport3_idx_0 = ((rtb_DataTypeConversion1_e != 0U) && rtb_Compare_du); + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_4, &rtb_Compare_bj); + rtb_TmpSignalConversionAtSFunctionInport3_idx_0 = ((rtb_DataTypeConversion1_e != 0U) && rtb_Compare_bj); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_4, FmgcComputer_P.BitfromLabel3_bit_l, &rtb_DataTypeConversion1_e); - rtb_TmpSignalConversionAtSFunctionInport3_idx_1 = ((rtb_DataTypeConversion1_e != 0U) && rtb_Compare_du); + rtb_TmpSignalConversionAtSFunctionInport3_idx_1 = ((rtb_DataTypeConversion1_e != 0U) && rtb_Compare_bj); FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.discrete_word_4, FmgcComputer_P.BitfromLabel4_bit_fw, &rtb_DataTypeConversion1_e); - rtb_TmpSignalConversionAtSFunctionInport3_idx_2 = ((rtb_DataTypeConversion1_e != 0U) && rtb_Compare_du); + rtb_TmpSignalConversionAtSFunctionInport3_idx_2 = ((rtb_DataTypeConversion1_e != 0U) && rtb_Compare_bj); if (rtb_Logic_a2[0] && FmgcComputer_U.in.discrete_inputs.ap_opp_engaged) { if (FmgcComputer_U.in.discrete_inputs.is_unit_1) { - rtb_TmpSignalConversionAtSFunctionInport3_idx_0 = rtb_NOT_b; - rtb_TmpSignalConversionAtSFunctionInport3_idx_1 = rtb_y_fd; + rtb_TmpSignalConversionAtSFunctionInport3_idx_0 = rtb_y_e2; + rtb_TmpSignalConversionAtSFunctionInport3_idx_1 = rtb_NOT_b; rtb_TmpSignalConversionAtSFunctionInport3_idx_2 = rtb_appCapability_idx_2; } } else if (!rtb_y_k3) { - rtb_TmpSignalConversionAtSFunctionInport3_idx_0 = rtb_NOT_b; - rtb_TmpSignalConversionAtSFunctionInport3_idx_1 = rtb_y_fd; + rtb_TmpSignalConversionAtSFunctionInport3_idx_0 = rtb_y_e2; + rtb_TmpSignalConversionAtSFunctionInport3_idx_1 = rtb_NOT_b; rtb_TmpSignalConversionAtSFunctionInport3_idx_2 = rtb_appCapability_idx_2; } @@ -3577,7 +3589,7 @@ void FmgcComputer::step() rtb_Switch_i_glideslope_deviation_deg_SSM; rtb_BusAssignment_jm_logic_ils_computation_data_glideslope_deviation_deg.Data = rtb_Switch_i_glideslope_deviation_deg_Data; - FmgcComputer_DWork.Delay_DSTATE.any_longitudinal_mode_engaged = rtb_Compare_a5; + FmgcComputer_DWork.Delay_DSTATE.any_longitudinal_mode_engaged = rtb_y_jt; rtb_DataTypeConversion_cm = rtb_irComputationBus_pitch_angle_deg_Data; rtb_DataTypeConversion1_d = rtb_irComputationBus_roll_angle_deg_Data; rtb_DataTypeConversion8 = rtb_irComputationBus_pitch_att_rate_deg_s_Data; @@ -3604,35 +3616,35 @@ void FmgcComputer::step() rtb_Gain1 = FmgcComputer_P.Gain1_Gain * rtb_irComputationBus_body_lat_accel_g_Data; rtb_Nosewheel_c = rtb_irComputationBus_body_normal_accel_g_Data; rtb_Gain2 = (rtb_irComputationBus_body_normal_accel_g_Data + FmgcComputer_P.Bias_Bias_p) * FmgcComputer_P.Gain2_Gain; - if (rtb_y_n) { + if (rtb_y_d) { FmgcComputer_B.u = FmgcComputer_U.in.fms_inputs.fms_loc_distance; } rtb_DataTypeConversion25 = rtb_BusAssignment_f4_logic_ils_computation_data_localizer_deviation_deg.Data; - FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_jm_logic_ils_computation_data_glideslope_deviation_deg, &rtb_y_n); + FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_jm_logic_ils_computation_data_glideslope_deviation_deg, &rtb_y_d); rtb_DataTypeConversion23 = rtb_Switch_i_glideslope_deviation_deg_Data; FmgcComputer_MATLABFunction(&rtb_BusAssignment_jm_logic_chosen_fac_bus_v_ls_kn, FmgcComputer_P.A429ValueOrDefault5_defaultValue_p, &rtb_y_gtq); rtb_DataTypeConversion32 = rtb_y_gtq; FmgcComputer_MATLABFunction(&rtb_BusAssignment_jm_logic_chosen_fac_bus_v_max_kn, - FmgcComputer_P.A429ValueOrDefault6_defaultValue_i, &rtb_y_g); - rtb_DataTypeConversion26 = rtb_y_g; + FmgcComputer_P.A429ValueOrDefault6_defaultValue_i, &rtb_y_jv); + rtb_DataTypeConversion26 = rtb_y_jv; rtb_Gain3 = FmgcComputer_P.Gain3_Gain * FmgcComputer_U.in.fms_inputs.fms_weight_lbs; rtb_DataTypeConversion21 = static_cast(rtb_active_lateral_law); rtb_DataTypeConversion22 = static_cast(rtb_active_longitudinal_law); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_hdg_deg, FmgcComputer_P.A429ValueOrDefault3_defaultValue_j, &rtb_y_mw); rtb_DataTypeConversion39 = rtb_y_mw; - rtb_Compare_du = (FmgcComputer_DWork.Memory_PreviousInput_el || FmgcComputer_DWork.Memory_PreviousInput_b); + rtb_Compare_bj = (FmgcComputer_DWork.Memory_PreviousInput_el || FmgcComputer_DWork.Memory_PreviousInput_b); FmgcComputer_MATLABFunction(&rtb_BusAssignment_jm_logic_ir_computation_data_track_angle_magnetic_deg, FmgcComputer_P.A429ValueOrDefault8_defaultValue, &rtb_DataTypeConversion2_bh); - if (!rtb_Compare_du) { + if (!rtb_Compare_bj) { FmgcComputer_B.u_lyjjl = rtb_DataTypeConversion2_bh; } FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_trk_deg, FmgcComputer_P.A429ValueOrDefault7_defaultValue_a, &rtb_DataTypeConversion2_bh); - if (rtb_Compare_du) { + if (rtb_Compare_bj) { rtb_DataTypeConversion10 = FmgcComputer_B.u_lyjjl; } else { rtb_DataTypeConversion10 = rtb_DataTypeConversion2_bh; @@ -3666,16 +3678,16 @@ void FmgcComputer::step() &rtb_DataTypeConversion15, &rtb_DataTypeConversion16, &rtb_DataTypeConversion20, &rtb_Gain, &rtb_Gain1, &rtb_Gain2, &FmgcComputer_B.u_lyjj, &FmgcComputer_U.in.fms_inputs.fms_unrealistic_gs_angle_deg, &FmgcComputer_B.u, - &FmgcComputer_P.Constant_Value_i, &rtb_DataTypeConversion25, &rtb_y_n, &rtb_DataTypeConversion23, + &FmgcComputer_P.Constant_Value_i, &rtb_DataTypeConversion25, &rtb_y_d, &rtb_DataTypeConversion23, &FmgcComputer_U.in.fms_inputs.xtk_nmi, &FmgcComputer_U.in.fms_inputs.tke_deg, &FmgcComputer_U.in.fms_inputs.phi_c_deg, &FmgcComputer_U.in.fms_inputs.phi_limit_deg, &FmgcComputer_U.in.fms_inputs.alt_profile_tgt_ft, &FmgcComputer_U.in.fms_inputs.vs_target_ft_min, - &rtb_DataTypeConversion32, &rtb_DataTypeConversion26, &rtb_y_km, &FmgcComputer_P.Constant1_Value_io, + &rtb_DataTypeConversion32, &rtb_DataTypeConversion26, &rtb_y_mj, &FmgcComputer_P.Constant1_Value_io, &rtb_Gain3, &(&rtb_Logic_a2[0])[0], &rtb_DataTypeConversion21, &rtb_DataTypeConversion22, &rtb_DataTypeConversion39, &rtb_DataTypeConversion10, &rtb_altCstrOrFcu, &rtb_Switch1, &rtb_Switch3, &(&rtb_Switch_of[0])[0], &(&rtb_Logic_hq[0])[0], &(&rtb_Logic_ac[0])[0], &(&rtb_Logic_b[0])[0], &rtb_OR1_j, &rtb_Phi_loc_c, &rtb_Nosewheel_c, &rtb_Theta_c_deg, &rtb_Phi_c_deg, &rtb_Beta_c_deg, - &rtb_Product_p2, &rtb_Switch1_a, &rtb_Beta_c_deg_e, &rtb_Compare_du, &rtb_H_dot_radio_fpm, + &rtb_Product_p2, &rtb_Switch1_a, &rtb_Beta_c_deg_e, &rtb_Compare_bj, &rtb_H_dot_radio_fpm, &rtb_H_dot_c_fpm, &rtb_delta_Theta_H_dot_deg, &rtb_delta_Theta_bz_deg, &rtb_delta_Theta_bx_deg, &rtb_delta_Theta_beta_c_deg); rtb_BusAssignment_fo_logic_chosen_fac_bus_discrete_word_5.SSM = rtb_Switch_discrete_word_5_SSM; @@ -3683,52 +3695,52 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay2_DSTATE.autopilot.Theta_c_deg = rtb_Product_p2; FmgcComputer_DWork.Delay2_DSTATE.autopilot.Phi_c_deg = rtb_Switch1_a; FmgcComputer_MATLABFunction_a(rtb_Logic_ac[0], FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_oa, - FmgcComputer_P.ConfirmNode_timeDelay_a0, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_a); + FmgcComputer_P.ConfirmNode_timeDelay_a0, &rtb_y_bk, &FmgcComputer_DWork.sf_MATLABFunction_a); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault2_defaultValue_p, &rtb_DataTypeConversion2_bh); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault3_defaultValue_k, &rtb_y_jq); - FmgcComputer_MATLABFunction_g(rtb_Logic_ac[0], FmgcComputer_P.PulseNode3_isRisingEdge_l4, &rtb_y_oi, + FmgcComputer_MATLABFunction_g(rtb_Logic_ac[0], FmgcComputer_P.PulseNode3_isRisingEdge_l4, &rtb_y_js, &FmgcComputer_DWork.sf_MATLABFunction_g); - absVsTarget = static_cast((((absVsTarget_tmp || (rtb_y_ff && ((rtb_DataTypeConversion2_bh < + absVsTarget = static_cast((((rtb_OR2_l_tmp_0 || (rtb_y_bk && ((rtb_DataTypeConversion2_bh < FmgcComputer_P.CompareToConstant_const_j) || (rtb_y_jq < FmgcComputer_P.CompareToConstant1_const_d)))) + ( - static_cast(rtb_y_oi) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_j); + static_cast(rtb_y_js) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_j); FmgcComputer_MATLABFunction_i(&rtb_BusAssignment_fo_logic_chosen_fac_bus_discrete_word_5, FmgcComputer_P.BitfromLabel_bit_cb, &rtb_y_jm); FmgcComputer_MATLABFunction_g((FmgcComputer_P.Logic_table_lwo[static_cast(absVsTarget) + 8U] && (rtb_y_jm - != 0U)), FmgcComputer_P.PulseNode3_isRisingEdge_ng, &rtb_y_hh, &FmgcComputer_DWork.sf_MATLABFunction_k); - FmgcComputer_DWork.Memory_PreviousInput_hu = FmgcComputer_P.Logic_table_lm[(((static_cast(rtb_y_hh) << 1) - + rtb_y_p) << 1) + FmgcComputer_DWork.Memory_PreviousInput_hu]; + != 0U)), FmgcComputer_P.PulseNode3_isRisingEdge_ng, &rtb_y_od, &FmgcComputer_DWork.sf_MATLABFunction_k); + FmgcComputer_DWork.Memory_PreviousInput_hu = FmgcComputer_P.Logic_table_lm[(((static_cast(rtb_y_od) << 1) + + rtb_y_c2) << 1) + FmgcComputer_DWork.Memory_PreviousInput_hu]; rtb_DataTypeConversion_cm = rtb_Switch1_a; FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault_defaultValue_hw, &rtb_y_jq); - rtb_y_n = (rtb_y_jq >= FmgcComputer_P.CompareToConstant_const_hq); + rtb_y_d = (rtb_y_jq >= FmgcComputer_P.CompareToConstant_const_hq); rtb_OR1_j = (rtb_y_jq <= FmgcComputer_P.CompareToConstant2_const_di); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault1_defaultValue_o2, &rtb_y_jq); - rtb_y_ff = (rtb_y_jq >= FmgcComputer_P.CompareToConstant1_const_h); - rtb_y_hh = (rtb_y_jq <= FmgcComputer_P.CompareToConstant3_const_d); - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_flex_temp_deg, &rtb_y_oi); - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_flex_temp_deg, &rtb_y_ai); + rtb_y_bk = (rtb_y_jq >= FmgcComputer_P.CompareToConstant1_const_h); + rtb_y_od = (rtb_y_jq <= FmgcComputer_P.CompareToConstant3_const_d); + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_flex_temp_deg, &rtb_y_js); + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_flex_temp_deg, &rtb_y_oi); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault2_defaultValue_k, &rtb_y_jq); - rtb_Compare_d2 = (rtb_y_jq > FmgcComputer_P.CompareToConstant4_const_p); - rtb_Compare_bm = (rtb_y_jq <= FmgcComputer_P.CompareToConstant6_const_h); + rtb_Compare_d0 = (rtb_y_jq > FmgcComputer_P.CompareToConstant4_const_p); + rtb_Compare_kg = (rtb_y_jq <= FmgcComputer_P.CompareToConstant6_const_h); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault3_defaultValue_l, &rtb_y_jq); rtb_DataTypeConversion1_d = rtb_Product_p2; - rtb_y_hh = (FmgcComputer_DWork.Delay_DSTATE_k && (FmgcComputer_DWork.Memory_PreviousInput_hu || (rtb_y_n && - rtb_OR1_j && rtb_y_ff && rtb_y_hh) || ((!rtb_y_oi) && (!rtb_y_ai) && rtb_BusAssignment_h_logic_one_engine_out && - (rtb_Compare_d2 && rtb_Compare_bm && (rtb_y_jq > FmgcComputer_P.CompareToConstant5_const_av) && (rtb_y_jq <= + rtb_y_od = (FmgcComputer_DWork.Delay_DSTATE_k && (FmgcComputer_DWork.Memory_PreviousInput_hu || (rtb_y_d && + rtb_OR1_j && rtb_y_bk && rtb_y_od) || ((!rtb_y_js) && (!rtb_y_oi) && rtb_BusAssignment_h_logic_one_engine_out && + (rtb_Compare_d0 && rtb_Compare_kg && (rtb_y_jq > FmgcComputer_P.CompareToConstant5_const_av) && (rtb_y_jq <= FmgcComputer_P.CompareToConstant7_const))))); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault4_defaultValue_m, &rtb_y_jq); rtb_Switch1_a = rtb_y_jq; - rtb_y_n = (rtb_y_jq < FmgcComputer_P.CompareToConstant8_const); + rtb_y_d = (rtb_y_jq < FmgcComputer_P.CompareToConstant8_const); FmgcComputer_MATLABFunction(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg, FmgcComputer_P.A429ValueOrDefault5_defaultValue_fk, &rtb_y_jq); - rtb_y_oi = (rtb_y_hh && ((rtb_Switch1_a < FmgcComputer_P.CompareToConstant10_const) || (rtb_y_jq < - FmgcComputer_P.CompareToConstant11_const) || (rtb_BusAssignment_h_logic_one_engine_out && (rtb_y_n || (rtb_y_jq < + rtb_y_js = (rtb_y_od && ((rtb_Switch1_a < FmgcComputer_P.CompareToConstant10_const) || (rtb_y_jq < + FmgcComputer_P.CompareToConstant11_const) || (rtb_BusAssignment_h_logic_one_engine_out && (rtb_y_d || (rtb_y_jq < FmgcComputer_P.CompareToConstant9_const))))); rtb_BusAssignment_be_logic_ra_computation_data_radio_height_ft.SSM = rtb_raComputationData_radio_height_ft_SSM; rtb_BusAssignment_be_logic_ra_computation_data_radio_height_ft.Data = rtb_raComputationData_radio_height_ft_Data; @@ -3737,43 +3749,43 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_g((((rtb_active_longitudinal_law == vertical_law::SPD_MACH) || (rtb_active_longitudinal_law == vertical_law::SRS) || ((rtb_active_longitudinal_law == vertical_law::VPATH) && (FmgcComputer_U.in.fms_inputs.requested_des_submode == fmgc_des_submode::VPATH_THRUST))) && - FmgcComputer_DWork.Delay_DSTATE_k), FmgcComputer_P.PulseNode_isRisingEdge_o, &rtb_y_ff, + FmgcComputer_DWork.Delay_DSTATE_k), FmgcComputer_P.PulseNode_isRisingEdge_o, &rtb_y_bk, &FmgcComputer_DWork.sf_MATLABFunction_j); - rtb_y_n = !FmgcComputer_DWork.Memory_PreviousInput_hu; - rtb_OR1_j = (((rtb_y_jm != 0U) && rtb_OR2_l) || (rtb_y_cq && rtb_y_ff && rtb_y_n)); + rtb_y_d = !FmgcComputer_DWork.Memory_PreviousInput_hu; + rtb_OR1_j = (((rtb_y_jm != 0U) && rtb_OR2_l) || (rtb_y_c && rtb_y_bk && rtb_y_d)); FmgcComputer_MATLABFunction_a(rtb_OR1_j, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_ba, - FmgcComputer_P.ConfirmNode_timeDelay_gu, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_ay); - rtb_y_ai = (FmgcComputer_DWork.Delay1_DSTATE.alpha_floor_mode_active || + FmgcComputer_P.ConfirmNode_timeDelay_gu, &rtb_y_bk, &FmgcComputer_DWork.sf_MATLABFunction_ay); + rtb_y_oi = (FmgcComputer_DWork.Delay1_DSTATE.alpha_floor_mode_active || FmgcComputer_DWork.Delay1_DSTATE.retard_mode_active); - FmgcComputer_DWork.Memory_PreviousInput_bh = FmgcComputer_P.Logic_table_ac[(((rtb_y_p || ((rtb_y_ai || - FmgcComputer_DWork.Delay1_DSTATE.speed_mach_mode_active) && (!rtb_y_ff))) + (static_cast(rtb_OR1_j) << 1)) + FmgcComputer_DWork.Memory_PreviousInput_bh = FmgcComputer_P.Logic_table_ac[(((rtb_y_c2 || ((rtb_y_oi || + FmgcComputer_DWork.Delay1_DSTATE.speed_mach_mode_active) && (!rtb_y_bk))) + (static_cast(rtb_OR1_j) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_bh]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.ats_discrete_word, FmgcComputer_P.BitfromLabel_bit_al, &rtb_y_jm); FmgcComputer_MATLABFunction_g(((((rtb_active_longitudinal_law == vertical_law::NONE) && - ((!FmgcComputer_DWork.Delay1_DSTATE.retard_mode_active) || rtb_OR_m4)) || (rtb_active_longitudinal_law == + ((!FmgcComputer_DWork.Delay1_DSTATE.retard_mode_active) || rtb_OR_i)) || (rtb_active_longitudinal_law == vertical_law::ALT_HOLD) || (rtb_active_longitudinal_law == vertical_law::ALT_ACQ) || (rtb_active_longitudinal_law == vertical_law::VS) || (rtb_active_longitudinal_law == vertical_law::FPA) || (rtb_active_longitudinal_law == vertical_law::GS) || (rtb_active_longitudinal_law == vertical_law::FLARE) || ((rtb_active_longitudinal_law == vertical_law::VPATH) && ((FmgcComputer_U.in.fms_inputs.requested_des_submode == fmgc_des_submode::VPATH_SPEED) || - rtb_Logic_b[0]))) && FmgcComputer_DWork.Delay_DSTATE_k), FmgcComputer_P.PulseNode_isRisingEdge_fz, &rtb_y_ff, + rtb_Logic_b[0]))) && FmgcComputer_DWork.Delay_DSTATE_k), FmgcComputer_P.PulseNode_isRisingEdge_fz, &rtb_y_bk, &FmgcComputer_DWork.sf_MATLABFunction_ge); - rtb_OR_m4 = (((rtb_y_jm != 0U) && rtb_OR2_l) || (rtb_y_cq && rtb_y_ff && rtb_y_n)); - FmgcComputer_MATLABFunction_a(rtb_OR_m4, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_k3, - FmgcComputer_P.ConfirmNode_timeDelay_ez, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_ig); - FmgcComputer_DWork.Memory_PreviousInput_cm = FmgcComputer_P.Logic_table_ma[(((rtb_y_p || ((rtb_y_ai || - FmgcComputer_DWork.Delay1_DSTATE.thrust_mode_active) && (!rtb_y_ff))) + (static_cast(rtb_OR_m4) << 1)) << + rtb_OR_i = (((rtb_y_jm != 0U) && rtb_OR2_l) || (rtb_y_c && rtb_y_bk && rtb_y_d)); + FmgcComputer_MATLABFunction_a(rtb_OR_i, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_k3, + FmgcComputer_P.ConfirmNode_timeDelay_ez, &rtb_y_bk, &FmgcComputer_DWork.sf_MATLABFunction_ig); + FmgcComputer_DWork.Memory_PreviousInput_cm = FmgcComputer_P.Logic_table_ma[(((rtb_y_c2 || ((rtb_y_oi || + FmgcComputer_DWork.Delay1_DSTATE.thrust_mode_active) && (!rtb_y_bk))) + (static_cast(rtb_OR_i) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_cm]; FmgcComputer_MATLABFunction_i(&FmgcComputer_U.in.bus_inputs.fmgc_opp_bus.ats_discrete_word, FmgcComputer_P.BitfromLabel_bit_hy, &rtb_y_jm); FmgcComputer_MATLABFunction_c(&rtb_BusAssignment_be_logic_ra_computation_data_radio_height_ft, &rtb_y_jq); - rtb_OR_m4 = (((rtb_y_jm != 0U) && rtb_OR2_l) || (rtb_y_cq && FmgcComputer_DWork.Memory_PreviousInput_d && - rtb_Logic_a2[0] && (rtb_y_jq <= FmgcComputer_P.CompareToConstant_const_e3) && rtb_y_n)); - FmgcComputer_MATLABFunction_a(rtb_OR_m4, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_cs, - FmgcComputer_P.ConfirmNode_timeDelay_br, &rtb_y_ff, &FmgcComputer_DWork.sf_MATLABFunction_kh); - FmgcComputer_DWork.Memory_PreviousInput_ol = FmgcComputer_P.Logic_table_acc[(((rtb_y_p || + rtb_OR_i = (((rtb_y_jm != 0U) && rtb_OR2_l) || (rtb_y_c && FmgcComputer_DWork.Memory_PreviousInput_d && + rtb_Logic_a2[0] && (rtb_y_jq <= FmgcComputer_P.CompareToConstant_const_e3) && rtb_y_d)); + FmgcComputer_MATLABFunction_a(rtb_OR_i, FmgcComputer_U.in.time.dt, FmgcComputer_P.ConfirmNode_isRisingEdge_cs, + FmgcComputer_P.ConfirmNode_timeDelay_br, &rtb_y_bk, &FmgcComputer_DWork.sf_MATLABFunction_kh); + FmgcComputer_DWork.Memory_PreviousInput_ol = FmgcComputer_P.Logic_table_acc[(((rtb_y_c2 || ((FmgcComputer_DWork.Delay1_DSTATE.alpha_floor_mode_active || FmgcComputer_DWork.Delay1_DSTATE.thrust_mode_active || - FmgcComputer_DWork.Delay1_DSTATE.speed_mach_mode_active) && (!rtb_y_ff))) + (static_cast(rtb_OR_m4) << + FmgcComputer_DWork.Delay1_DSTATE.speed_mach_mode_active) && (!rtb_y_bk))) + (static_cast(rtb_OR_i) << 1)) << 1) + FmgcComputer_DWork.Memory_PreviousInput_ol]; rtb_BusAssignment_i2_logic_adr_computation_data_airspeed_computed_kn.SSM = rtb_adrComputationBus_airspeed_computed_kn_SSM; @@ -3782,42 +3794,42 @@ void FmgcComputer::step() rtb_BusAssignment_i2_logic_chosen_fac_bus_v_max_kn.Data = rtb_Switch_v_max_kn_Data; rtb_BusAssignment_i2_logic_chosen_fac_bus_discrete_word_5.SSM = rtb_Switch_discrete_word_5_SSM; rtb_BusAssignment_i2_logic_chosen_fac_bus_discrete_word_5.Data = rtb_Switch_discrete_word_5_Data; - rtb_OR_m4 = (rtb_OR2_l_tmp || rtb_Logic_b[0]); + rtb_OR_i = (rtb_NOT3_tmp || rtb_Logic_b[0]); FmgcComputer_DWork.Memory_PreviousInput_kr = FmgcComputer_P.Logic_table_b3[(((static_cast (((rtb_adrComputationBus_altitude_corrected_ft_Data >= FmgcComputer_U.in.fms_inputs.thrust_reduction_alt_ft) || FmgcComputer_DWork.Memory_PreviousInput_ne || FmgcComputer_DWork.Memory_PreviousInput_cb || rtb_AND12 || - Memory_PreviousInput_l_tmp) && rtb_GreaterThan3) << 1) + (rtb_BusAssignment_h_logic_one_engine_out || rtb_y_km || - ((FmgcComputer_P.EnumeratedConstant_Value_by == FmgcComputer_U.in.fms_inputs.fms_flight_phase) && - (rtb_adrComputationBus_altitude_corrected_ft_Data < FmgcComputer_U.in.fms_inputs.thrust_reduction_alt_ft)))) << 1) - + FmgcComputer_DWork.Memory_PreviousInput_kr]; + Memory_PreviousInput_l_tmp_0) && rtb_GreaterThan3) << 1) + (rtb_BusAssignment_h_logic_one_engine_out || rtb_y_mj + || ((FmgcComputer_P.EnumeratedConstant_Value_by == FmgcComputer_U.in.fms_inputs.fms_flight_phase) && + (rtb_adrComputationBus_altitude_corrected_ft_Data < FmgcComputer_U.in.fms_inputs.thrust_reduction_alt_ft)))) << + 1) + FmgcComputer_DWork.Memory_PreviousInput_kr]; FmgcComputer_DWork.Memory_PreviousInput_km = FmgcComputer_P.Logic_table_mj[(((static_cast (((rtb_adrComputationBus_altitude_corrected_ft_Data >= FmgcComputer_U.in.fms_inputs.thrust_reduction_alt_ft) || FmgcComputer_DWork.Memory_PreviousInput_ne || FmgcComputer_DWork.Memory_PreviousInput_cb || rtb_AND12 || - Memory_PreviousInput_l_tmp) && rtb_BusAssignment_h_logic_one_engine_out) << 1) + (rtb_GreaterThan3 || rtb_y_km || - ((FmgcComputer_P.EnumeratedConstant1_Value_e == FmgcComputer_U.in.fms_inputs.fms_flight_phase) && - (rtb_adrComputationBus_altitude_corrected_ft_Data < FmgcComputer_U.in.fms_inputs.thrust_reduction_alt_ft)))) << 1) - + FmgcComputer_DWork.Memory_PreviousInput_km]; + Memory_PreviousInput_l_tmp_0) && rtb_BusAssignment_h_logic_one_engine_out) << 1) + (rtb_GreaterThan3 || rtb_y_mj + || ((FmgcComputer_P.EnumeratedConstant1_Value_e == FmgcComputer_U.in.fms_inputs.fms_flight_phase) && + (rtb_adrComputationBus_altitude_corrected_ft_Data < FmgcComputer_U.in.fms_inputs.thrust_reduction_alt_ft)))) << + 1) + FmgcComputer_DWork.Memory_PreviousInput_km]; FmgcComputer_MATLABFunction(&rtb_BusAssignment_i2_logic_adr_computation_data_airspeed_computed_kn, FmgcComputer_P.A429ValueOrDefault1_defaultValue_e, &rtb_DataTypeConversion2_bh); FmgcComputer_MATLABFunction(&rtb_BusAssignment_i2_logic_chosen_fac_bus_v_max_kn, FmgcComputer_P.A429ValueOrDefault4_defaultValue_l, &rtb_y_jq); - rtb_y_cq = !rtb_y_hh; - rtb_y_nf = athr_fma_message::NONE; - rtb_y_n = (FmgcComputer_DWork.Delay_DSTATE_k && rtb_y_n); - if (rtb_y_n && ((FmgcComputer_DWork.Memory_PreviousInput_kr && ((rtb_DataTypeConversion2_bh > rtb_y_jq + + rtb_y_c = !rtb_y_od; + rtb_y_nc = athr_fma_message::NONE; + rtb_y_d = (FmgcComputer_DWork.Delay_DSTATE_k && rtb_y_d); + if (rtb_y_d && ((FmgcComputer_DWork.Memory_PreviousInput_kr && ((rtb_DataTypeConversion2_bh > rtb_y_jq + FmgcComputer_P.Bias_Bias_d) || (rtb_BusAssignment_hk_ap_fd_logic_tcas_vs_target <= - FmgcComputer_P.CompareToConstant_const_eq) || absVsTarget_tmp || (!rtb_y_cq))) || (rtb_Logic_ac[0] && - rtb_y_cq && (rtb_BusAssignment_hk_ap_fd_logic_tcas_vs_target <= FmgcComputer_P.CompareToConstant1_const_ik))) && + FmgcComputer_P.CompareToConstant_const_eq) || rtb_OR2_l_tmp_0 || (!rtb_y_c))) || (rtb_Logic_ac[0] && rtb_y_c + && (rtb_BusAssignment_hk_ap_fd_logic_tcas_vs_target <= FmgcComputer_P.CompareToConstant1_const_ik))) && (((FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg.Data < 24.0F) && (FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg.Data < 24.0F)) || (FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg.Data > 26.0F) || (FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg.Data > 26.0F))) { - rtb_y_nf = athr_fma_message::LVR_CLB; - } else if (rtb_y_n && FmgcComputer_DWork.Memory_PreviousInput_km && + rtb_y_nc = athr_fma_message::LVR_CLB; + } else if (rtb_y_d && FmgcComputer_DWork.Memory_PreviousInput_km && (FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg.Data < 34.0F) && (FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg.Data < 34.0F)) { - rtb_y_nf = athr_fma_message::LVR_MCT; - } else if (rtb_y_n && rtb_GreaterThan3 && (((FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg.Data > + rtb_y_nc = athr_fma_message::LVR_MCT; + } else if (rtb_y_d && rtb_GreaterThan3 && (((FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg.Data > 24.0F) && (FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg.Data < 26.0F) && ((FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg.Data < 24.0F) || (FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg.Data > 26.0F))) || @@ -3825,53 +3837,53 @@ void FmgcComputer::step() (FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg.Data < 26.0F) && ((FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg.Data < 24.0F) || (FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg.Data > 26.0F))))) { - rtb_y_nf = athr_fma_message::LVR_ASYM; + rtb_y_nc = athr_fma_message::LVR_ASYM; } FmgcComputer_MATLABFunction_i(&rtb_BusAssignment_i2_logic_chosen_fac_bus_discrete_word_5, FmgcComputer_P.BitfromLabel_bit_am, &rtb_y_jm); rtb_Max_a = std::fmax(FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_tla_deg.Data, FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_tla_deg.Data); - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_flex_temp_deg, &rtb_y_n); + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_opp_bus.selected_flex_temp_deg, &rtb_y_d); FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fadec_own_bus.selected_flex_temp_deg, &rtb_OR1_j); - rtb_GreaterThan3 = (rtb_y_n || rtb_OR1_j); - rtb_y_d = athr_fma_mode::NONE; - rtb_y_n = (FmgcComputer_DWork.Delay_DSTATE_k && rtb_y_cq); - if (rtb_y_n && (rtb_Max_a > 44.0F)) { - rtb_y_d = athr_fma_mode::MAN_TOGA; + rtb_GreaterThan3 = (rtb_y_d || rtb_OR1_j); + rtb_y_lu = athr_fma_mode::NONE; + rtb_y_d = (FmgcComputer_DWork.Delay_DSTATE_k && rtb_y_c); + if (rtb_y_d && (rtb_Max_a > 44.0F)) { + rtb_y_lu = athr_fma_mode::MAN_TOGA; } else { - rtb_OR1_j = (rtb_y_n && (rtb_Max_a > 34.0F) && (rtb_Max_a < 36.0F)); + rtb_OR1_j = (rtb_y_d && (rtb_Max_a > 34.0F) && (rtb_Max_a < 36.0F)); if (rtb_OR1_j && rtb_GreaterThan3) { - rtb_y_d = athr_fma_mode::MAN_FLEX; + rtb_y_lu = athr_fma_mode::MAN_FLEX; } else if (rtb_OR1_j && (!rtb_GreaterThan3)) { - rtb_y_d = athr_fma_mode::MAN_MCT; - } else if (rtb_y_n && (rtb_Max_a > 24.0F)) { - rtb_y_d = athr_fma_mode::MAN_THR; + rtb_y_lu = athr_fma_mode::MAN_MCT; + } else if (rtb_y_d && (rtb_Max_a > 24.0F)) { + rtb_y_lu = athr_fma_mode::MAN_THR; } else { - rtb_y_n = (FmgcComputer_DWork.Delay_DSTATE_k && rtb_y_hh); - rtb_OR1_j = (rtb_y_n && FmgcComputer_DWork.Memory_PreviousInput_cm); + rtb_y_d = (FmgcComputer_DWork.Delay_DSTATE_k && rtb_y_od); + rtb_OR1_j = (rtb_y_d && FmgcComputer_DWork.Memory_PreviousInput_cm); if (rtb_OR1_j && (!FmgcComputer_DWork.Delay_DSTATE_c)) { - rtb_y_d = athr_fma_mode::SPEED; + rtb_y_lu = athr_fma_mode::SPEED; } else if (rtb_OR1_j && FmgcComputer_DWork.Delay_DSTATE_c) { - rtb_y_d = athr_fma_mode::MACH; + rtb_y_lu = athr_fma_mode::MACH; } else { - rtb_OR1_j = (rtb_y_n && FmgcComputer_DWork.Memory_PreviousInput_bh); - rtb_GreaterThan3 = !rtb_OR_m4; + rtb_OR1_j = (rtb_y_d && FmgcComputer_DWork.Memory_PreviousInput_bh); + rtb_GreaterThan3 = !rtb_OR_i; if (rtb_OR1_j && (rtb_Max_a > 34.0F) && rtb_GreaterThan3) { - rtb_y_d = athr_fma_mode::THR_MCT; + rtb_y_lu = athr_fma_mode::THR_MCT; } else if (rtb_OR1_j && (rtb_Max_a > 24.0F) && rtb_GreaterThan3) { - rtb_y_d = athr_fma_mode::THR_CLB; + rtb_y_lu = athr_fma_mode::THR_CLB; } else if (rtb_OR1_j && (rtb_Max_a < 25.0F) && rtb_GreaterThan3) { - rtb_y_d = athr_fma_mode::THR_LVR; - } else if (rtb_y_n && ((FmgcComputer_DWork.Memory_PreviousInput_bh && rtb_OR_m4) || + rtb_y_lu = athr_fma_mode::THR_LVR; + } else if (rtb_y_d && ((FmgcComputer_DWork.Memory_PreviousInput_bh && rtb_OR_i) || FmgcComputer_DWork.Memory_PreviousInput_ol)) { - rtb_y_d = athr_fma_mode::THR_IDLE; + rtb_y_lu = athr_fma_mode::THR_IDLE; } else { - rtb_y_n = (rtb_y_n && FmgcComputer_DWork.Memory_PreviousInput_hu); - if (rtb_y_n && (rtb_y_jm != 0U)) { - rtb_y_d = athr_fma_mode::A_FLOOR; - } else if (rtb_y_n && (rtb_y_jm == 0U)) { - rtb_y_d = athr_fma_mode::TOGA_LK; + rtb_y_d = (rtb_y_d && FmgcComputer_DWork.Memory_PreviousInput_hu); + if (rtb_y_d && (rtb_y_jm != 0U)) { + rtb_y_lu = athr_fma_mode::A_FLOOR; + } else if (rtb_y_d && (rtb_y_jm == 0U)) { + rtb_y_lu = athr_fma_mode::TOGA_LK; } } } @@ -3899,7 +3911,7 @@ void FmgcComputer::step() rtb_BusAssignment_jc_logic_chosen_fac_bus_v_ls_kn.SSM = rtb_Switch_v_ls_kn_SSM; rtb_BusAssignment_jc_logic_chosen_fac_bus_v_ls_kn.Data = rtb_Switch_v_ls_kn_Data; FmgcComputer_MATLABFunction(&rtb_BusAssignment_i2_logic_adr_computation_data_airspeed_computed_kn, - FmgcComputer_P.A429ValueOrDefault_defaultValue_km, &rtb_y_g); + FmgcComputer_P.A429ValueOrDefault_defaultValue_km, &rtb_y_jv); FmgcComputer_MATLABFunction(&rtb_BusAssignment_jc_logic_chosen_fac_bus_v_ls_kn, FmgcComputer_P.A429ValueOrDefault4_defaultValue_hv, &rtb_DataTypeConversion2_bh); FmgcComputer_MATLABFunction(&rtb_BusAssignment_i2_logic_chosen_fac_bus_v_max_kn, @@ -3923,7 +3935,7 @@ void FmgcComputer::step() high_i = 1; } - rtb_DataTypeConversion2_bh = v[high_i] - rtb_y_g; + rtb_DataTypeConversion2_bh = v[high_i] - rtb_y_jv; FmgcComputer_MATLABFunction(&rtb_BusAssignment_jc_logic_ir_computation_data_pitch_angle_deg, FmgcComputer_P.A429ValueOrDefault11_defaultValue, &rtb_y_jq); rtb_DataTypeConversion8 = FmgcComputer_P.Gain1_Gain_a * rtb_y_jq; @@ -4057,7 +4069,7 @@ void FmgcComputer::step() rtb_Switch1_a = FmgcComputer_P.Saturation1_LowerSat; } } else if (FmgcComputer_DWork.Memory_PreviousInput_bh) { - if (rtb_OR_m4) { + if (rtb_OR_i) { rtb_DataTypeConversion8 = FmgcComputer_P.Constant_Value; } else { rtb_DataTypeConversion8 = FmgcComputer_P.Constant1_Value_i; @@ -4078,7 +4090,7 @@ void FmgcComputer::step() rtb_Switch1_a = FmgcComputer_P.DiscreteTimeIntegratorVariableTsLimit_Gain * rtb_Switch1_a * FmgcComputer_U.in.time.dt; - FmgcComputer_DWork.icLoad = (rtb_y_p || rtb_y_cq || FmgcComputer_DWork.Memory_PreviousInput_hu || + FmgcComputer_DWork.icLoad = (rtb_y_c2 || rtb_y_c || FmgcComputer_DWork.Memory_PreviousInput_hu || FmgcComputer_DWork.icLoad); if (FmgcComputer_DWork.icLoad) { FmgcComputer_DWork.Delay_DSTATE_f = std::fmax @@ -4105,9 +4117,9 @@ void FmgcComputer::step() rtb_BusAssignment_pw_logic_ils_computation_data_runway_heading_deg.SSM = rtb_Switch9; rtb_BusAssignment_pw_logic_ils_computation_data_runway_heading_deg.Data = rtb_Switch_i_runway_heading_deg_Data; rtb_Switch9 = static_cast(FmgcComputer_P.EnumeratedConstant_Value); - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_mach, &rtb_y_p); - FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_spd_kts, &rtb_y_n); - FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_pw_logic_ils_computation_data_runway_heading_deg, &rtb_y_cq); + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_mach, &rtb_y_c2); + FmgcComputer_MATLABFunction_ie(&FmgcComputer_U.in.bus_inputs.fcu_bus.selected_spd_kts, &rtb_y_d); + FmgcComputer_MATLABFunction_ie(&rtb_BusAssignment_pw_logic_ils_computation_data_runway_heading_deg, &rtb_y_c); rtb_VectorConcatenate[0] = FmgcComputer_P.Constant10_Value; rtb_VectorConcatenate[1] = FmgcComputer_P.Constant10_Value; rtb_VectorConcatenate[2] = FmgcComputer_P.Constant10_Value; @@ -4121,7 +4133,7 @@ void FmgcComputer::step() rtb_VectorConcatenate[10] = FmgcComputer_P.Constant10_Value; rtb_VectorConcatenate[11] = FmgcComputer_P.Constant10_Value; rtb_VectorConcatenate[12] = FmgcComputer_P.Constant10_Value; - rtb_VectorConcatenate[13] = rtb_y_a0_tmp; + rtb_VectorConcatenate[13] = rtb_NOT3_tmp_0; rtb_VectorConcatenate[14] = FmgcComputer_P.Constant10_Value; rtb_VectorConcatenate[15] = FmgcComputer_P.Constant10_Value; rtb_VectorConcatenate[16] = FmgcComputer_P.Constant10_Value; @@ -4134,25 +4146,25 @@ void FmgcComputer::step() rtb_VectorConcatenate[2] = fdOwnOff; rtb_VectorConcatenate[3] = FmgcComputer_DWork.Memory_PreviousInput_d; rtb_VectorConcatenate[4] = FmgcComputer_P.Constant3_Value; - rtb_VectorConcatenate[5] = rtb_NOT_b; - rtb_VectorConcatenate[6] = rtb_y_fd; + rtb_VectorConcatenate[5] = rtb_y_e2; + rtb_VectorConcatenate[6] = rtb_NOT_b; rtb_VectorConcatenate[7] = rtb_appCapability_idx_2; rtb_VectorConcatenate[8] = rtb_ap_inop_tmp; - rtb_VectorConcatenate[9] = rtb_y_i2; - rtb_VectorConcatenate[10] = rtb_y_me; + rtb_VectorConcatenate[9] = rtb_y_me; + rtb_VectorConcatenate[10] = rtb_y_pw; rtb_VectorConcatenate[11] = rtb_appInop_idx_2; rtb_VectorConcatenate[12] = rtb_TmpSignalConversionAtSFunctionInport3_idx_0; rtb_VectorConcatenate[13] = rtb_TmpSignalConversionAtSFunctionInport3_idx_1; rtb_VectorConcatenate[14] = rtb_TmpSignalConversionAtSFunctionInport3_idx_2; rtb_VectorConcatenate[15] = rtb_BusAssignment_b_logic_ils_tune_inhibit; - rtb_VectorConcatenate[16] = rtb_Compare_fn; - rtb_VectorConcatenate[17] = rtb_NOT3_tmp_0; - rtb_VectorConcatenate[18] = rtb_y_h; + rtb_VectorConcatenate[16] = rtb_Compare_gc; + rtb_VectorConcatenate[17] = rtb_OR2_l_tmp; + rtb_VectorConcatenate[18] = rtb_AND10_b; FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate, &rtb_DataTypeConversion2_bh); rtb_VectorConcatenate[0] = FmgcComputer_P.Constant4_Value_g; rtb_VectorConcatenate[1] = FmgcComputer_P.Constant4_Value_g; rtb_VectorConcatenate[2] = FmgcComputer_DWork.Delay_DSTATE_k; - rtb_VectorConcatenate[3] = rtb_y_hh; + rtb_VectorConcatenate[3] = rtb_y_od; rtb_VectorConcatenate[4] = FmgcComputer_P.Constant4_Value_g; rtb_VectorConcatenate[5] = FmgcComputer_P.Constant4_Value_g; rtb_VectorConcatenate[6] = FmgcComputer_U.in.discrete_inputs.athr_instinctive_disc; @@ -4163,25 +4175,25 @@ void FmgcComputer::step() rtb_VectorConcatenate[11] = FmgcComputer_P.Constant4_Value_g; rtb_VectorConcatenate[12] = FmgcComputer_DWork.Memory_PreviousInput_hu; rtb_VectorConcatenate[13] = rtb_ap_inop_tmp_tmp; - rtb_VectorConcatenate[14] = rtb_y_oi; + rtb_VectorConcatenate[14] = rtb_y_js; rtb_VectorConcatenate[15] = FmgcComputer_P.Constant4_Value_g; rtb_VectorConcatenate[16] = FmgcComputer_P.Constant4_Value_g; rtb_VectorConcatenate[17] = FmgcComputer_P.Constant4_Value_g; rtb_VectorConcatenate[18] = FmgcComputer_P.Constant4_Value_g; - FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate, &rtb_y_g); - rtb_VectorConcatenate_bw[0] = (rtb_y_d == athr_fma_mode::MAN_TOGA); - rtb_VectorConcatenate_bw[1] = ((rtb_y_d == athr_fma_mode::MAN_MCT) || (rtb_y_d == athr_fma_mode::THR_MCT)); - rtb_VectorConcatenate_bw[2] = (rtb_y_d == athr_fma_mode::MAN_FLEX); - rtb_VectorConcatenate_bw[3] = (rtb_y_d == athr_fma_mode::THR_CLB); - rtb_VectorConcatenate_bw[4] = ((rtb_y_d == athr_fma_mode::MAN_THR) || (rtb_y_d == athr_fma_mode::THR_LVR)); - rtb_VectorConcatenate_bw[5] = (rtb_y_d == athr_fma_mode::THR_IDLE); - rtb_VectorConcatenate_bw[6] = (rtb_y_d == athr_fma_mode::A_FLOOR); - rtb_VectorConcatenate_bw[7] = (rtb_y_d == athr_fma_mode::TOGA_LK); - rtb_VectorConcatenate_bw[8] = (rtb_y_d == athr_fma_mode::SPEED); - rtb_VectorConcatenate_bw[9] = (rtb_y_d == athr_fma_mode::MACH); - rtb_VectorConcatenate_bw[10] = (rtb_y_nf == athr_fma_message::LVR_ASYM); - rtb_VectorConcatenate_bw[11] = (rtb_y_nf == athr_fma_message::LVR_CLB); - rtb_VectorConcatenate_bw[12] = (rtb_y_nf == athr_fma_message::LVR_MCT); + FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate, &rtb_y_jv); + rtb_VectorConcatenate_bw[0] = (rtb_y_lu == athr_fma_mode::MAN_TOGA); + rtb_VectorConcatenate_bw[1] = ((rtb_y_lu == athr_fma_mode::MAN_MCT) || (rtb_y_lu == athr_fma_mode::THR_MCT)); + rtb_VectorConcatenate_bw[2] = (rtb_y_lu == athr_fma_mode::MAN_FLEX); + rtb_VectorConcatenate_bw[3] = (rtb_y_lu == athr_fma_mode::THR_CLB); + rtb_VectorConcatenate_bw[4] = ((rtb_y_lu == athr_fma_mode::MAN_THR) || (rtb_y_lu == athr_fma_mode::THR_LVR)); + rtb_VectorConcatenate_bw[5] = (rtb_y_lu == athr_fma_mode::THR_IDLE); + rtb_VectorConcatenate_bw[6] = (rtb_y_lu == athr_fma_mode::A_FLOOR); + rtb_VectorConcatenate_bw[7] = (rtb_y_lu == athr_fma_mode::TOGA_LK); + rtb_VectorConcatenate_bw[8] = (rtb_y_lu == athr_fma_mode::SPEED); + rtb_VectorConcatenate_bw[9] = (rtb_y_lu == athr_fma_mode::MACH); + rtb_VectorConcatenate_bw[10] = (rtb_y_nc == athr_fma_message::LVR_ASYM); + rtb_VectorConcatenate_bw[11] = (rtb_y_nc == athr_fma_message::LVR_CLB); + rtb_VectorConcatenate_bw[12] = (rtb_y_nc == athr_fma_message::LVR_MCT); rtb_VectorConcatenate_bw[13] = FmgcComputer_P.Constant5_Value; rtb_VectorConcatenate_bw[14] = FmgcComputer_P.Constant5_Value; rtb_VectorConcatenate_bw[15] = FmgcComputer_P.Constant5_Value; @@ -4211,14 +4223,14 @@ void FmgcComputer::step() rtb_VectorConcatenate_bw[18] = FmgcComputer_P.Constant6_Value; FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate_bw, &rtb_y_gtq); rtb_VectorConcatenate_f[0] = rtb_y_lh; - rtb_VectorConcatenate_f[1] = rtb_OR2_l_tmp; + rtb_VectorConcatenate_f[1] = rtb_NOT3_tmp; rtb_VectorConcatenate_f[2] = FmgcComputer_P.Constant7_Value; rtb_VectorConcatenate_f[3] = (FmgcComputer_DWork.Memory_PreviousInput_ae || FmgcComputer_DWork.Memory_PreviousInput_ev); rtb_VectorConcatenate_f[4] = FmgcComputer_DWork.Memory_PreviousInput_k; rtb_VectorConcatenate_f[5] = FmgcComputer_DWork.Memory_PreviousInput_i; rtb_VectorConcatenate_f[6] = rtb_AND12; - rtb_VectorConcatenate_f[7] = Memory_PreviousInput_l_tmp; + rtb_VectorConcatenate_f[7] = Memory_PreviousInput_l_tmp_0; rtb_VectorConcatenate_f[8] = (FmgcComputer_DWork.Memory_PreviousInput_ne || FmgcComputer_DWork.Memory_PreviousInput_cb); rtb_VectorConcatenate_f[9] = (FmgcComputer_DWork.Memory_PreviousInput_cb || @@ -4231,19 +4243,19 @@ void FmgcComputer::step() rtb_VectorConcatenate_f[13] = (FmgcComputer_DWork.Memory_PreviousInput_o || FmgcComputer_DWork.Memory_PreviousInput_mx); rtb_VectorConcatenate_f[14] = rtb_y_j; - rtb_VectorConcatenate_f[15] = rtb_Compare_gc; + rtb_VectorConcatenate_f[15] = rtb_Compare_bb; rtb_VectorConcatenate_f[16] = ((FmgcComputer_U.in.fms_inputs.preset_mach > FmgcComputer_P.CompareToConstant3_const_p) || (FmgcComputer_U.in.fms_inputs.preset_spd_kts > FmgcComputer_P.CompareToConstant4_const_ny)); rtb_VectorConcatenate_f[17] = FmgcComputer_P.Constant7_Value; rtb_VectorConcatenate_f[18] = FmgcComputer_P.Constant7_Value; FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate_f, &rtb_y_jq); - rtb_VectorConcatenate_f[0] = rtb_y_cj; + rtb_VectorConcatenate_f[0] = rtb_y_hi; rtb_VectorConcatenate_f[1] = FmgcComputer_DWork.Memory_PreviousInput_ip; rtb_VectorConcatenate_f[2] = FmgcComputer_DWork.Memory_PreviousInput_cv; rtb_VectorConcatenate_f[3] = FmgcComputer_DWork.Memory_PreviousInput_lq; rtb_VectorConcatenate_f[4] = FmgcComputer_DWork.Memory_PreviousInput_el; - rtb_VectorConcatenate_f[5] = rtb_y_da; - rtb_VectorConcatenate_f[6] = rtb_AND9; + rtb_VectorConcatenate_f[5] = rtb_OR_iw; + rtb_VectorConcatenate_f[6] = rtb_y_j1; rtb_VectorConcatenate_f[7] = FmgcComputer_P.Constant8_Value; rtb_VectorConcatenate_f[8] = FmgcComputer_P.Constant8_Value; rtb_VectorConcatenate_f[9] = FmgcComputer_DWork.Memory_PreviousInput_c; @@ -4251,10 +4263,10 @@ void FmgcComputer::step() rtb_VectorConcatenate_f[11] = FmgcComputer_P.Constant8_Value; rtb_VectorConcatenate_f[12] = FmgcComputer_DWork.Memory_PreviousInput_b; rtb_VectorConcatenate_f[13] = FmgcComputer_P.Constant8_Value; - rtb_VectorConcatenate_f[14] = rtb_NOT_c; + rtb_VectorConcatenate_f[14] = rtb_GreaterThan3_e; rtb_VectorConcatenate_f[15] = FmgcComputer_DWork.Memory_PreviousInput_m; rtb_VectorConcatenate_f[16] = FmgcComputer_P.Constant8_Value; - rtb_VectorConcatenate_f[17] = rtb_AND_e_tmp; + rtb_VectorConcatenate_f[17] = rtb_y_lh_tmp; rtb_VectorConcatenate_f[18] = FmgcComputer_P.Constant8_Value; FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate_f, &rtb_y_mw); rtb_VectorConcatenate_f[0] = FmgcComputer_P.Constant9_Value; @@ -4297,7 +4309,7 @@ void FmgcComputer::step() rtb_VectorConcatenate_f[11] = FmgcComputer_P.Constant1_Value_a; rtb_VectorConcatenate_f[12] = FmgcComputer_P.Constant1_Value_a; rtb_VectorConcatenate_f[13] = rtb_NOT3; - rtb_VectorConcatenate_f[14] = rtb_y_dm; + rtb_VectorConcatenate_f[14] = rtb_BusAssignment_hk_ap_fd_logic_trk_fpa_deselected; rtb_VectorConcatenate_f[15] = FmgcComputer_P.Constant1_Value_a; rtb_VectorConcatenate_f[16] = rtb_NOT_oj; rtb_VectorConcatenate_f[17] = (rtb_BusAssignment_hk_ap_fd_logic_tcas_vs_target > @@ -4307,8 +4319,8 @@ void FmgcComputer::step() FmgcComputer_MATLABFunction_gy(rtb_VectorConcatenate_f, &FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.discrete_word_7.Data); FmgcComputer_Y.out.data = FmgcComputer_U.in; - FmgcComputer_Y.out.logic.on_ground = rtb_y_km; - FmgcComputer_Y.out.logic.gnd_eng_stop_flt_5s = rtb_y_e; + FmgcComputer_Y.out.logic.on_ground = rtb_y_mj; + FmgcComputer_Y.out.logic.gnd_eng_stop_flt_5s = rtb_y_ogh; FmgcComputer_Y.out.logic.one_engine_out = rtb_BusAssignment_h_logic_one_engine_out; FmgcComputer_Y.out.logic.engine_running = rtb_BusAssignment_h_logic_engine_running; FmgcComputer_Y.out.logic.ap_fd_athr_common_condition = fdOppOff; @@ -4377,12 +4389,12 @@ void FmgcComputer::step() FmgcComputer_Y.out.logic.ra_computation_data.radio_height_ft.Data = rtb_raComputationData_radio_height_ft_Data; FmgcComputer_Y.out.logic.dual_ra_failure = raOwnInvalid; FmgcComputer_Y.out.logic.both_ra_valid = raOppInvalid; - FmgcComputer_Y.out.logic.fac_lg_data_failure = rtb_y_o; + FmgcComputer_Y.out.logic.fac_lg_data_failure = rtb_AND10_k; FmgcComputer_Y.out.logic.flap_slat_lever_position = rtb_handleIndex; FmgcComputer_Y.out.logic.fac_speeds_failure = rtb_BusAssignment_n_logic_fac_speeds_failure; FmgcComputer_Y.out.logic.fac_weights_failure = rtb_BusAssignment_n_logic_fac_weights_failure; - FmgcComputer_Y.out.logic.fac_rudder_control_failure = rtb_ir3Invalid; - FmgcComputer_Y.out.logic.both_fac_rudder_valid = rtb_irOwnInvalid; + FmgcComputer_Y.out.logic.fac_rudder_control_failure = rtb_irOwnInvalid; + FmgcComputer_Y.out.logic.both_fac_rudder_valid = rtb_ir3Invalid; FmgcComputer_Y.out.logic.chosen_fac_bus.total_weight_lbs.SSM = rtb_Switch_total_weight_lbs_SSM; FmgcComputer_Y.out.logic.chosen_fac_bus.total_weight_lbs.Data = rtb_Switch_total_weight_lbs_Data; FmgcComputer_Y.out.logic.chosen_fac_bus.center_of_gravity_pos_percent.SSM = @@ -4416,17 +4428,17 @@ void FmgcComputer::step() FmgcComputer_Y.out.logic.ils_tune_inhibit = rtb_BusAssignment_b_logic_ils_tune_inhibit; FmgcComputer_Y.out.logic.rwy_hdg_memo = FmgcComputer_B.u_lyjj; FmgcComputer_Y.out.logic.tcas_mode_available = rtb_NOT1_i; - FmgcComputer_Y.out.ap_fd_logic.lateral_modes.rwy_active = rtb_y_cj; + FmgcComputer_Y.out.ap_fd_logic.lateral_modes.rwy_active = rtb_y_hi; FmgcComputer_Y.out.ap_fd_logic.lateral_modes.nav_active = FmgcComputer_DWork.Memory_PreviousInput_ip; FmgcComputer_Y.out.ap_fd_logic.lateral_modes.loc_cpt_active = FmgcComputer_DWork.Memory_PreviousInput_cv; FmgcComputer_Y.out.ap_fd_logic.lateral_modes.loc_trk_active = FmgcComputer_DWork.Memory_PreviousInput_lq; FmgcComputer_Y.out.ap_fd_logic.lateral_modes.roll_goaround_active = FmgcComputer_DWork.Memory_PreviousInput_el; - FmgcComputer_Y.out.ap_fd_logic.lateral_modes.hdg_active = rtb_y_da; - FmgcComputer_Y.out.ap_fd_logic.lateral_modes.trk_active = rtb_AND9; + FmgcComputer_Y.out.ap_fd_logic.lateral_modes.hdg_active = rtb_OR_iw; + FmgcComputer_Y.out.ap_fd_logic.lateral_modes.trk_active = rtb_y_j1; FmgcComputer_Y.out.ap_fd_logic.lateral_modes.rwy_loc_submode_active = FmgcComputer_DWork.Memory_PreviousInput_c; FmgcComputer_Y.out.ap_fd_logic.lateral_modes.rwy_trk_submode_active = FmgcComputer_DWork.Memory_PreviousInput_b; FmgcComputer_Y.out.ap_fd_logic.lateral_modes.land_active = FmgcComputer_DWork.Memory_PreviousInput_d; - FmgcComputer_Y.out.ap_fd_logic.lateral_modes.align_submode_active = rtb_NOT_c; + FmgcComputer_Y.out.ap_fd_logic.lateral_modes.align_submode_active = rtb_GreaterThan3_e; FmgcComputer_Y.out.ap_fd_logic.lateral_modes.rollout_submode_active = FmgcComputer_DWork.Memory_PreviousInput_m; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.clb_active = FmgcComputer_DWork.Memory_PreviousInput_ec; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.des_active = FmgcComputer_DWork.Memory_PreviousInput_b3; @@ -4437,10 +4449,10 @@ void FmgcComputer::step() FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.pitch_takeoff_active = FmgcComputer_DWork.Memory_PreviousInput_k; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.pitch_goaround_active = FmgcComputer_DWork.Memory_PreviousInput_i; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.vs_active = rtb_AND12; - FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.fpa_active = Memory_PreviousInput_l_tmp; + FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.fpa_active = Memory_PreviousInput_l_tmp_0; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.alt_acq_active = FmgcComputer_DWork.Memory_PreviousInput_ne; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.alt_hold_active = FmgcComputer_DWork.Memory_PreviousInput_cb; - FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.fma_dash_display = rtb_Compare_gc; + FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.fma_dash_display = rtb_Compare_bb; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.gs_capt_active = FmgcComputer_DWork.Memory_PreviousInput_nu; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.gs_trk_active = FmgcComputer_DWork.Memory_PreviousInput_as; FmgcComputer_Y.out.ap_fd_logic.longitudinal_modes.final_des_active = rtb_Logic_b[0]; @@ -4469,34 +4481,34 @@ void FmgcComputer::step() FmgcComputer_Y.out.ap_fd_logic.alt_sel_or_cstr = rtb_altCstrOrFcu; FmgcComputer_Y.out.ap_fd_logic.fmgc_opp_mode_sync = rtb_OR2_l; FmgcComputer_Y.out.ap_fd_logic.any_ap_fd_engaged = apCondition; - FmgcComputer_Y.out.ap_fd_logic.any_lateral_mode_engaged = rtb_Compare_mh; - FmgcComputer_Y.out.ap_fd_logic.any_longitudinal_mode_engaged = rtb_Compare_a5; + FmgcComputer_Y.out.ap_fd_logic.any_lateral_mode_engaged = rtb_Compare_ov; + FmgcComputer_Y.out.ap_fd_logic.any_longitudinal_mode_engaged = rtb_y_jt; FmgcComputer_Y.out.ap_fd_logic.lateral_mode_reset = rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset; FmgcComputer_Y.out.ap_fd_logic.longitudinal_mode_reset = rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset; FmgcComputer_Y.out.ap_fd_logic.hdg_trk_preset_available = FmgcComputer_DWork.Memory_PreviousInput_bw; FmgcComputer_Y.out.ap_fd_logic.alt_soft_mode_active = rtb_Logic_hq[0]; - FmgcComputer_Y.out.ap_fd_logic.fd_auto_disengage = rtb_Compare_fn; - FmgcComputer_Y.out.ap_fd_logic.ap_fd_mode_reversion = rtb_NOT3_tmp_0; + FmgcComputer_Y.out.ap_fd_logic.fd_auto_disengage = rtb_Compare_gc; + FmgcComputer_Y.out.ap_fd_logic.ap_fd_mode_reversion = rtb_OR2_l_tmp; FmgcComputer_Y.out.ap_fd_logic.lateral_mode_reversion = rtb_AND8; - FmgcComputer_Y.out.ap_fd_logic.longitudinal_mode_reversion_vs = rtb_NOT3_tmp; - FmgcComputer_Y.out.ap_fd_logic.longitudinal_mode_reversion_op_clb = rtb_y_hy; - FmgcComputer_Y.out.ap_fd_logic.pitch_fd_bars_flashing = rtb_y_a0_tmp; - FmgcComputer_Y.out.ap_fd_logic.roll_fd_bars_flashing = rtb_AND_e_tmp; + FmgcComputer_Y.out.ap_fd_logic.longitudinal_mode_reversion_vs = Memory_PreviousInput_d_tmp_tmp; + FmgcComputer_Y.out.ap_fd_logic.longitudinal_mode_reversion_op_clb = rtb_y_dk; + FmgcComputer_Y.out.ap_fd_logic.pitch_fd_bars_flashing = rtb_NOT3_tmp_0; + FmgcComputer_Y.out.ap_fd_logic.roll_fd_bars_flashing = rtb_y_lh_tmp; FmgcComputer_Y.out.ap_fd_logic.loc_bc_selection = rtP_fmgc_ap_fd_logic_output_MATLABStruct.loc_bc_selection; - FmgcComputer_Y.out.ap_fd_logic.vs_target_not_held = rtb_y_h; + FmgcComputer_Y.out.ap_fd_logic.vs_target_not_held = rtb_AND10_b; FmgcComputer_Y.out.ap_fd_logic.tcas_vs_target = rtb_BusAssignment_hk_ap_fd_logic_tcas_vs_target; FmgcComputer_Y.out.ap_fd_logic.tcas_ra_corrective = rtb_NOT_oj; FmgcComputer_Y.out.ap_fd_logic.active_tcas_submode = rtb_mode; - FmgcComputer_Y.out.ap_fd_logic.tcas_alt_acq_cond = rtb_NOT_gj; + FmgcComputer_Y.out.ap_fd_logic.tcas_alt_acq_cond = rtb_OR2_l_tmp_1; FmgcComputer_Y.out.ap_fd_logic.tcas_alt_hold_cond = Memory_PreviousInput_k_tmp_tmp_tmp; FmgcComputer_Y.out.ap_fd_logic.tcas_ra_inhibited = rtb_NOT3; - FmgcComputer_Y.out.ap_fd_logic.trk_fpa_deselected = rtb_y_dm; + FmgcComputer_Y.out.ap_fd_logic.trk_fpa_deselected = rtb_BusAssignment_hk_ap_fd_logic_trk_fpa_deselected; FmgcComputer_Y.out.ap_fd_logic.longi_large_box_tcas = rtb_BusAssignment_hk_ap_fd_logic_longi_large_box_tcas; - FmgcComputer_Y.out.ap_fd_logic.land_2_capability = rtb_NOT_b; - FmgcComputer_Y.out.ap_fd_logic.land_3_fail_passive_capability = rtb_y_fd; + FmgcComputer_Y.out.ap_fd_logic.land_2_capability = rtb_y_e2; + FmgcComputer_Y.out.ap_fd_logic.land_3_fail_passive_capability = rtb_NOT_b; FmgcComputer_Y.out.ap_fd_logic.land_3_fail_op_capability = rtb_appCapability_idx_2; - FmgcComputer_Y.out.ap_fd_logic.land_2_inop = rtb_y_i2; - FmgcComputer_Y.out.ap_fd_logic.land_3_fail_passive_inop = rtb_y_me; + FmgcComputer_Y.out.ap_fd_logic.land_2_inop = rtb_y_me; + FmgcComputer_Y.out.ap_fd_logic.land_3_fail_passive_inop = rtb_y_pw; FmgcComputer_Y.out.ap_fd_logic.land_3_fail_op_inop = rtb_appInop_idx_2; FmgcComputer_Y.out.ap_fd_logic.land_2_capacity = rtb_TmpSignalConversionAtSFunctionInport3_idx_0; FmgcComputer_Y.out.ap_fd_logic.land_3_fail_passive_capacity = rtb_TmpSignalConversionAtSFunctionInport3_idx_1; @@ -4509,22 +4521,22 @@ void FmgcComputer::step() FmgcComputer_Y.out.ap_fd_outer_loops.autopilot.Theta_c_deg = rtb_DataTypeConversion1_d; FmgcComputer_Y.out.ap_fd_outer_loops.autopilot.Phi_c_deg = rtb_DataTypeConversion_cm; FmgcComputer_Y.out.ap_fd_outer_loops.autopilot.Beta_c_deg = rtb_Beta_c_deg_e; - FmgcComputer_Y.out.ap_fd_outer_loops.flare_law.condition_Flare = rtb_Compare_du; + FmgcComputer_Y.out.ap_fd_outer_loops.flare_law.condition_Flare = rtb_Compare_bj; FmgcComputer_Y.out.ap_fd_outer_loops.flare_law.H_dot_radio_fpm = rtb_H_dot_radio_fpm; FmgcComputer_Y.out.ap_fd_outer_loops.flare_law.H_dot_c_fpm = rtb_H_dot_c_fpm; FmgcComputer_Y.out.ap_fd_outer_loops.flare_law.delta_Theta_H_dot_deg = rtb_delta_Theta_H_dot_deg; FmgcComputer_Y.out.ap_fd_outer_loops.flare_law.delta_Theta_bz_deg = rtb_delta_Theta_bz_deg; FmgcComputer_Y.out.ap_fd_outer_loops.flare_law.delta_Theta_bx_deg = rtb_delta_Theta_bx_deg; FmgcComputer_Y.out.ap_fd_outer_loops.flare_law.delta_Theta_beta_c_deg = rtb_delta_Theta_beta_c_deg; - FmgcComputer_Y.out.athr.athr_active = rtb_y_hh; - FmgcComputer_Y.out.athr.athr_limited = rtb_y_oi; + FmgcComputer_Y.out.athr.athr_active = rtb_y_od; + FmgcComputer_Y.out.athr.athr_limited = rtb_y_js; FmgcComputer_Y.out.athr.alpha_floor_mode_active = FmgcComputer_DWork.Memory_PreviousInput_hu; FmgcComputer_Y.out.athr.thrust_mode_active = FmgcComputer_DWork.Memory_PreviousInput_bh; - FmgcComputer_Y.out.athr.thrust_target_idle = rtb_OR_m4; + FmgcComputer_Y.out.athr.thrust_target_idle = rtb_OR_i; FmgcComputer_Y.out.athr.speed_mach_mode_active = FmgcComputer_DWork.Memory_PreviousInput_cm; FmgcComputer_Y.out.athr.retard_mode_active = FmgcComputer_DWork.Memory_PreviousInput_ol; - FmgcComputer_Y.out.athr.fma_mode = rtb_y_d; - FmgcComputer_Y.out.athr.fma_message = rtb_y_nf; + FmgcComputer_Y.out.athr.fma_mode = rtb_y_lu; + FmgcComputer_Y.out.athr.fma_message = rtb_y_nc; FmgcComputer_Y.out.athr.n1_c_percent = rtb_Switch1_a; FmgcComputer_Y.out.discrete_outputs.athr_own_engaged = FmgcComputer_DWork.Delay_DSTATE_k; FmgcComputer_Y.out.discrete_outputs.fd_own_engaged = fdOwnOff; @@ -4532,7 +4544,7 @@ void FmgcComputer::step() FmgcComputer_Y.out.discrete_outputs.fcu_own_fail = FmgcComputer_P.Constant_Value_m5; FmgcComputer_Y.out.discrete_outputs.fmgc_healthy = FmgcComputer_P.Constant1_Value_i5; FmgcComputer_Y.out.discrete_outputs.ils_test_inhibit = rtb_BusAssignment_b_logic_ils_tune_inhibit; - if ((!rtb_y_p) && (!rtb_y_n) && (!FmgcComputer_DWork.Memory_PreviousInput_hk)) { + if ((!rtb_y_c2) && (!rtb_y_d) && (!FmgcComputer_DWork.Memory_PreviousInput_hk)) { FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.pfd_sel_spd_kts.SSM = static_cast (FmgcComputer_P.EnumeratedConstant_Value); } else { @@ -4541,7 +4553,7 @@ void FmgcComputer::step() } FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.pfd_sel_spd_kts.Data = static_cast(rtb_Switch_of[1]); - if (rtb_y_cq || rtb_BusAssignment_b_logic_ils_tune_inhibit) { + if (rtb_y_c || rtb_BusAssignment_b_logic_ils_tune_inhibit) { FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.runway_hdg_memorized_deg.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); } else { @@ -4571,8 +4583,8 @@ void FmgcComputer::step() FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.preset_speed_from_mcdu_kts.Data = static_cast (FmgcComputer_U.in.fms_inputs.preset_spd_kts); - rtb_y_n = !FmgcComputer_DWork.Memory_PreviousInput_m; - if (rtb_Compare_mh && (!FmgcComputer_DWork.Memory_PreviousInput_c) && rtb_y_n) { + rtb_y_d = !FmgcComputer_DWork.Memory_PreviousInput_m; + if (rtb_Compare_ov && (!FmgcComputer_DWork.Memory_PreviousInput_c) && rtb_y_d) { FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.roll_fd_command.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); } else { @@ -4581,7 +4593,7 @@ void FmgcComputer::step() } FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.roll_fd_command.Data = static_cast(rtb_Phi_c_deg); - if (rtb_Compare_a5 && rtb_y_n) { + if (rtb_y_jt && rtb_y_d) { FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.pitch_fd_command.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); } else { @@ -4590,7 +4602,7 @@ void FmgcComputer::step() } FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.pitch_fd_command.Data = static_cast(rtb_Theta_c_deg); - if (FmgcComputer_DWork.Memory_PreviousInput_c || rtb_NOT_c || FmgcComputer_DWork.Memory_PreviousInput_m) { + if (FmgcComputer_DWork.Memory_PreviousInput_c || rtb_GreaterThan3_e || FmgcComputer_DWork.Memory_PreviousInput_m) { FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.yaw_fd_command.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); } else { @@ -4632,7 +4644,7 @@ void FmgcComputer::step() (FmgcComputer_U.in.fms_inputs.flex_temp_deg_c); FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.ats_discrete_word.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); - FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.ats_discrete_word.Data = rtb_y_g; + FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.ats_discrete_word.Data = rtb_y_jv; FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.ats_fma_discrete_word.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); FmgcComputer_Y.out.bus_outputs.fmgc_a_bus.discrete_word_3.SSM = static_cast @@ -4705,7 +4717,7 @@ void FmgcComputer::step() FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.discrete_word_4.Data = rtb_DataTypeConversion2_bh; FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.ats_discrete_word.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); - FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.ats_discrete_word.Data = rtb_y_g; + FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.ats_discrete_word.Data = rtb_y_jv; FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.discrete_word_3.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value); FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.discrete_word_3.Data = rtb_y_gtq; @@ -4740,17 +4752,17 @@ void FmgcComputer::step() FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.n1_right_percent.SSM = static_cast (FmgcComputer_P.EnumeratedConstant1_Value_d); FmgcComputer_Y.out.bus_outputs.fmgc_b_bus.n1_right_percent.Data = FmgcComputer_P.Constant2_Value_n; - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_active = rtb_y_cj; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_active = rtb_y_hi; FmgcComputer_DWork.Delay_DSTATE.lateral_modes.nav_active = FmgcComputer_DWork.Memory_PreviousInput_ip; FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_cpt_active = FmgcComputer_DWork.Memory_PreviousInput_cv; FmgcComputer_DWork.Delay_DSTATE.lateral_modes.loc_trk_active = FmgcComputer_DWork.Memory_PreviousInput_lq; FmgcComputer_DWork.Delay_DSTATE.lateral_modes.roll_goaround_active = FmgcComputer_DWork.Memory_PreviousInput_el; - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active = rtb_y_da; - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active = rtb_AND9; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.hdg_active = rtb_OR_iw; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.trk_active = rtb_y_j1; FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_loc_submode_active = FmgcComputer_DWork.Memory_PreviousInput_c; FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rwy_trk_submode_active = FmgcComputer_DWork.Memory_PreviousInput_b; FmgcComputer_DWork.Delay_DSTATE.lateral_modes.land_active = FmgcComputer_DWork.Memory_PreviousInput_d; - FmgcComputer_DWork.Delay_DSTATE.lateral_modes.align_submode_active = rtb_NOT_c; + FmgcComputer_DWork.Delay_DSTATE.lateral_modes.align_submode_active = rtb_GreaterThan3_e; FmgcComputer_DWork.Delay_DSTATE.lateral_modes.rollout_submode_active = FmgcComputer_DWork.Memory_PreviousInput_m; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.clb_active = FmgcComputer_DWork.Memory_PreviousInput_ec; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.des_active = FmgcComputer_DWork.Memory_PreviousInput_b3; @@ -4761,10 +4773,10 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_takeoff_active = FmgcComputer_DWork.Memory_PreviousInput_k; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.pitch_goaround_active = FmgcComputer_DWork.Memory_PreviousInput_i; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.vs_active = rtb_AND12; - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fpa_active = Memory_PreviousInput_l_tmp; + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fpa_active = Memory_PreviousInput_l_tmp_0; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_acq_active = FmgcComputer_DWork.Memory_PreviousInput_ne; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.alt_hold_active = FmgcComputer_DWork.Memory_PreviousInput_cb; - FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fma_dash_display = rtb_Compare_gc; + FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.fma_dash_display = rtb_Compare_bb; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_capt_active = FmgcComputer_DWork.Memory_PreviousInput_nu; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.gs_trk_active = FmgcComputer_DWork.Memory_PreviousInput_as; FmgcComputer_DWork.Delay_DSTATE.longitudinal_modes.final_des_active = rtb_Logic_b[0]; @@ -4793,33 +4805,33 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay_DSTATE.alt_sel_or_cstr = rtb_altCstrOrFcu; FmgcComputer_DWork.Delay_DSTATE.fmgc_opp_mode_sync = rtb_OR2_l; FmgcComputer_DWork.Delay_DSTATE.any_ap_fd_engaged = apCondition; - FmgcComputer_DWork.Delay_DSTATE.any_lateral_mode_engaged = rtb_Compare_mh; + FmgcComputer_DWork.Delay_DSTATE.any_lateral_mode_engaged = rtb_Compare_ov; FmgcComputer_DWork.Delay_DSTATE.lateral_mode_reset = rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset; FmgcComputer_DWork.Delay_DSTATE.longitudinal_mode_reset = rtb_BusAssignment_m_ap_fd_logic_lateral_mode_reset; FmgcComputer_DWork.Delay_DSTATE.hdg_trk_preset_available = FmgcComputer_DWork.Memory_PreviousInput_bw; FmgcComputer_DWork.Delay_DSTATE.alt_soft_mode_active = rtb_Logic_hq[0]; - FmgcComputer_DWork.Delay_DSTATE.fd_auto_disengage = rtb_Compare_fn; - FmgcComputer_DWork.Delay_DSTATE.ap_fd_mode_reversion = rtb_NOT3_tmp_0; + FmgcComputer_DWork.Delay_DSTATE.fd_auto_disengage = rtb_Compare_gc; + FmgcComputer_DWork.Delay_DSTATE.ap_fd_mode_reversion = rtb_OR2_l_tmp; FmgcComputer_DWork.Delay_DSTATE.lateral_mode_reversion = rtb_AND8; - FmgcComputer_DWork.Delay_DSTATE.longitudinal_mode_reversion_vs = rtb_NOT3_tmp; - FmgcComputer_DWork.Delay_DSTATE.longitudinal_mode_reversion_op_clb = rtb_y_hy; - FmgcComputer_DWork.Delay_DSTATE.pitch_fd_bars_flashing = rtb_y_a0_tmp; - FmgcComputer_DWork.Delay_DSTATE.roll_fd_bars_flashing = rtb_AND_e_tmp; + FmgcComputer_DWork.Delay_DSTATE.longitudinal_mode_reversion_vs = Memory_PreviousInput_d_tmp_tmp; + FmgcComputer_DWork.Delay_DSTATE.longitudinal_mode_reversion_op_clb = rtb_y_dk; + FmgcComputer_DWork.Delay_DSTATE.pitch_fd_bars_flashing = rtb_NOT3_tmp_0; + FmgcComputer_DWork.Delay_DSTATE.roll_fd_bars_flashing = rtb_y_lh_tmp; FmgcComputer_DWork.Delay_DSTATE.loc_bc_selection = rtP_fmgc_ap_fd_logic_output_MATLABStruct.loc_bc_selection; - FmgcComputer_DWork.Delay_DSTATE.vs_target_not_held = rtb_y_h; + FmgcComputer_DWork.Delay_DSTATE.vs_target_not_held = rtb_AND10_b; FmgcComputer_DWork.Delay_DSTATE.tcas_vs_target = rtb_BusAssignment_hk_ap_fd_logic_tcas_vs_target; FmgcComputer_DWork.Delay_DSTATE.tcas_ra_corrective = rtb_NOT_oj; FmgcComputer_DWork.Delay_DSTATE.active_tcas_submode = rtb_mode; - FmgcComputer_DWork.Delay_DSTATE.tcas_alt_acq_cond = rtb_NOT_gj; + FmgcComputer_DWork.Delay_DSTATE.tcas_alt_acq_cond = rtb_OR2_l_tmp_1; FmgcComputer_DWork.Delay_DSTATE.tcas_alt_hold_cond = Memory_PreviousInput_k_tmp_tmp_tmp; FmgcComputer_DWork.Delay_DSTATE.tcas_ra_inhibited = rtb_NOT3; - FmgcComputer_DWork.Delay_DSTATE.trk_fpa_deselected = rtb_y_dm; + FmgcComputer_DWork.Delay_DSTATE.trk_fpa_deselected = rtb_BusAssignment_hk_ap_fd_logic_trk_fpa_deselected; FmgcComputer_DWork.Delay_DSTATE.longi_large_box_tcas = rtb_BusAssignment_hk_ap_fd_logic_longi_large_box_tcas; - FmgcComputer_DWork.Delay_DSTATE.land_2_capability = rtb_NOT_b; - FmgcComputer_DWork.Delay_DSTATE.land_3_fail_passive_capability = rtb_y_fd; + FmgcComputer_DWork.Delay_DSTATE.land_2_capability = rtb_y_e2; + FmgcComputer_DWork.Delay_DSTATE.land_3_fail_passive_capability = rtb_NOT_b; FmgcComputer_DWork.Delay_DSTATE.land_3_fail_op_capability = rtb_appCapability_idx_2; - FmgcComputer_DWork.Delay_DSTATE.land_2_inop = rtb_y_i2; - FmgcComputer_DWork.Delay_DSTATE.land_3_fail_passive_inop = rtb_y_me; + FmgcComputer_DWork.Delay_DSTATE.land_2_inop = rtb_y_me; + FmgcComputer_DWork.Delay_DSTATE.land_3_fail_passive_inop = rtb_y_pw; FmgcComputer_DWork.Delay_DSTATE.land_3_fail_op_inop = rtb_appInop_idx_2; FmgcComputer_DWork.Delay_DSTATE.land_2_capacity = rtb_TmpSignalConversionAtSFunctionInport3_idx_0; FmgcComputer_DWork.Delay_DSTATE.land_3_fail_passive_capacity = rtb_TmpSignalConversionAtSFunctionInport3_idx_1; @@ -4833,7 +4845,7 @@ void FmgcComputer::step() FmgcComputer_DWork.Delay2_DSTATE.flight_director.Phi_c_deg = rtb_Phi_c_deg; FmgcComputer_DWork.Delay2_DSTATE.flight_director.Beta_c_deg = rtb_Beta_c_deg; FmgcComputer_DWork.Delay2_DSTATE.autopilot.Beta_c_deg = rtb_Beta_c_deg_e; - FmgcComputer_DWork.Delay2_DSTATE.flare_law.condition_Flare = rtb_Compare_du; + FmgcComputer_DWork.Delay2_DSTATE.flare_law.condition_Flare = rtb_Compare_bj; FmgcComputer_DWork.Delay2_DSTATE.flare_law.H_dot_radio_fpm = rtb_H_dot_radio_fpm; FmgcComputer_DWork.Delay2_DSTATE.flare_law.H_dot_c_fpm = rtb_H_dot_c_fpm; FmgcComputer_DWork.Delay2_DSTATE.flare_law.delta_Theta_H_dot_deg = rtb_delta_Theta_H_dot_deg; @@ -4849,15 +4861,15 @@ void FmgcComputer::step() FmgcComputer_DWork.Memory_PreviousInput_bo = FmgcComputer_DWork.Delay_DSTATE_c; FmgcComputer_DWork.Memory_PreviousInput_ak = rtb_Logic_hq[0]; FmgcComputer_DWork.Memory_PreviousInput_j = FmgcComputer_P.Logic_table_lwo[static_cast(absVsTarget)]; - FmgcComputer_DWork.Delay1_DSTATE.athr_active = rtb_y_hh; - FmgcComputer_DWork.Delay1_DSTATE.athr_limited = rtb_y_oi; + FmgcComputer_DWork.Delay1_DSTATE.athr_active = rtb_y_od; + FmgcComputer_DWork.Delay1_DSTATE.athr_limited = rtb_y_js; FmgcComputer_DWork.Delay1_DSTATE.alpha_floor_mode_active = FmgcComputer_DWork.Memory_PreviousInput_hu; FmgcComputer_DWork.Delay1_DSTATE.thrust_mode_active = FmgcComputer_DWork.Memory_PreviousInput_bh; - FmgcComputer_DWork.Delay1_DSTATE.thrust_target_idle = rtb_OR_m4; + FmgcComputer_DWork.Delay1_DSTATE.thrust_target_idle = rtb_OR_i; FmgcComputer_DWork.Delay1_DSTATE.speed_mach_mode_active = FmgcComputer_DWork.Memory_PreviousInput_cm; FmgcComputer_DWork.Delay1_DSTATE.retard_mode_active = FmgcComputer_DWork.Memory_PreviousInput_ol; - FmgcComputer_DWork.Delay1_DSTATE.fma_mode = rtb_y_d; - FmgcComputer_DWork.Delay1_DSTATE.fma_message = rtb_y_nf; + FmgcComputer_DWork.Delay1_DSTATE.fma_mode = rtb_y_lu; + FmgcComputer_DWork.Delay1_DSTATE.fma_message = rtb_y_nc; FmgcComputer_DWork.Delay1_DSTATE.n1_c_percent = rtb_Switch1_a; FmgcComputer_DWork.icLoad = false; FmgcComputer_DWork.Delay_DSTATE_f = FmgcComputer_DWork.Delay_DSTATE_l; diff --git a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.h b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.h index 242bde9d4f5..1bddf737d4a 100644 --- a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.h +++ b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.h @@ -631,9 +631,11 @@ class FmgcComputer final SignStatusMatrix EnumeratedConstant_Value; SignStatusMatrix EnumeratedConstant1_Value; SignStatusMatrix EnumeratedConstant1_Value_d; + fmgc_approach_type EnumeratedConstant_Value_a; + fmgc_approach_type EnumeratedConstant_Value_f; fmgc_des_submode EnumeratedConstant1_Value_i; fmgc_flight_phase EnumeratedConstant_Value_i; - fmgc_flight_phase EnumeratedConstant_Value_a; + fmgc_flight_phase EnumeratedConstant_Value_ah; fmgc_flight_phase EnumeratedConstant1_Value_dg; fmgc_flight_phase EnumeratedConstant_Value_p; fmgc_flight_phase EnumeratedConstant1_Value_m; @@ -1096,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]; diff --git a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_data.cpp b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_data.cpp index 8ff4b19e2fb..97ba514db94 100644 --- a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_data.cpp +++ b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_data.cpp @@ -470,6 +470,8 @@ FmgcComputer::Parameters_FmgcComputer_T FmgcComputer::FmgcComputer_P{ SignStatusMatrix::NoComputedData, SignStatusMatrix::NormalOperation, SignStatusMatrix::NormalOperation, + fmgc_approach_type::ILS, + fmgc_approach_type::RNAV, fmgc_des_submode::SPEED_THRUST, fmgc_flight_phase::Approach, fmgc_flight_phase::Takeoff, @@ -4014,7 +4016,6 @@ FmgcComputer::Parameters_FmgcComputer_T FmgcComputer::FmgcComputer_P{ { false, true, false, false, true, true, false, false, true, false, true, true, false, false, false, false }, { false, true, false, false, true, true, false, false, true, false, true, true, false, false, false, false }, - true, false, { false, true, false, false, true, true, false, false, true, false, true, true, false, false, false, false }, @@ -4024,7 +4025,6 @@ FmgcComputer::Parameters_FmgcComputer_T FmgcComputer::FmgcComputer_P{ { false, true, false, false, true, true, false, false, true, false, true, true, false, false, false, false }, { false, true, false, false, true, true, false, false, true, false, true, true, false, false, false, false }, - false, { false, true, false, false, true, true, false, false, true, false, true, true, false, false, false, false }, diff --git a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_types.h b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_types.h index 7ccc5d94dfc..3c131cebe34 100644 --- a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_types.h +++ b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_types.h @@ -18,6 +18,18 @@ enum class fmgc_flight_phase #endif +#ifndef DEFINED_TYPEDEF_FOR_fmgc_approach_type_ +#define DEFINED_TYPEDEF_FOR_fmgc_approach_type_ + +enum class fmgc_approach_type + : int32_T { + None = 0, + ILS, + RNAV +}; + +#endif + #ifndef DEFINED_TYPEDEF_FOR_tcas_submode_ #define DEFINED_TYPEDEF_FOR_tcas_submode_ @@ -58,16 +70,6 @@ enum class SignStatusMatrix #endif -#ifndef DEFINED_TYPEDEF_FOR_fmgc_approach_type_ -#define DEFINED_TYPEDEF_FOR_fmgc_approach_type_ - -enum class fmgc_approach_type - : int32_T { - None = 0 -}; - -#endif - #ifndef DEFINED_TYPEDEF_FOR_base_arinc_429_ #define DEFINED_TYPEDEF_FOR_base_arinc_429_ @@ -79,62 +81,6 @@ struct base_arinc_429 #endif -#ifndef DEFINED_TYPEDEF_FOR_base_fmgc_a_bus_ -#define DEFINED_TYPEDEF_FOR_base_fmgc_a_bus_ - -struct base_fmgc_a_bus -{ - base_arinc_429 pfd_sel_spd_kts; - base_arinc_429 runway_hdg_memorized_deg; - base_arinc_429 preset_mach_from_mcdu; - base_arinc_429 preset_speed_from_mcdu_kts; - base_arinc_429 roll_fd_command; - base_arinc_429 pitch_fd_command; - base_arinc_429 yaw_fd_command; - base_arinc_429 discrete_word_5; - base_arinc_429 discrete_word_4; - base_arinc_429 fm_alt_constraint_ft; - base_arinc_429 altitude_ft; - base_arinc_429 mach; - base_arinc_429 cas_kts; - base_arinc_429 flx_to_temp_deg_c; - base_arinc_429 ats_discrete_word; - base_arinc_429 ats_fma_discrete_word; - base_arinc_429 discrete_word_3; - base_arinc_429 discrete_word_1; - base_arinc_429 discrete_word_2; - base_arinc_429 discrete_word_6; - base_arinc_429 synchro_spd_mach_value; - base_arinc_429 low_target_speed_margin_kts; - base_arinc_429 high_target_speed_margin_kts; - base_arinc_429 delta_p_ail_voted_cmd_deg; - base_arinc_429 delta_p_splr_voted_cmd_deg; - base_arinc_429 delta_r_voted_cmd_deg; - base_arinc_429 delta_nosewheel_voted_cmd_deg; - base_arinc_429 delta_q_voted_cmd_deg; - base_arinc_429 track_deg; - base_arinc_429 heading_deg; - base_arinc_429 fpa_deg; - base_arinc_429 n1_command_percent; - base_arinc_429 vertical_speed_ft_min; - base_arinc_429 discrete_word_7; -}; - -#endif - -#ifndef DEFINED_TYPEDEF_FOR_base_ils_bus_ -#define DEFINED_TYPEDEF_FOR_base_ils_bus_ - -struct base_ils_bus -{ - base_arinc_429 runway_heading_deg; - base_arinc_429 ils_frequency_mhz; - base_arinc_429 localizer_deviation_deg; - base_arinc_429 glideslope_deviation_deg; -}; - -#endif - #ifndef DEFINED_TYPEDEF_FOR_base_fmgc_b_bus_ #define DEFINED_TYPEDEF_FOR_base_fmgc_b_bus_ @@ -162,6 +108,19 @@ struct base_fmgc_b_bus #endif +#ifndef DEFINED_TYPEDEF_FOR_base_ils_bus_ +#define DEFINED_TYPEDEF_FOR_base_ils_bus_ + +struct base_ils_bus +{ + base_arinc_429 runway_heading_deg; + base_arinc_429 ils_frequency_mhz; + base_arinc_429 localizer_deviation_deg; + base_arinc_429 glideslope_deviation_deg; +}; + +#endif + #ifndef DEFINED_TYPEDEF_FOR_base_fmgc_discrete_inputs_ #define DEFINED_TYPEDEF_FOR_base_fmgc_discrete_inputs_ @@ -206,6 +165,49 @@ struct base_fmgc_discrete_inputs #endif +#ifndef DEFINED_TYPEDEF_FOR_base_fmgc_a_bus_ +#define DEFINED_TYPEDEF_FOR_base_fmgc_a_bus_ + +struct base_fmgc_a_bus +{ + base_arinc_429 pfd_sel_spd_kts; + base_arinc_429 runway_hdg_memorized_deg; + base_arinc_429 preset_mach_from_mcdu; + base_arinc_429 preset_speed_from_mcdu_kts; + base_arinc_429 roll_fd_command; + base_arinc_429 pitch_fd_command; + base_arinc_429 yaw_fd_command; + base_arinc_429 discrete_word_5; + base_arinc_429 discrete_word_4; + base_arinc_429 fm_alt_constraint_ft; + base_arinc_429 altitude_ft; + base_arinc_429 mach; + base_arinc_429 cas_kts; + base_arinc_429 flx_to_temp_deg_c; + base_arinc_429 ats_discrete_word; + base_arinc_429 ats_fma_discrete_word; + base_arinc_429 discrete_word_3; + base_arinc_429 discrete_word_1; + base_arinc_429 discrete_word_2; + base_arinc_429 discrete_word_6; + base_arinc_429 synchro_spd_mach_value; + base_arinc_429 low_target_speed_margin_kts; + base_arinc_429 high_target_speed_margin_kts; + base_arinc_429 delta_p_ail_voted_cmd_deg; + base_arinc_429 delta_p_splr_voted_cmd_deg; + base_arinc_429 delta_r_voted_cmd_deg; + base_arinc_429 delta_nosewheel_voted_cmd_deg; + base_arinc_429 delta_q_voted_cmd_deg; + base_arinc_429 track_deg; + base_arinc_429 heading_deg; + base_arinc_429 fpa_deg; + base_arinc_429 n1_command_percent; + base_arinc_429 vertical_speed_ft_min; + base_arinc_429 discrete_word_7; +}; + +#endif + #ifndef DEFINED_TYPEDEF_FOR_base_time_ #define DEFINED_TYPEDEF_FOR_base_time_ From 4baaeb37665d6bc30fb4b18a8ce7e42f48951bb5 Mon Sep 17 00:00:00 2001 From: Lukas Michels Date: Fri, 27 Dec 2024 00:47:10 +0100 Subject: [PATCH 04/17] fix(fmgc): use abs for temporary capture condition --- fbw-a32nx/src/wasm/fbw_a320/src/FlyByWireInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fbw-a32nx/src/wasm/fbw_a320/src/FlyByWireInterface.cpp b/fbw-a32nx/src/wasm/fbw_a320/src/FlyByWireInterface.cpp index 009e4bfcd33..8f4dd71efa0 100644 --- a/fbw-a32nx/src/wasm/fbw_a320/src/FlyByWireInterface.cpp +++ b/fbw-a32nx/src/wasm/fbw_a320/src/FlyByWireInterface.cpp @@ -1788,7 +1788,7 @@ bool FlyByWireInterface::updateFmgc(double sampleTime, int fmgcIndex) { 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(); From 45ec7cb2ae8fdaebb24460fb5c04e570ae607aed Mon Sep 17 00:00:00 2001 From: Lukas Michels Date: Fri, 27 Dec 2024 15:36:38 +0100 Subject: [PATCH 05/17] fix(fmgc): raise default RA value to 2500f to enable LOC engagement --- .../wasm/fbw_a320/src/model/FmgcComputer.cpp | 2 +- .../fbw_a320/src/model/FmgcComputer_types.h | 80 +++++++++---------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.cpp b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.cpp index b98f09508ef..e86c444757f 100644 --- a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.cpp +++ b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer.cpp @@ -1148,7 +1148,7 @@ void FmgcComputer::step() rtb_raComputationData_radio_height_ft_Data = FmgcComputer_U.in.bus_inputs.ra_own_bus.radio_height_ft.Data; } else { rtb_raComputationData_radio_height_ft_SSM = FmgcComputer_U.in.bus_inputs.ra_own_bus.radio_height_ft.SSM; - rtb_raComputationData_radio_height_ft_Data = 250.0F; + rtb_raComputationData_radio_height_ft_Data = 2500.0F; } raOwnInvalid = (raOwnInvalid && raOppInvalid); diff --git a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_types.h b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_types.h index 3c131cebe34..1861bc393d1 100644 --- a/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_types.h +++ b/fbw-a32nx/src/wasm/fbw_a320/src/model/FmgcComputer_types.h @@ -81,46 +81,6 @@ struct base_arinc_429 #endif -#ifndef DEFINED_TYPEDEF_FOR_base_fmgc_b_bus_ -#define DEFINED_TYPEDEF_FOR_base_fmgc_b_bus_ - -struct base_fmgc_b_bus -{ - base_arinc_429 fac_weight_lbs; - base_arinc_429 fm_weight_lbs; - base_arinc_429 fac_cg_percent; - base_arinc_429 fm_cg_percent; - base_arinc_429 fg_radio_height_ft; - base_arinc_429 discrete_word_4; - base_arinc_429 ats_discrete_word; - base_arinc_429 discrete_word_3; - base_arinc_429 discrete_word_1; - base_arinc_429 discrete_word_2; - base_arinc_429 approach_spd_target_kn; - base_arinc_429 delta_p_ail_cmd_deg; - base_arinc_429 delta_p_splr_cmd_deg; - base_arinc_429 delta_r_cmd_deg; - base_arinc_429 delta_nose_wheel_cmd_deg; - base_arinc_429 delta_q_cmd_deg; - base_arinc_429 n1_left_percent; - base_arinc_429 n1_right_percent; -}; - -#endif - -#ifndef DEFINED_TYPEDEF_FOR_base_ils_bus_ -#define DEFINED_TYPEDEF_FOR_base_ils_bus_ - -struct base_ils_bus -{ - base_arinc_429 runway_heading_deg; - base_arinc_429 ils_frequency_mhz; - base_arinc_429 localizer_deviation_deg; - base_arinc_429 glideslope_deviation_deg; -}; - -#endif - #ifndef DEFINED_TYPEDEF_FOR_base_fmgc_discrete_inputs_ #define DEFINED_TYPEDEF_FOR_base_fmgc_discrete_inputs_ @@ -165,6 +125,46 @@ struct base_fmgc_discrete_inputs #endif +#ifndef DEFINED_TYPEDEF_FOR_base_fmgc_b_bus_ +#define DEFINED_TYPEDEF_FOR_base_fmgc_b_bus_ + +struct base_fmgc_b_bus +{ + base_arinc_429 fac_weight_lbs; + base_arinc_429 fm_weight_lbs; + base_arinc_429 fac_cg_percent; + base_arinc_429 fm_cg_percent; + base_arinc_429 fg_radio_height_ft; + base_arinc_429 discrete_word_4; + base_arinc_429 ats_discrete_word; + base_arinc_429 discrete_word_3; + base_arinc_429 discrete_word_1; + base_arinc_429 discrete_word_2; + base_arinc_429 approach_spd_target_kn; + base_arinc_429 delta_p_ail_cmd_deg; + base_arinc_429 delta_p_splr_cmd_deg; + base_arinc_429 delta_r_cmd_deg; + base_arinc_429 delta_nose_wheel_cmd_deg; + base_arinc_429 delta_q_cmd_deg; + base_arinc_429 n1_left_percent; + base_arinc_429 n1_right_percent; +}; + +#endif + +#ifndef DEFINED_TYPEDEF_FOR_base_ils_bus_ +#define DEFINED_TYPEDEF_FOR_base_ils_bus_ + +struct base_ils_bus +{ + base_arinc_429 runway_heading_deg; + base_arinc_429 ils_frequency_mhz; + base_arinc_429 localizer_deviation_deg; + base_arinc_429 glideslope_deviation_deg; +}; + +#endif + #ifndef DEFINED_TYPEDEF_FOR_base_fmgc_a_bus_ #define DEFINED_TYPEDEF_FOR_base_fmgc_a_bus_ From 808637aae4ba9c765696d5208a555048a17ae047 Mon Sep 17 00:00:00 2001 From: BBK <22713769+BlueberryKing@users.noreply.github.com> Date: Sat, 28 Dec 2024 09:25:09 +0100 Subject: [PATCH 06/17] Implement basic pre NAV mode engagement path --- .../src/systems/fmgc/src/efis/EfisSymbols.ts | 24 +- .../src/systems/fmgc/src/efis/EfisVectors.ts | 12 +- .../fmgc/src/guidance/GuidanceController.ts | 27 +- .../src/guidance/PreNavModeEngagementPath.ts | 255 ++++++++++++++++++ .../systems/fmgc/src/navigation/Navigation.ts | 39 ++- .../fmgc/src/navigation/NavigationProvider.ts | 18 ++ .../src/MFD/FMC/FlightManagementComputer.ts | 1 + 7 files changed, 366 insertions(+), 10 deletions(-) create mode 100644 fbw-a32nx/src/systems/fmgc/src/guidance/PreNavModeEngagementPath.ts diff --git a/fbw-a32nx/src/systems/fmgc/src/efis/EfisSymbols.ts b/fbw-a32nx/src/systems/fmgc/src/efis/EfisSymbols.ts index ad2bb74ef2d..e5bbe25462b 100644 --- a/fbw-a32nx/src/systems/fmgc/src/efis/EfisSymbols.ts +++ b/fbw-a32nx/src/systems/fmgc/src/efis/EfisSymbols.ts @@ -41,6 +41,7 @@ import { EfisInterface } from '@fmgc/efis/EfisInterface'; import { WaypointConstraintType } from '@fmgc/flightplanning/data/constraint'; import { ConsumerValue, EventBus } from '@microsoft/msfs-sdk'; import { FlightPhaseManagerEvents } from '@fmgc/flightphase'; +import { NavModeIntercept } from '@fmgc/guidance/PreNavModeEngagementPath'; /** * A map edit area in nautical miles, [ahead, behind, beside]. @@ -78,6 +79,8 @@ export class EfisSymbols { private lastEfisInterfaceVersions: Record = { L: -1, R: -1 }; + private lastIntercept: NavModeIntercept | null = null; + private mapReferenceLatitude: Record = { L: Arinc429OutputWord.empty('L:A32NX_EFIS_L_MRP_LAT'), R: Arinc429OutputWord.empty('L:A32NX_EFIS_R_MRP_LAT'), @@ -187,6 +190,12 @@ export class EfisSymbols { const vnavPredictionsChanged = this.lastVnavDriverVersion !== this.guidanceController.vnavDriver.version; this.lastVnavDriverVersion = this.guidanceController.vnavDriver.version; + const intercept = this.guidanceController.getPreNavModeEngagementPathIntercept(); + const interceptChanged = + (this.lastIntercept === null) !== (intercept === null) || + distanceTo(this.lastIntercept?.location, intercept?.location) > 2; + this.lastIntercept = intercept; + const hasSuitableRunway = (airport: Airport): boolean => airport.longestRunwayLength >= 1500 && airport.longestRunwaySurfaceType === RunwaySurfaceType.Hard; @@ -215,7 +224,8 @@ export class EfisSymbols { !fpChanged && !navaidsChanged && !vnavPredictionsChanged && - !efisInterfaceChanged + !efisInterfaceChanged && + !interceptChanged ) { continue; } @@ -364,7 +374,7 @@ export class EfisSymbols { // (currently sequences with guidance which is too early) // eslint-disable-next-line no-lone-blocks - // ALTN + // ACTIVE if ( this.flightPlanService.hasActive && this.guidanceController.hasGeometryForFlightPlan(FlightPlanIndex.Active) @@ -384,6 +394,16 @@ export class EfisSymbols { formatConstraintSpeed, ); + if (this.guidanceController.doesPreNavModeEngagementPathExist()) { + upsertSymbol({ + databaseId: 'NAV_MODE_INTERCEPT', + ident: 'INTCPT', + type: NdSymbolTypeFlags.FlightPlan | NdSymbolTypeFlags.Waypoint, + location: intercept.location, + distanceFromAirplane: intercept.distanceToIntercept, + }); + } + for (const symbol of symbols) { upsertSymbol(symbol); } diff --git a/fbw-a32nx/src/systems/fmgc/src/efis/EfisVectors.ts b/fbw-a32nx/src/systems/fmgc/src/efis/EfisVectors.ts index a341fe5e1b1..d4828be789d 100644 --- a/fbw-a32nx/src/systems/fmgc/src/efis/EfisVectors.ts +++ b/fbw-a32nx/src/systems/fmgc/src/efis/EfisVectors.ts @@ -137,8 +137,7 @@ export class EfisVectors { const navArmed = isArmed(armedLateralMode, ArmedLateralMode.NAV); const flightPhase = this.flightPhase.get(); - // FIXME implement - const doesPreNavEngagePathExist = engagedLateralMode !== LateralMode.GA_TRACK; + const doesPreNavEngagePathExist = this.guidanceController.doesPreNavModeEngagementPathExist(); const transmitActive = // In preflight phase, the flight plan line is solid even when NAV is not armed @@ -211,9 +210,14 @@ export class EfisVectors { // ACTIVE - const geometry = this.guidanceController.getGeometryForFlightPlan(plan.index); + const geometry = this.guidanceController.doesPreNavModeEngagementPathExist() + ? this.guidanceController.getPreNavModeEngagementPathGeometry() + : this.guidanceController.getGeometryForFlightPlan(plan.index); + const activeLegIndex = this.guidanceController.doesPreNavModeEngagementPathExist() + ? plan.activeLegIndex - 1 + : plan.activeLegIndex; - const vectors = geometry.getAllPathVectors(plan.activeLegIndex).filter((it) => EfisVectors.isVectorReasonable(it)); + const vectors = geometry.getAllPathVectors(activeLegIndex).filter((it) => EfisVectors.isVectorReasonable(it)); // ACTIVE missed diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/GuidanceController.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/GuidanceController.ts index c5a975230df..f1e039497f1 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/GuidanceController.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/GuidanceController.ts @@ -34,6 +34,8 @@ import { XFLeg } from './lnav/legs/XF'; import { VMLeg } from './lnav/legs/VM'; import { ConsumerValue, EventBus } from '@microsoft/msfs-sdk'; import { FlightPhaseManagerEvents } from '@fmgc/flightphase'; +import { NavModeIntercept, PreNavModeEngagementPathCalculation } from '@fmgc/guidance/PreNavModeEngagementPath'; +import { NavigationProvider } from '@fmgc/navigation/NavigationProvider'; // How often the (milliseconds) const GEOMETRY_RECOMPUTATION_TIMER = 5_000; @@ -167,6 +169,8 @@ export class GuidanceController { FmgcFlightPhase.Preflight, ); + private preNavModeEngagementPath: PreNavModeEngagementPathCalculation; + private updateEfisState(side: EfisSide, state: EfisState): void { const ndMode = SimVar.GetSimVarValue(`L:A32NX_EFIS_${side}_ND_MODE`, 'Enum') as EfisNdMode; const ndRange = this.efisNDRangeValues[SimVar.GetSimVarValue(`L:A32NX_EFIS_${side}_ND_RANGE`, 'Enum')]; @@ -285,7 +289,8 @@ export class GuidanceController { private readonly bus: EventBus, fmgc: Fmgc, private readonly flightPlanService: FlightPlanService, - private efisInterfaces: Record, + efisInterfaces: Record, + private navigation: NavigationProvider, private readonly efisNDRangeValues: number[], private readonly acConfig: AircraftConfig, ) { @@ -309,6 +314,9 @@ export class GuidanceController { this.pseudoWaypoints = new PseudoWaypoints(flightPlanService, this, this.atmosphericConditions); this.efisVectors = new EfisVectors(this.bus, this.flightPlanService, this, efisInterfaces); this.symbolConfig = acConfig.fmSymbolConfig; + + // TODO use correct FMGC index + this.preNavModeEngagementPath = new PreNavModeEngagementPathCalculation(1, this.navigation, this.flightPlanService); } init() { @@ -406,6 +414,7 @@ export class GuidanceController { } } + this.preNavModeEngagementPath.update(deltaTime, this.activeGeometry); this.updateEfisIdent(); } catch (e) { console.error('[FMS] Error during LNAV update. See exception below.'); @@ -457,7 +466,7 @@ export class GuidanceController { } } - tryUpdateFlightPlanGeometry(flightPlanIndex: number, alternate = false, force = false) { + private tryUpdateFlightPlanGeometry(flightPlanIndex: number, alternate = false, force = false) { const geometryPIndex = (alternate ? 100 : 0) + flightPlanIndex; // Use geometry index here because main and alternate flight plans have the same indices @@ -503,7 +512,7 @@ export class GuidanceController { } } - recomputeGeometry(geometry: Geometry, plan: BaseFlightPlan) { + private recomputeGeometry(geometry: Geometry, plan: BaseFlightPlan) { const tas = SimVar.GetSimVarValue('AIRSPEED TRUE', 'Knots'); const gs = SimVar.GetSimVarValue('GPS GROUND SPEED', 'Knots'); const trueTrack = SimVar.GetSimVarValue('GPS GROUND TRUE TRACK', 'degree'); @@ -566,4 +575,16 @@ export class GuidanceController { get lastCrosstrackError(): NauticalMiles { return this.lnavDriver.lastXTE; } + + doesPreNavModeEngagementPathExist(): boolean { + return this.preNavModeEngagementPath.doesExist(); + } + + getPreNavModeEngagementPathGeometry(): Readonly | null { + return this.preNavModeEngagementPath.getGeometry(); + } + + getPreNavModeEngagementPathIntercept(): Readonly | null { + return this.preNavModeEngagementPath.getIntercept(); + } } diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/PreNavModeEngagementPath.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/PreNavModeEngagementPath.ts new file mode 100644 index 00000000000..37d7a38f8ee --- /dev/null +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/PreNavModeEngagementPath.ts @@ -0,0 +1,255 @@ +import { Arinc429Register, LegType, TurnDirection } from '@flybywiresim/fbw-sdk'; +import { FlightPlanElement, FlightPlanLeg } from '@fmgc/flightplanning/legs/FlightPlanLeg'; +import { NavigationProvider } from '@fmgc/navigation/NavigationProvider'; +import { Geo } from '@fmgc/utils/Geo'; +import { FlightPlanService } from '@fmgc/flightplanning/FlightPlanService'; +import { FlightPlanIndex } from '@fmgc/flightplanning/FlightPlanManager'; +import { Geometry } from '@fmgc/guidance/Geometry'; +import { PointSide, sideOfPointOnCourseToFix } from '@fmgc/guidance/lnav/CommonGeometry'; +import { CFLeg } from '@fmgc/guidance/lnav/legs/CF'; +import { WaypointFactory } from '@fmgc/flightplanning/waypoints/WaypointFactory'; +import { Coordinates, distanceTo } from 'msfs-geo'; +import { GeometryFactory } from '@fmgc/guidance/geometry/GeometryFactory'; + +enum State { + NavDisarmed, + NavArmed, + NavActive, +} + +export interface NavModeIntercept { + location: Coordinates; + distanceToIntercept: number; +} + +export class PreNavModeEngagementPathCalculation implements PreNavModeEngagementPath { + private state: State = State.NavDisarmed; + + private RECOMPUTATION_INTERVAL = 2_500; // milliseconds + + private recomputationTimer = 0; + + private geometry: Geometry | null = null; + + private intercept: NavModeIntercept | null = null; + + private register: Arinc429Register = Arinc429Register.empty(); + + constructor( + private readonly fmgcIndex: number, + private navigation: NavigationProvider, + private flightPlanService: FlightPlanService, + ) {} + + update(deltaTime: number, geometry: Geometry) { + this.updateState(); + + switch (this.state) { + case State.NavDisarmed: + this.updateWhileDisengaged(); + break; + case State.NavArmed: + this.updateWhileArmed(deltaTime, geometry); + break; + case State.NavActive: + this.updateWhileActive(); + } + } + + doesExist(): boolean { + return this.geometry !== null; + } + + getGeometry(): Readonly | null { + return this.geometry; + } + + getIntercept(): Readonly | null { + return this.intercept; + } + + private updateState() { + const isNavModeArmed = this.register + .setFromSimVar(`L:A32NX_FMGC_${this.fmgcIndex}_DISCRETE_WORD_3`) + .bitValueOr(14, false); + const isNavModeActive = this.register + .setFromSimVar(`L:A32NX_FMGC_${this.fmgcIndex}_DISCRETE_WORD_2`) + .bitValueOr(12, false); + + switch (this.state) { + case State.NavDisarmed: + if (isNavModeArmed) { + this.state = State.NavArmed; + this.onNavModeArmed(); + } else if (isNavModeActive) { + this.state = State.NavActive; + this.onNavModeActivated(); + } + break; + case State.NavArmed: + if (isNavModeActive) { + this.state = State.NavActive; + this.onNavModeActivated(); + } else if (!isNavModeArmed) { + this.state = State.NavDisarmed; + this.onNavModeDisarmed(); + } + break; + case State.NavActive: + if (isNavModeArmed) { + this.state = State.NavArmed; + this.onNavModeArmed(); + } else if (!isNavModeActive) { + this.state = State.NavDisarmed; + this.onNavModeDisengaged(); + } + break; + } + } + + private onNavModeActivated() {} + + private onNavModeDisengaged() { + this.resetPath(); + } + + private onNavModeArmed() { + this.resetPath(); + this.enqueueRecomputation(); + } + + private onNavModeDisarmed() { + this.resetPath(); + } + + private updateWhileDisengaged() {} + + private updateWhileArmed(deltaTime: number, activeGeometry: Geometry) { + this.recomputationTimer += deltaTime; + if (this.recomputationTimer < this.RECOMPUTATION_INTERVAL) { + return; + } + + this.recomputeInterceptPath(activeGeometry); + } + + private recomputeInterceptPath(activeGeometry: Geometry) { + this.recomputationTimer = 0; + + if (!this.flightPlanService.has(FlightPlanIndex.Active)) { + this.resetPath(); + return; + } + + const activePlan = this.flightPlanService.active; + const activeLegIndex = activePlan.activeLegIndex; + const activeFlightPlanLeg: FlightPlanElement | null = activePlan.activeLeg; + if (!this.shouldComputeInterceptPath(activeFlightPlanLeg)) { + this.resetPath(); + return; + } + + const ppos = this.navigation.getPpos(); + const trueTrack = this.navigation.getTrueTrack(); + const trueAirspeed = this.navigation.getTrueAirspeed(); + const groundSpeed = this.navigation.getGroundSpeed(); + const activeGeometryLeg = activeGeometry.legs.get(activeLegIndex); + + if ( + ppos === null || + trueTrack === null || + trueAirspeed === null || + groundSpeed === null || + activeGeometryLeg === null + ) { + this.resetPath(); + return; + } + + let intercept: Coordinates | null = null; + try { + intercept = Geo.legIntercept(ppos, trueTrack, activeGeometryLeg); + } catch (e) { + this.resetPath(); + return; + } + + if (intercept === null) { + this.resetPath(); + return; + } + + // Check intercept lies on path + const isInterceptAhead = sideOfPointOnCourseToFix(ppos, trueTrack, intercept) === PointSide.After; + const dtg = activeGeometryLeg.getDistanceToGo(intercept); + const isOnLeg = dtg >= 0 && dtg <= activeGeometryLeg.distance; + + if (!isInterceptAhead || !isOnLeg) { + this.resetPath(); + return; + } + + if (this.geometry === null) { + this.geometry = GeometryFactory.createFromFlightPlan(activePlan, true); + } else { + GeometryFactory.updateFromFlightPlan(this.geometry, activePlan, true); + } + + const distanceToIntercept = distanceTo(ppos, intercept); + + if (this.intercept === null) { + this.intercept = { + location: intercept, + distanceToIntercept, + }; + } else { + this.intercept.location = intercept; + this.intercept.distanceToIntercept = distanceToIntercept; + } + + const leg = new CFLeg( + WaypointFactory.fromLocation('INTCPT', intercept), + trueTrack, + distanceToIntercept, + { + flightPlanLegDefinition: { + type: LegType.CF, + procedureIdent: '', + overfly: false, + }, + turnDirection: TurnDirection.Either, + }, + activeGeometryLeg.segment, + ); + + this.geometry.legs.set(activeLegIndex - 1, leg); + this.geometry.recomputeWithParameters(trueAirspeed, groundSpeed, ppos, trueTrack, activeLegIndex - 1, -1); + } + + private updateWhileActive() {} + + private shouldComputeInterceptPath(leg: FlightPlanElement): leg is FlightPlanLeg { + // Possible leg types we can intercept AF, CF, DF, FA, FC, FD, FM, HA, HF, HM, PI, RF, TF + return ( + leg.isDiscontinuity === false && + !leg.isVx() && + (!leg.isCx() || leg.type === LegType.CF) && + leg.type !== LegType.IF + ); + } + + private resetPath() { + this.geometry = null; + this.intercept = null; + } + + private enqueueRecomputation() { + this.recomputationTimer = this.RECOMPUTATION_INTERVAL; + } +} + +export interface PreNavModeEngagementPath { + doesExist(): boolean; + getGeometry(): Readonly | null; + getIntercept(): Readonly | null; +} diff --git a/fbw-a32nx/src/systems/fmgc/src/navigation/Navigation.ts b/fbw-a32nx/src/systems/fmgc/src/navigation/Navigation.ts index f8ddde3cd86..d371ca0c1d3 100644 --- a/fbw-a32nx/src/systems/fmgc/src/navigation/Navigation.ts +++ b/fbw-a32nx/src/systems/fmgc/src/navigation/Navigation.ts @@ -52,8 +52,11 @@ export class Navigation implements NavigationProvider { ppos: Coordinates = { lat: 0, long: 0 }; + // TODO get from IR groundSpeed: Knots = 0; + private trueTrack: DegreesTrue | null = 0; + private radioHeight: number | null = null; private static readonly radioAltimeterVars = Array.from( @@ -82,6 +85,13 @@ export class Navigation implements NavigationProvider { (_, i) => `L:A32NX_ADIRS_ADR_${i + 1}_COMPUTED_AIRSPEED`, ); + private trueAirspeed: number | null = null; + + private static readonly trueAirspeedVars = Array.from( + { length: 3 }, + (_, i) => `L:A32NX_ADIRS_ADR_${i + 1}_TRUE_AIRSPEED`, + ); + private readonly navaidSelectionManager: NavaidSelectionManager; private readonly landingSystemSelectionManager: LandingSystemSelectionManager; @@ -116,10 +126,13 @@ export class Navigation implements NavigationProvider { this.updateCurrentPerformance(); this.updatePosition(); + this.updateGroundSpeed(); + this.updateTrueTrack(); this.updateRadioHeight(); this.updateBaroAltitude(); this.updatePressureAltitude(); this.updateComputedAirspeed(); + this.updateTrueAirspeed(); NearbyFacilities.getInstance().update(deltaTime); @@ -189,15 +202,27 @@ export class Navigation implements NavigationProvider { this.computedAirspeed = this.getAdiruValue(Navigation.computedAirspeedVars); } + private updateTrueAirspeed(): void { + this.trueAirspeed = this.getAdiruValue(Navigation.trueAirspeedVars); + } + private updatePosition(): void { this.ppos.lat = SimVar.GetSimVarValue('PLANE LATITUDE', 'degree latitude'); this.ppos.long = SimVar.GetSimVarValue('PLANE LONGITUDE', 'degree longitude'); - this.groundSpeed = SimVar.GetSimVarValue('GPS GROUND SPEED', 'knots'); // pass to submodules NearbyFacilities.getInstance().setPpos(this.ppos); } + private updateGroundSpeed(): void { + this.groundSpeed = SimVar.GetSimVarValue('GPS GROUND SPEED', 'knots'); + } + + private updateTrueTrack(): void { + // TODO + this.trueTrack = SimVar.GetSimVarValue('GPS GROUND TRUE TRACK', 'degree'); + } + public getBaroCorrectedAltitude(): number | null { return this.baroAltitude; } @@ -211,6 +236,10 @@ export class Navigation implements NavigationProvider { return this.ppos; } + public getTrueTrack(): number | null { + return this.trueTrack; + } + public getPressureAltitude(): number | null { return this.pressureAltitude; } @@ -219,6 +248,14 @@ export class Navigation implements NavigationProvider { return this.computedAirspeed; } + public getTrueAirspeed(): number | null { + return this.trueAirspeed; + } + + public getGroundSpeed(): number | null { + return this.groundSpeed; + } + public getRadioHeight(): number | null { return this.radioHeight; } diff --git a/fbw-a32nx/src/systems/fmgc/src/navigation/NavigationProvider.ts b/fbw-a32nx/src/systems/fmgc/src/navigation/NavigationProvider.ts index 27481a15a44..b166b5fddae 100644 --- a/fbw-a32nx/src/systems/fmgc/src/navigation/NavigationProvider.ts +++ b/fbw-a32nx/src/systems/fmgc/src/navigation/NavigationProvider.ts @@ -27,6 +27,12 @@ export interface NavigationProvider { */ getPpos(): Coordinates | null; + /** + * Gets the true aircraft track according to the FMS + * @returns true track in degrees or null if invalid + */ + getTrueTrack(): number | null; + /** * Get the pressure altitude * @returns pressure altitude in feet or null if invalid @@ -39,6 +45,18 @@ export interface NavigationProvider { */ getComputedAirspeed(): number | null; + /** + * Get the true airspeed from the ADR + * @returns true air speed in knots or null if invalid + */ + getTrueAirspeed(): number | null; + + /** + * Get the ground speed according to the FMS + * @returns ground speed in knots or null if invalid + */ + getGroundSpeed(): number | null; + /** * Get the radio altimeter height * @returns radio altimeter height in feet or null if invalid diff --git a/fbw-a380x/src/systems/instruments/src/MFD/FMC/FlightManagementComputer.ts b/fbw-a380x/src/systems/instruments/src/MFD/FMC/FlightManagementComputer.ts index 4f77aed2269..7c3b9ce3dd4 100644 --- a/fbw-a380x/src/systems/instruments/src/MFD/FMC/FlightManagementComputer.ts +++ b/fbw-a380x/src/systems/instruments/src/MFD/FMC/FlightManagementComputer.ts @@ -232,6 +232,7 @@ export class FlightManagementComputer implements FmcInterface { this.fmgc, this.flightPlanService, this.efisInterfaces, + this.#navigation, a380EfisRangeSettings, A380AircraftConfig, ); From 6f4d1408eb5e13cf5bb8d307f9802a39498eb1cd Mon Sep 17 00:00:00 2001 From: BBK <22713769+BlueberryKing@users.noreply.github.com> Date: Sun, 29 Dec 2024 20:24:11 +0100 Subject: [PATCH 07/17] Start working on RADIAL IN --- .../CDU/A320_Neo_CDU_DirectToPage.js | 182 +++++++++++++++--- .../FMC/A32NX_FMCMainDisplay.js | 39 ++-- .../src/systems/fmgc/src/efis/EfisSymbols.ts | 4 +- .../src/flightplanning/FlightPlanInterface.ts | 25 +-- .../src/flightplanning/FlightPlanService.ts | 27 +-- .../src/flightplanning/legs/FlightPlanLeg.ts | 71 ++++++- .../flightplanning/plans/BaseFlightPlan.ts | 4 + .../src/flightplanning/plans/FlightPlan.ts | 136 +++++++------ .../flightplanning/rpc/FlightPlanRpcClient.ts | 21 +- .../fmgc/src/flightplanning/types/DirectTo.ts | 16 +- .../src/guidance/PreNavModeEngagementPath.ts | 136 +++++++++---- .../fmgc/src/guidance/lnav/PathVector.ts | 4 +- 12 files changed, 455 insertions(+), 210 deletions(-) diff --git a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js index 5fab4f00f1f..7a5eebdd11e 100644 --- a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js +++ b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js @@ -4,25 +4,15 @@ // TODO this whole thing is thales layout... class CDUDirectToPage { - static ShowPage(mcdu, directWaypoint, wptsListIndex = 0) { + static ShowPage(mcdu, directToObject, wptsListIndex = 0) { mcdu.clearDisplay(); mcdu.page.Current = mcdu.page.DirectToPage; mcdu.returnPageCallback = () => { - CDUDirectToPage.ShowPage(mcdu, directWaypoint, wptsListIndex); + CDUDirectToPage.ShowPage(mcdu, directToObject, wptsListIndex); }; mcdu.activeSystem = 'FMGC'; - let directWaypointCell = ""; - if (directWaypoint) { - directWaypointCell = directWaypoint.ident; - } else if (mcdu.flightPlanService.hasTemporary) { - mcdu.eraseTemporaryFlightPlan(() => { - CDUDirectToPage.ShowPage(mcdu); - }); - return; - } - const waypointsCell = ["", "", "", "", ""]; let iMax = 5; let eraseLabel = ""; @@ -30,6 +20,14 @@ class CDUDirectToPage { let insertLabel = ""; let insertLine = ""; if (mcdu.flightPlanService.hasTemporary) { + // Invalid state, should not be able to call up DIR when a temporary exists + if (!directToObject) { + mcdu.eraseTemporaryFlightPlan(() => { + CDUDirectToPage.ShowPage(mcdu); + }); + return; + } + iMax--; eraseLabel = "\xa0DIR TO[color]amber"; eraseLine = "{ERASE[color]amber"; @@ -59,8 +57,12 @@ class CDUDirectToPage { Fmgc.WaypointEntryUtils.getOrCreateWaypoint(mcdu, value, false).then((w) => { if (w) { mcdu.eraseTemporaryFlightPlan(() => { - mcdu.directToWaypoint(w).then(() => { - CDUDirectToPage.ShowPage(mcdu, w, wptsListIndex); + directToObject = { + nonFlightPlanFix: w + }; + + mcdu.directTo(directToObject).then(() => { + CDUDirectToPage.ShowPage(mcdu, directToObject, wptsListIndex); }).catch(err => { mcdu.setScratchpadMessage(NXFictionalMessages.internalError); console.error(err); @@ -79,18 +81,122 @@ class CDUDirectToPage { }); }; + mcdu.onRightInput[1] = (s, scratchpadCallback) => { + // DIRECT TO + if (!directToObject) { + mcdu.setScratchpadMessage(NXSystemMessages.notAllowed); + scratchpadCallback(); + return; + } + + mcdu.eraseTemporaryFlightPlan(() => { + // TODO delete is really bad + delete directToObject.withAbeam; + delete directToObject.courseIn; + delete directToObject.courseOut; + + mcdu.directTo(directToObject).then(() => { + CDUDirectToPage.ShowPage(mcdu, directToObject, wptsListIndex); + }).catch(err => { + mcdu.setScratchpadMessage(NXFictionalMessages.internalError); + console.error(err); + }); + }); + }; + mcdu.onRightInput[2] = () => { + // ABEAM mcdu.setScratchpadMessage(NXFictionalMessages.notYetImplemented); }; - mcdu.onRightInput[3] = () => { - mcdu.setScratchpadMessage(NXFictionalMessages.notYetImplemented); + mcdu.onRightInput[3] = (s, scratchpadCallback) => { + // RADIAL IN + if (!directToObject) { + mcdu.setScratchpadMessage(NXSystemMessages.notAllowed); + scratchpadCallback(); + return; + } + + // TODO this should allow a true course + if (!/^\d{1,3}/.test(s)) { + mcdu.setScratchpadMessage(NXSystemMessages.formatError); + scratchpadCallback(); + return; + } + + const course = parseInt(s); + if (course > 360) { + mcdu.setScratchpadMessage(NXSystemMessages.entryOutOfRange); + scratchpadCallback(); + return; + } + + mcdu.eraseTemporaryFlightPlan(() => { + // TODO delete is really bad + delete directToObject.withAbeam; + directToObject.courseIn = course % 360; + delete directToObject.courseOut; + + mcdu.directTo(directToObject).then(() => { + CDUDirectToPage.ShowPage(mcdu, directToObject, wptsListIndex); + }).catch(err => { + mcdu.setScratchpadMessage(NXFictionalMessages.internalError); + console.error(err); + }); + }); }; - mcdu.onRightInput[4] = () => { - mcdu.setScratchpadMessage(NXFictionalMessages.notYetImplemented); + + mcdu.onRightInput[4] = (s, scratchpadCallback) => { + // RADIAL OUT + if (!directToObject) { + mcdu.setScratchpadMessage(NXSystemMessages.notAllowed); + scratchpadCallback(); + return; + } + + // TODO this should allow a true course + if (!/^\d{1,3}/.test(s)) { + mcdu.setScratchpadMessage(NXSystemMessages.formatError); + scratchpadCallback(); + return; + } + + const course = parseInt(s); + if (course > 360) { + mcdu.setScratchpadMessage(NXSystemMessages.entryOutOfRange); + scratchpadCallback(); + return; + } + + mcdu.eraseTemporaryFlightPlan(() => { + delete directToObject.withAbeam; + delete directToObject.courseIn; + directToObject.courseOut = course % 360; + + mcdu.directTo(directToObject).then(() => { + CDUDirectToPage.ShowPage(mcdu, directToObject, wptsListIndex); + }).catch(err => { + mcdu.setScratchpadMessage(NXFictionalMessages.internalError); + console.error(err); + }); + }); }; const plan = mcdu.flightPlanService.active; + let directWaypointCell = ""; + if (directToObject) { + if (directToObject.flightPlanLegIndex !== undefined) { + // Don't just fetch the leg at the index, since the plan might've sequenced after this page was called up + const directToLeg = plan.maybeElementAt(directToObject.flightPlanLegIndex); + + if (directToLeg && directToLeg.isDiscontinuity === false) { + directWaypointCell = directToLeg.ident; + } + } else if (directToObject.nonFlightPlanFix !== undefined) { + directWaypointCell = directToObject.nonFlightPlanFix.ident; + } + } + let i = 0; let cellIter = 0; wptsListIndex = Math.max(wptsListIndex, mcdu.flightPlanService.active.activeLegIndex); @@ -116,8 +222,12 @@ class CDUDirectToPage { if (waypointsCell[cellIter]) { mcdu.onLeftInput[cellIter + 1] = () => { mcdu.eraseTemporaryFlightPlan(() => { - mcdu.directToLeg(legIndex).then(() => { - CDUDirectToPage.ShowPage(mcdu, leg.terminationWaypoint(), wptsListIndex); + directToObject = { + flightPlanLegIndex: legIndex + }; + + mcdu.directTo(directToObject).then(() => { + CDUDirectToPage.ShowPage(mcdu, directToObject, wptsListIndex); }).catch(err => { mcdu.setScratchpadMessage(NXFictionalMessages.internalError); console.error(err); @@ -139,30 +249,50 @@ class CDUDirectToPage { if (wptsListIndex < totalWaypointsCount - 5) { mcdu.onUp = () => { wptsListIndex++; - CDUDirectToPage.ShowPage(mcdu, directWaypoint, wptsListIndex); + CDUDirectToPage.ShowPage(mcdu, directToObject, wptsListIndex); }; up = true; } if (wptsListIndex > 0) { mcdu.onDown = () => { wptsListIndex--; - CDUDirectToPage.ShowPage(mcdu, directWaypoint, wptsListIndex); + CDUDirectToPage.ShowPage(mcdu, directToObject, wptsListIndex); }; down = true; } + + const isWithAbeamSelected = directToObject && directToObject.withAbeam; + const canSelectWithAbeam = directToObject && isWithAbeamSelected; + + // TODO handle automatic course calculation + const isRadialInSelected = directToObject && directToObject.courseIn; + const canSelectRadialIn = directToObject && directToObject.courseIn; + const radialIn = isRadialInSelected + ? `${directToObject.courseIn.toFixed(0).padStart(3, '0')}°` + : "{small}[ ]°{end}"; + + const isRadialOutSelected = directToObject && directToObject.courseOut; + const canSelectRadialOut = directToObject && directToObject.courseOut; + const radialOut = isRadialOutSelected + ? `${directToObject.courseOut.toFixed(0).padStart(3, '0')}°` + : "{small}[ ]°{end}"; + + const isDirectToSelected = directToObject && !isWithAbeamSelected && !isRadialInSelected && !isRadialOutSelected; + const canSelectDirectTo = directToObject && !isDirectToSelected; + mcdu.setArrows(up, down, false ,false); mcdu.setTemplate([ ["DIR TO"], ["\xa0WAYPOINT", "DIST\xa0", "UTC"], ["*[" + (directWaypointCell ? directWaypointCell : "\xa0\xa0\xa0\xa0\xa0") + "][color]cyan", "---", "----"], ["\xa0F-PLN WPTS"], - [waypointsCell[0], "DIRECT TO[color]cyan"], + [waypointsCell[0], `DIRECT TO ${canSelectDirectTo ? "}" : " "}[color]${isDirectToSelected ? "yellow" : "cyan"}`], ["", "WITH\xa0"], - [waypointsCell[1], "ABEAM PTS[color]cyan"], + [waypointsCell[1], `ABEAM PTS ${canSelectWithAbeam ? "}" : " "}[color]${isWithAbeamSelected ? "yellow" : "cyan"}[color]inop`], ["", "RADIAL IN\xa0"], - [waypointsCell[2], "[ ]°[color]cyan"], + [waypointsCell[2], `${radialIn} ${canSelectRadialIn ? "}" : " "}[color]${isRadialInSelected ? "yellow" : "cyan"}`], ["", "RADIAL OUT\xa0"], - [waypointsCell[3], "[ ]°[color]cyan"], + [waypointsCell[3], `${radialOut} ${canSelectRadialOut ? "}" : " "}[color]${isRadialOutSelected ? "yellow" : "cyan"}`], [eraseLabel, insertLabel], [eraseLine ? eraseLine : waypointsCell[4], insertLine] ]); diff --git a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/FMC/A32NX_FMCMainDisplay.js b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/FMC/A32NX_FMCMainDisplay.js index 53476dddb0f..662afc3459e 100644 --- a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/FMC/A32NX_FMCMainDisplay.js +++ b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/FMC/A32NX_FMCMainDisplay.js @@ -215,8 +215,15 @@ class FMCMainDisplay extends BaseAirliners { this.dataManager = new Fmgc.DataManager(this); this.efisInterfaces = { L: new Fmgc.EfisInterface('L', this.currFlightPlanService), R: new Fmgc.EfisInterface('R', this.currFlightPlanService) }; - this.guidanceController = new Fmgc.GuidanceController(this.bus, this, this.currFlightPlanService, this.efisInterfaces, Fmgc.a320EfisRangeSettings, Fmgc.A320AircraftConfig); this.navigation = new Fmgc.Navigation(this.bus, this.currFlightPlanService); + this.guidanceController = new Fmgc.GuidanceController(this.bus, + this, + this.currFlightPlanService, + this.efisInterfaces, + this.navigation, + Fmgc.a320EfisRangeSettings, + Fmgc.A320AircraftConfig + ); this.efisSymbols = new Fmgc.EfisSymbols( this.bus, this.guidanceController, @@ -5061,32 +5068,10 @@ class FMCMainDisplay extends BaseAirliners { } /** - * Modifies the active flight plan to go direct to a specific waypoint, not necessarily in the flight plan - * @param {import('msfs-navdata').Waypoint} waypoint - */ - async directToWaypoint(waypoint) { - // FIXME fm pos - const adirLat = ADIRS.getLatitude(); - const adirLong = ADIRS.getLongitude(); - const trueTrack = ADIRS.getTrueTrack(); - - if (!adirLat.isNormalOperation() || !adirLong.isNormalOperation() || !trueTrack.isNormalOperation()) { - return; - } - - const ppos = { - lat: adirLat.value, - long: adirLong.value, - }; - - await this.flightPlanService.directToWaypoint(ppos, trueTrack.value, waypoint); - } - - /** - * Modifies the active flight plan to go direct to a specific leg - * @param {number} legIndex index of leg to go direct to + * Modifies the active flight plan to perform a DIR to operation + * @param {import('../../../../../../../../../systems/fmgc/src/flightplanning/types/DirectTo').DirectTo} directTo */ - async directToLeg(legIndex) { + async directTo(directTo) { // FIXME fm pos const adirLat = ADIRS.getLatitude(); const adirLong = ADIRS.getLongitude(); @@ -5101,7 +5086,7 @@ class FMCMainDisplay extends BaseAirliners { long: adirLong.value, }; - await this.flightPlanService.directToLeg(ppos, trueTrack.value, legIndex); + await this.flightPlanService.directTo(ppos, trueTrack.value, directTo); } /** diff --git a/fbw-a32nx/src/systems/fmgc/src/efis/EfisSymbols.ts b/fbw-a32nx/src/systems/fmgc/src/efis/EfisSymbols.ts index e5bbe25462b..69c9485366c 100644 --- a/fbw-a32nx/src/systems/fmgc/src/efis/EfisSymbols.ts +++ b/fbw-a32nx/src/systems/fmgc/src/efis/EfisSymbols.ts @@ -193,7 +193,9 @@ export class EfisSymbols { const intercept = this.guidanceController.getPreNavModeEngagementPathIntercept(); const interceptChanged = (this.lastIntercept === null) !== (intercept === null) || - distanceTo(this.lastIntercept?.location, intercept?.location) > 2; + (this.lastIntercept !== null && + intercept === null && + distanceTo(this.lastIntercept?.location, intercept?.location) > 1); this.lastIntercept = intercept; const hasSuitableRunway = (airport: Airport): boolean => diff --git a/fbw-a32nx/src/systems/fmgc/src/flightplanning/FlightPlanInterface.ts b/fbw-a32nx/src/systems/fmgc/src/flightplanning/FlightPlanInterface.ts index 33767f018e5..ea2f6e87d83 100644 --- a/fbw-a32nx/src/systems/fmgc/src/flightplanning/FlightPlanInterface.ts +++ b/fbw-a32nx/src/systems/fmgc/src/flightplanning/FlightPlanInterface.ts @@ -13,6 +13,7 @@ import { AltitudeConstraint } from '@fmgc/flightplanning/data/constraint'; import { ReadonlyFlightPlan } from '@fmgc/flightplanning/plans/ReadonlyFlightPlan'; import { FlightPlanPerformanceData } from '@fmgc/flightplanning/plans/performance/FlightPlanPerformanceData'; import { FlightPlanLeg } from '@fmgc/flightplanning/legs/FlightPlanLeg'; +import { DirectTo } from '@fmgc/flightplanning/types/DirectTo'; /** * Interface for querying, modifying and creating flight plans. @@ -217,22 +218,14 @@ export interface FlightPlanInterface

; - directToLeg( - ppos: Coordinates, - trueTrack: Degrees, - targetLegIndex: number, - withAbeam: boolean, - planIndex: number, - ): Promise; - - // TODO do not pass in fix object (rpc) - directToWaypoint( - ppos: Coordinates, - trueTrack: Degrees, - waypoint: Fix, - withAbeam: boolean, - planIndex: number, - ): Promise; + /** + * DIR TO revision. Directs to a waypoint or leg. + * @param ppos present position of the aircraft + * @param trueTrack the true track of the aircraft + * @param directTo the direct to data + * @param planIndex which flight plan to make the change on + */ + directTo(ppos: Coordinates, trueTrack: Degrees, directTo: DirectTo, planIndex: number): Promise; /** * HOLD AT revision. Inserts or edits a manual hold parented to the leg. diff --git a/fbw-a32nx/src/systems/fmgc/src/flightplanning/FlightPlanService.ts b/fbw-a32nx/src/systems/fmgc/src/flightplanning/FlightPlanService.ts index aa950d59366..01edd10267e 100644 --- a/fbw-a32nx/src/systems/fmgc/src/flightplanning/FlightPlanService.ts +++ b/fbw-a32nx/src/systems/fmgc/src/flightplanning/FlightPlanService.ts @@ -17,6 +17,7 @@ import { FlightPlanInterface } from '@fmgc/flightplanning/FlightPlanInterface'; import { AltitudeConstraint } from '@fmgc/flightplanning/data/constraint'; import { CopyOptions } from '@fmgc/flightplanning/plans/CloningOptions'; import { FlightPlanPerformanceData } from '@fmgc/flightplanning/plans/performance/FlightPlanPerformanceData'; +import { DirectTo } from '@fmgc/flightplanning/types/DirectTo'; export class FlightPlanService

implements FlightPlanInterface

@@ -398,32 +399,12 @@ export class FlightPlanService

= end) { + return; + } + const [startSegment, indexInStartSegment] = this.segmentPositionForIndex(start); const [endSegment, indexInEndSegment] = this.segmentPositionForIndex(end - 1); diff --git a/fbw-a32nx/src/systems/fmgc/src/flightplanning/plans/FlightPlan.ts b/fbw-a32nx/src/systems/fmgc/src/flightplanning/plans/FlightPlan.ts index bd4bd9b7cc0..bf3d6190b13 100644 --- a/fbw-a32nx/src/systems/fmgc/src/flightplanning/plans/FlightPlan.ts +++ b/fbw-a32nx/src/systems/fmgc/src/flightplanning/plans/FlightPlan.ts @@ -8,7 +8,7 @@ import { AlternateFlightPlan } from '@fmgc/flightplanning/plans/AlternateFlightP import { EventBus, MagVar } from '@microsoft/msfs-sdk'; import { FixInfoData, FixInfoEntry } from '@fmgc/flightplanning/plans/FixInfo'; import { loadAllDepartures, loadAllRunways } from '@fmgc/flightplanning/DataLoading'; -import { Coordinates, Degrees } from 'msfs-geo'; +import { Coordinates, Degrees, placeBearingDistance } from 'msfs-geo'; import { FlightPlanLeg, FlightPlanLegFlags } from '@fmgc/flightplanning/legs/FlightPlanLeg'; import { SegmentClass } from '@fmgc/flightplanning/segments/SegmentClass'; import { FlightArea } from '@fmgc/navigation/FlightArea'; @@ -21,6 +21,7 @@ import { } from '@fmgc/flightplanning/plans/performance/FlightPlanPerformanceData'; import { BaseFlightPlan, FlightPlanQueuedOperation, SerializedFlightPlan } from './BaseFlightPlan'; import { FlightPlanIndex } from '@fmgc/flightplanning/FlightPlanManager'; +import { DirectTo, isDirectWithCourseIn, isDirectWithCourseOut } from '@fmgc/flightplanning/types/DirectTo'; export class FlightPlan

extends BaseFlightPlan

{ static empty

( @@ -144,82 +145,105 @@ export class FlightPlan

= this.firstMissedApproachLegIndex) { - throw new Error('[FPM] Cannot direct to a leg in the missed approach segment'); - } + directTo(ppos: Coordinates, trueTrack: Degrees, directTo: DirectTo) { + let targetLeg: FlightPlanLeg = undefined; + let terminationWaypoint: Fix = undefined; + if (directTo.flightPlanLegIndex !== undefined) { + if (directTo.flightPlanLegIndex >= this.firstMissedApproachLegIndex) { + throw new Error('[FPM] Cannot direct to a leg in the missed approach segment'); + } - const targetLeg = this.legElementAt(targetLegIndex); - if (!targetLeg.isXF()) { - throw new Error('[FPM] Cannot direct to a non-XF leg'); - } + targetLeg = this.legElementAt(directTo.flightPlanLegIndex); + if (!targetLeg.isXF()) { + throw new Error('[FPM] Cannot direct to a non-XF leg'); + } - const magVar = MagVar.get(ppos.lat, ppos.long); - const magneticCourse = A32NX_Util.trueToMagnetic(trueTrack, magVar); + terminationWaypoint = targetLeg.terminationWaypoint(); + } else if (directTo.nonFlightPlanFix !== undefined) { + terminationWaypoint = directTo.nonFlightPlanFix; - const turningPoint = FlightPlanLeg.turningPoint(this.enrouteSegment, ppos, magneticCourse); - const turnEnd = FlightPlanLeg.directToTurnEnd(this.enrouteSegment, targetLeg.terminationWaypoint()); + const existingLegIndex = this.allLegs.findIndex( + (it) => it.isDiscontinuity === false && it.terminatesWithWaypoint(terminationWaypoint), + ); - turningPoint.flags |= FlightPlanLegFlags.DirectToTurningPoint; - if (this.index === FlightPlanIndex.Temporary) { - turningPoint.flags |= FlightPlanLegFlags.PendingDirectToTurningPoint; + if (existingLegIndex !== -1 && existingLegIndex < this.firstMissedApproachLegIndex) { + targetLeg = this.legElementAt(existingLegIndex); + } } - turnEnd.withDefinitionFrom(targetLeg).withPilotEnteredDataFrom(targetLeg); - // If we don't do this, the turn end will have the termination waypoint's ident which may not be the leg ident (for runway legs for example) - turnEnd.ident = targetLeg.ident; - this.redistributeLegsAt(0); - this.redistributeLegsAt(targetLegIndex); + const isToNonFlightPlanWaypoint = targetLeg === undefined; - const indexInEnrouteSegment = this.enrouteSegment.allLegs.findIndex((it) => it === targetLeg); - if (indexInEnrouteSegment === -1) { - throw new Error('[FPM] Target leg of a direct to not found in enroute segment after leg redistribution!'); - } + let turningPoint: FlightPlanLeg = undefined; + let turnEnd: FlightPlanLeg = undefined; - this.enrouteSegment.allLegs.splice(0, indexInEnrouteSegment + 1, turningPoint, turnEnd); - this.incrementVersion(); + if (isDirectWithCourseIn(directTo)) { + const radialMagVar = A32NX_Util.getRadialMagVar(terminationWaypoint); + const trueOutboundCourse = A32NX_Util.magneticToTrue(directTo.courseIn, radialMagVar); + const location = placeBearingDistance( + terminationWaypoint.location, + trueOutboundCourse, + IN_BND_OUT_BND_DISTANCE_NM, + ); + const magneticInboundCourse = MathUtils.normalise360(directTo.courseIn + 180); + + turningPoint = FlightPlanLeg.turningPoint(this.enrouteSegment, 'IN-BND', location, magneticInboundCourse); + turnEnd = FlightPlanLeg.radialInLeg(this.enrouteSegment, terminationWaypoint, magneticInboundCourse); + turningPoint.flags |= FlightPlanLegFlags.DirectToInBound; + } else if (isDirectWithCourseOut(directTo)) { + const location = placeBearingDistance( + terminationWaypoint.location, + directTo.courseOut, + IN_BND_OUT_BND_DISTANCE_NM, + ); + turningPoint = FlightPlanLeg.turningPoint(this.enrouteSegment, 'OUT-BND', location, directTo.courseOut); + turningPoint.flags |= FlightPlanLegFlags.DirectToOutBound; + turnEnd = FlightPlanLeg.radialOutLeg(this.enrouteSegment, terminationWaypoint, directTo.courseOut); + } else { + const magVar = MagVar.get(ppos.lat, ppos.long); + const aircraftMagneticCourse = A32NX_Util.trueToMagnetic(trueTrack, magVar); - const turnEndLegIndexInPlan = this.allLegs.findIndex((it) => it === turnEnd); + turningPoint = FlightPlanLeg.turningPoint(this.enrouteSegment, 'T-P', ppos, aircraftMagneticCourse); + turningPoint.flags |= FlightPlanLegFlags.DirectToTurningPoint; + turnEnd = FlightPlanLeg.directToTurnEnd(this.enrouteSegment, terminationWaypoint); - this.setActiveLegIndex(turnEndLegIndexInPlan); - } - - directToWaypoint(ppos: Coordinates, trueTrack: Degrees, waypoint: Fix, withAbeam = false) { - // TODO withAbeam - // TODO handle direct-to into the alternate (make alternate active...? - const existingLegIndex = this.allLegs.findIndex( - (it) => it.isDiscontinuity === false && it.terminatesWithWaypoint(waypoint), - ); - if (existingLegIndex !== -1 && existingLegIndex < this.firstMissedApproachLegIndex) { - this.directToLeg(ppos, trueTrack, existingLegIndex, withAbeam); - return; + if (this.index === FlightPlanIndex.Temporary) { + turningPoint.flags |= FlightPlanLegFlags.PendingDirectToTurningPoint; + } } - const magVar = MagVar.get(ppos.lat, ppos.long); - const magneticCourse = A32NX_Util.trueToMagnetic(trueTrack, magVar); - - const turningPoint = FlightPlanLeg.turningPoint(this.enrouteSegment, ppos, magneticCourse); - const turnEnd = FlightPlanLeg.directToTurnEnd(this.enrouteSegment, waypoint); - - turningPoint.flags |= FlightPlanLegFlags.DirectToTurningPoint; - if (this.index === FlightPlanIndex.Temporary) { - turningPoint.flags |= FlightPlanLegFlags.PendingDirectToTurningPoint; + if (!isToNonFlightPlanWaypoint) { + turnEnd.withDefinitionFrom(targetLeg).withPilotEnteredDataFrom(targetLeg); + // If we don't do this, the turn end will have the termination waypoint's ident which may not be the leg ident (for runway legs for example) + turnEnd.ident = targetLeg.ident; } - // Move all legs before active one to the enroute segment - let indexInEnrouteSegment = 0; this.redistributeLegsAt(0); - if (this.activeLegIndex >= 1) { + + let indexInEnrouteSegment = 0; + if (!isToNonFlightPlanWaypoint) { + this.redistributeLegsAt(directTo.flightPlanLegIndex); + indexInEnrouteSegment = this.enrouteSegment.allLegs.findIndex((it) => it === targetLeg); + } else if (this.activeLegIndex >= 1) { this.redistributeLegsAt(this.activeLegIndex); indexInEnrouteSegment = this.enrouteSegment.allLegs.findIndex((it) => it === this.activeLeg); } - // Remove legs before active on from enroute - this.enrouteSegment.allLegs.splice(0, indexInEnrouteSegment, turningPoint, turnEnd); + if (indexInEnrouteSegment === -1) { + throw new Error('[FPM] Target leg of a direct to not found in enroute segment after leg redistribution!'); + } + + this.enrouteSegment.allLegs.splice(0, indexInEnrouteSegment + 1, turningPoint, turnEnd); this.incrementVersion(); + // In case of radial out, insert a discontinuity after the turn end + // In case of direct to random waypoint, insert a discontinuity after the turn end + const shouldInsertDiscontinuityAfterTurnEnd = isDirectWithCourseOut(directTo) || isToNonFlightPlanWaypoint; + const turnEndLegIndexInPlan = this.allLegs.findIndex((it) => it === turnEnd); - if (this.maybeElementAt(turnEndLegIndexInPlan + 1)?.isDiscontinuity === false) { + if ( + shouldInsertDiscontinuityAfterTurnEnd && + this.maybeElementAt(turnEndLegIndexInPlan + 1)?.isDiscontinuity === false + ) { this.enrouteSegment.allLegs.splice(2, 0, { isDiscontinuity: true }); this.syncSegmentLegsChange(this.enrouteSegment); this.incrementVersion(); @@ -634,3 +658,5 @@ export class FlightPlan

= { [k in keyof T as T[k] extends (...args: any) => Promise ? k : never]: T[k] extends ( @@ -246,24 +247,8 @@ export class FlightPlanRpcClient

implements return this.callFunctionViaRpc('startAirwayEntry', at, planIndex, alternate); } - directToLeg( - ppos: Coordinates, - trueTrack: Degrees, - targetLegIndex: number, - withAbeam: boolean, - planIndex: number, - ): Promise { - return this.callFunctionViaRpc('directToLeg', ppos, trueTrack, targetLegIndex, withAbeam, planIndex); - } - - directToWaypoint( - ppos: Coordinates, - trueTrack: Degrees, - waypoint: Fix, - withAbeam: boolean, - planIndex: number, - ): Promise { - return this.callFunctionViaRpc('directToWaypoint', ppos, trueTrack, waypoint, withAbeam, planIndex); + directTo(ppos: Coordinates, trueTrack: Degrees, directTo: DirectTo, planIndex: number): Promise { + return this.callFunctionViaRpc('directTo', ppos, trueTrack, directTo, planIndex); } addOrEditManualHold( diff --git a/fbw-a32nx/src/systems/fmgc/src/flightplanning/types/DirectTo.ts b/fbw-a32nx/src/systems/fmgc/src/flightplanning/types/DirectTo.ts index 73417517a52..5305f18e381 100644 --- a/fbw-a32nx/src/systems/fmgc/src/flightplanning/types/DirectTo.ts +++ b/fbw-a32nx/src/systems/fmgc/src/flightplanning/types/DirectTo.ts @@ -3,11 +3,11 @@ // // SPDX-License-Identifier: GPL-3.0 -import { Waypoint } from '@flybywiresim/fbw-sdk'; +import { Fix } from '@flybywiresim/fbw-sdk'; interface FlightPlanDirectTo { flightPlanLegIndex?: number; - nonFlightPlanWaypoint?: Waypoint; + nonFlightPlanFix?: Fix; } type CourseInFlightPlanDirectTo = FlightPlanDirectTo & { @@ -27,3 +27,15 @@ export type DirectTo = | CourseInFlightPlanDirectTo | CourseOutFlightPlanDirectTo | WithAbeamFlightPlanDirectTo; + +export function isDirectWithAbeam(directTo: DirectTo): directTo is WithAbeamFlightPlanDirectTo { + return 'withAbeam' in directTo && directTo.withAbeam; +} + +export function isDirectWithCourseIn(directTo: DirectTo): directTo is CourseInFlightPlanDirectTo { + return 'courseIn' in directTo && Number.isFinite(directTo.courseIn); +} + +export function isDirectWithCourseOut(directTo: DirectTo): directTo is CourseOutFlightPlanDirectTo { + return 'courseOut' in directTo && Number.isFinite(directTo.courseOut); +} diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/PreNavModeEngagementPath.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/PreNavModeEngagementPath.ts index 37d7a38f8ee..66f7a64f795 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/PreNavModeEngagementPath.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/PreNavModeEngagementPath.ts @@ -1,4 +1,4 @@ -import { Arinc429Register, LegType, TurnDirection } from '@flybywiresim/fbw-sdk'; +import { Arinc429Register, LegType, MathUtils, TurnDirection } from '@flybywiresim/fbw-sdk'; import { FlightPlanElement, FlightPlanLeg } from '@fmgc/flightplanning/legs/FlightPlanLeg'; import { NavigationProvider } from '@fmgc/navigation/NavigationProvider'; import { Geo } from '@fmgc/utils/Geo'; @@ -6,10 +6,14 @@ import { FlightPlanService } from '@fmgc/flightplanning/FlightPlanService'; import { FlightPlanIndex } from '@fmgc/flightplanning/FlightPlanManager'; import { Geometry } from '@fmgc/guidance/Geometry'; import { PointSide, sideOfPointOnCourseToFix } from '@fmgc/guidance/lnav/CommonGeometry'; -import { CFLeg } from '@fmgc/guidance/lnav/legs/CF'; import { WaypointFactory } from '@fmgc/flightplanning/waypoints/WaypointFactory'; import { Coordinates, distanceTo } from 'msfs-geo'; import { GeometryFactory } from '@fmgc/guidance/geometry/GeometryFactory'; +import { CILeg } from '@fmgc/guidance/lnav/legs/CI'; +import { IFLeg } from '@fmgc/guidance/lnav/legs/IF'; +import { TransitionPicker } from '@fmgc/guidance/lnav/TransitionPicker'; +import { LegMetadata } from '@fmgc/guidance/lnav/legs'; +import { Leg } from '@fmgc/guidance/lnav/legs/Leg'; enum State { NavDisarmed, @@ -35,11 +39,26 @@ export class PreNavModeEngagementPathCalculation implements PreNavModeEngagement private register: Arinc429Register = Arinc429Register.empty(); + private ppos: Coordinates | null = null; + + private cachedIfLeg: IFLeg | null = null; + + private static readonly ciLegMetadata: Readonly = { + flightPlanLegDefinition: { + type: LegType.CI, + procedureIdent: '', + overfly: false, + }, + turnDirection: TurnDirection.Either, + }; + constructor( private readonly fmgcIndex: number, private navigation: NavigationProvider, private flightPlanService: FlightPlanService, - ) {} + ) { + this.ppos = navigation.getPpos(); + } update(deltaTime: number, geometry: Geometry) { this.updateState(); @@ -149,53 +168,75 @@ export class PreNavModeEngagementPathCalculation implements PreNavModeEngagement return; } - const ppos = this.navigation.getPpos(); const trueTrack = this.navigation.getTrueTrack(); const trueAirspeed = this.navigation.getTrueAirspeed(); const groundSpeed = this.navigation.getGroundSpeed(); const activeGeometryLeg = activeGeometry.legs.get(activeLegIndex); if ( - ppos === null || + this.ppos === null || trueTrack === null || trueAirspeed === null || groundSpeed === null || - activeGeometryLeg === null + !Number.isFinite(activeGeometryLeg?.outboundCourse) ) { this.resetPath(); return; } + const interceptAngle = Math.min( + MathUtils.normalise360(trueTrack - activeGeometryLeg.outboundCourse), + MathUtils.normalise360(activeGeometryLeg.outboundCourse - trueTrack), + ); + + if (interceptAngle > 120) { + this.resetPath(); + return; + } + + if (this.tryUpdateIntercept(trueTrack, activeGeometryLeg)) { + this.resetPath(); + return; + } + + if (this.geometry === null) { + this.geometry = GeometryFactory.createFromFlightPlan(activePlan, true); + } else { + GeometryFactory.updateFromFlightPlan(this.geometry, activePlan, true); + } + + const ifLeg = this.updateIfLeg(activeGeometryLeg); + const ciLeg = this.updateCiLeg(trueTrack, activeGeometryLeg); + + this.geometry.legs.set(activeLegIndex - 2, ifLeg); + this.geometry.legs.set(activeLegIndex - 1, ciLeg); + this.geometry.transitions.set(activeLegIndex - 1, TransitionPicker.forLegs(ciLeg, activeGeometryLeg)); + this.geometry.recomputeWithParameters(trueAirspeed, groundSpeed, this.ppos, trueTrack, activeLegIndex - 1, -1); + } + + private tryUpdateIntercept(trueTrack: number, activeGeometryLeg: Leg): boolean { let intercept: Coordinates | null = null; try { - intercept = Geo.legIntercept(ppos, trueTrack, activeGeometryLeg); + intercept = Geo.legIntercept(this.ppos, trueTrack, activeGeometryLeg) ?? null; } catch (e) { this.resetPath(); return; } if (intercept === null) { - this.resetPath(); - return; + return false; } // Check intercept lies on path - const isInterceptAhead = sideOfPointOnCourseToFix(ppos, trueTrack, intercept) === PointSide.After; + const isInterceptAhead = sideOfPointOnCourseToFix(this.ppos, trueTrack, intercept) === PointSide.After; const dtg = activeGeometryLeg.getDistanceToGo(intercept); const isOnLeg = dtg >= 0 && dtg <= activeGeometryLeg.distance; if (!isInterceptAhead || !isOnLeg) { - this.resetPath(); - return; - } - - if (this.geometry === null) { - this.geometry = GeometryFactory.createFromFlightPlan(activePlan, true); - } else { - GeometryFactory.updateFromFlightPlan(this.geometry, activePlan, true); + return false; } - const distanceToIntercept = distanceTo(ppos, intercept); + const distanceToIntercept = distanceTo(this.ppos, intercept); if (this.intercept === null) { this.intercept = { @@ -206,32 +247,55 @@ export class PreNavModeEngagementPathCalculation implements PreNavModeEngagement this.intercept.location = intercept; this.intercept.distanceToIntercept = distanceToIntercept; } + } - const leg = new CFLeg( - WaypointFactory.fromLocation('INTCPT', intercept), - trueTrack, - distanceToIntercept, - { - flightPlanLegDefinition: { - type: LegType.CF, - procedureIdent: '', - overfly: false, + private updateIfLeg(activeGeometryLeg: Leg): IFLeg { + if (this.cachedIfLeg === null) { + this.cachedIfLeg = new IFLeg( + WaypointFactory.fromLocation('PPOS', this.ppos), + { + flightPlanLegDefinition: { + type: LegType.IF, + procedureIdent: '', + overfly: false, + }, + turnDirection: TurnDirection.Either, }, - turnDirection: TurnDirection.Either, - }, + activeGeometryLeg.segment, + ); + } else { + this.cachedIfLeg.segment = activeGeometryLeg.segment; + } + + return this.cachedIfLeg; + } + + private updateCiLeg(trueTrack: number, activeGeometryLeg: Leg): CILeg { + return new CILeg( + trueTrack, + activeGeometryLeg, + PreNavModeEngagementPathCalculation.ciLegMetadata, activeGeometryLeg.segment, ); - - this.geometry.legs.set(activeLegIndex - 1, leg); - this.geometry.recomputeWithParameters(trueAirspeed, groundSpeed, ppos, trueTrack, activeLegIndex - 1, -1); } - private updateWhileActive() {} + private updateWhileActive() { + if (!this.doesExist()) { + return; + } + + const crossTrackError = SimVar.GetSimVarValue('L:A32NX_FG_CROSS_TRACK_ERROR', 'nautical miles'); + const trackAngleError = SimVar.GetSimVarValue('L:A32NX_FG_TRACK_ANGLE_ERROR', 'Degrees'); + + if (Math.abs(crossTrackError) < 0.2 && Math.abs(trackAngleError) < 20) { + this.resetPath(); + } + } - private shouldComputeInterceptPath(leg: FlightPlanElement): leg is FlightPlanLeg { + private shouldComputeInterceptPath(leg?: FlightPlanElement): leg is FlightPlanLeg { // Possible leg types we can intercept AF, CF, DF, FA, FC, FD, FM, HA, HF, HM, PI, RF, TF return ( - leg.isDiscontinuity === false && + leg?.isDiscontinuity === false && !leg.isVx() && (!leg.isCx() || leg.type === LegType.CF) && leg.type !== LegType.IF diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/PathVector.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/PathVector.ts index baf32b8d296..77b6130401f 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/PathVector.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/PathVector.ts @@ -4,7 +4,7 @@ // SPDX-License-Identifier: GPL-3.0 import { Coordinates } from '@fmgc/flightplanning/data/geo'; -import { arcLength, pointOnArc, pointOnCourseToFix } from '@fmgc/guidance/lnav/CommonGeometry'; +import { arcLength, getIntermediatePoint, pointOnArc, pointOnCourseToFix } from '@fmgc/guidance/lnav/CommonGeometry'; import { bearingTo, distanceTo } from 'msfs-geo'; export enum PathVectorType { @@ -73,7 +73,7 @@ export function pathVectorValid(vector: PathVector) { export function pathVectorPoint(vector: PathVector, distanceFromEnd: NauticalMiles): Coordinates | undefined { if (vector.type === PathVectorType.Line) { - return pointOnCourseToFix(distanceFromEnd, bearingTo(vector.startPoint, vector.endPoint), vector.endPoint); + return getIntermediatePoint(vector.endPoint, vector.startPoint, distanceFromEnd / pathVectorLength(vector)); } if (vector.type === PathVectorType.Arc) { From 7ef35698d6480930d3158812a10169f59de0c881 Mon Sep 17 00:00:00 2001 From: BBK <22713769+BlueberryKing@users.noreply.github.com> Date: Sun, 29 Dec 2024 22:12:42 +0100 Subject: [PATCH 08/17] Implement NO NAV INTERCEPT message --- .../components/fms-messages/FmsMessages.ts | 2 + .../components/fms-messages/NoNavIntercept.ts | 32 +++++++++++++++ .../src/systems/fmgc/src/efis/EfisVectors.ts | 6 +-- .../fmgc/src/guidance/GuidanceController.ts | 4 ++ .../src/guidance/PreNavModeEngagementPath.ts | 39 ++++++++++++++----- .../instruments/src/ND/shared/TrackLine.tsx | 21 +++++----- .../src/systems/shared/src/FmMessages.ts | 6 +++ 7 files changed, 88 insertions(+), 22 deletions(-) create mode 100644 fbw-a32nx/src/systems/fmgc/src/components/fms-messages/NoNavIntercept.ts diff --git a/fbw-a32nx/src/systems/fmgc/src/components/fms-messages/FmsMessages.ts b/fbw-a32nx/src/systems/fmgc/src/components/fms-messages/FmsMessages.ts index 4c8941af198..029fc3ee627 100644 --- a/fbw-a32nx/src/systems/fmgc/src/components/fms-messages/FmsMessages.ts +++ b/fbw-a32nx/src/systems/fmgc/src/components/fms-messages/FmsMessages.ts @@ -22,6 +22,7 @@ import { FmgcComponent } from '../FmgcComponent'; import { GpsPrimary } from './GpsPrimary'; import { GpsPrimaryLost } from './GpsPrimaryLost'; import { MapPartlyDisplayedLeft, MapPartlyDisplayedRight } from './MapPartlyDisplayed'; +import { NoNavIntercept } from '@fmgc/components/fms-messages/NoNavIntercept'; /** * This class manages Type II messages sent from the FMGC. @@ -63,6 +64,7 @@ export class FmsMessages implements FmgcComponent { new TdReached(), new StepAhead(), new StepDeleted(), + new NoNavIntercept(), ]; init(baseInstrument: BaseInstrument, flightPlanService: FlightPlanService): void { diff --git a/fbw-a32nx/src/systems/fmgc/src/components/fms-messages/NoNavIntercept.ts b/fbw-a32nx/src/systems/fmgc/src/components/fms-messages/NoNavIntercept.ts new file mode 100644 index 00000000000..3396982d2a7 --- /dev/null +++ b/fbw-a32nx/src/systems/fmgc/src/components/fms-messages/NoNavIntercept.ts @@ -0,0 +1,32 @@ +// Copyright (c) 2021-2023 FlyByWire Simulations +// +// SPDX-License-Identifier: GPL-3.0 + +import { FMMessage, FMMessageTypes } from '@flybywiresim/fbw-sdk'; + +import { GuidanceController } from '@fmgc/guidance/GuidanceController'; +import { FMMessageSelector, FMMessageUpdate } from './FmsMessages'; + +export class NoNavIntercept implements FMMessageSelector { + message: FMMessage = FMMessageTypes.NoNavIntercept; + + private guidanceController: GuidanceController; + + private lastState = false; + + init(baseInstrument: BaseInstrument): void { + this.guidanceController = baseInstrument.guidanceController; + } + + process(_: number): FMMessageUpdate { + const newState = this.guidanceController.shouldShowNoNavInterceptMessage(); + + if (newState !== this.lastState) { + this.lastState = newState; + + return newState ? FMMessageUpdate.SEND : FMMessageUpdate.RECALL; + } + + return FMMessageUpdate.NO_ACTION; + } +} diff --git a/fbw-a32nx/src/systems/fmgc/src/efis/EfisVectors.ts b/fbw-a32nx/src/systems/fmgc/src/efis/EfisVectors.ts index d4828be789d..8a58ce95a7f 100644 --- a/fbw-a32nx/src/systems/fmgc/src/efis/EfisVectors.ts +++ b/fbw-a32nx/src/systems/fmgc/src/efis/EfisVectors.ts @@ -7,7 +7,7 @@ import { EfisNdMode, EfisSide, EfisVectorsGroup, GenericDataListenerSync } from import { GuidanceController } from '@fmgc/guidance/GuidanceController'; import { PathVector, pathVectorLength, pathVectorValid } from '@fmgc/guidance/lnav/PathVector'; -import { ArmedLateralMode, isArmed, LateralMode } from '@shared/autopilot'; +import { LateralMode } from '@shared/autopilot'; import { FlightPlanIndex } from '@fmgc/flightplanning/FlightPlanManager'; import { FlightPlanService } from '@fmgc/flightplanning/FlightPlanService'; import { EfisInterface } from '@fmgc/efis/EfisInterface'; @@ -133,8 +133,6 @@ export class EfisVectors { switch (planIndex) { case FlightPlanIndex.Active: { const engagedLateralMode = SimVar.GetSimVarValue('L:A32NX_FMA_LATERAL_MODE', 'Number') as LateralMode; - const armedLateralMode = SimVar.GetSimVarValue('L:A32NX_FMA_LATERAL_ARMED', 'Enum'); - const navArmed = isArmed(armedLateralMode, ArmedLateralMode.NAV); const flightPhase = this.flightPhase.get(); const doesPreNavEngagePathExist = this.guidanceController.doesPreNavModeEngagementPathExist(); @@ -148,7 +146,7 @@ export class EfisVectors { engagedLateralMode === LateralMode.LAND || engagedLateralMode === LateralMode.FLARE || engagedLateralMode === LateralMode.ROLL_OUT || - (navArmed && doesPreNavEngagePathExist); + doesPreNavEngagePathExist; if (transmitActive) { this.transmitFlightPlan( diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/GuidanceController.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/GuidanceController.ts index f1e039497f1..1355fed705e 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/GuidanceController.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/GuidanceController.ts @@ -587,4 +587,8 @@ export class GuidanceController { getPreNavModeEngagementPathIntercept(): Readonly | null { return this.preNavModeEngagementPath.getIntercept(); } + + shouldShowNoNavInterceptMessage(): boolean { + return this.preNavModeEngagementPath.shouldShowNoNavInterceptMessage(); + } } diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/PreNavModeEngagementPath.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/PreNavModeEngagementPath.ts index 66f7a64f795..86056bb9e05 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/PreNavModeEngagementPath.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/PreNavModeEngagementPath.ts @@ -52,6 +52,8 @@ export class PreNavModeEngagementPathCalculation implements PreNavModeEngagement turnDirection: TurnDirection.Either, }; + private shouldInterceptPathExist: boolean = false; + constructor( private readonly fmgcIndex: number, private navigation: NavigationProvider, @@ -87,17 +89,25 @@ export class PreNavModeEngagementPathCalculation implements PreNavModeEngagement return this.intercept; } + shouldShowNoNavInterceptMessage(): boolean { + return this.shouldInterceptPathExist && !this.doesExist(); + } + private updateState() { const isNavModeArmed = this.register .setFromSimVar(`L:A32NX_FMGC_${this.fmgcIndex}_DISCRETE_WORD_3`) .bitValueOr(14, false); - const isNavModeActive = this.register - .setFromSimVar(`L:A32NX_FMGC_${this.fmgcIndex}_DISCRETE_WORD_2`) - .bitValueOr(12, false); + + this.register.setFromSimVar(`L:A32NX_FMGC_${this.fmgcIndex}_DISCRETE_WORD_2`); + const isNavModeActive = this.register.bitValueOr(12, false); + const isHdgModeActive = this.register.bitValueOr(16, false); + const isTrkModeActive = this.register.bitValueOr(17, false); + + const shouldComputeInterceptPath = isNavModeArmed && (isHdgModeActive || isTrkModeActive); switch (this.state) { case State.NavDisarmed: - if (isNavModeArmed) { + if (shouldComputeInterceptPath) { this.state = State.NavArmed; this.onNavModeArmed(); } else if (isNavModeActive) { @@ -109,13 +119,13 @@ export class PreNavModeEngagementPathCalculation implements PreNavModeEngagement if (isNavModeActive) { this.state = State.NavActive; this.onNavModeActivated(); - } else if (!isNavModeArmed) { + } else if (!shouldComputeInterceptPath) { this.state = State.NavDisarmed; this.onNavModeDisarmed(); } break; case State.NavActive: - if (isNavModeArmed) { + if (shouldComputeInterceptPath) { this.state = State.NavArmed; this.onNavModeArmed(); } else if (!isNavModeActive) { @@ -126,9 +136,12 @@ export class PreNavModeEngagementPathCalculation implements PreNavModeEngagement } } - private onNavModeActivated() {} + private onNavModeActivated() { + this.shouldInterceptPathExist = false; + } private onNavModeDisengaged() { + this.shouldInterceptPathExist = false; this.resetPath(); } @@ -138,6 +151,7 @@ export class PreNavModeEngagementPathCalculation implements PreNavModeEngagement } private onNavModeDisarmed() { + this.shouldInterceptPathExist = false; this.resetPath(); } @@ -154,6 +168,7 @@ export class PreNavModeEngagementPathCalculation implements PreNavModeEngagement private recomputeInterceptPath(activeGeometry: Geometry) { this.recomputationTimer = 0; + this.shouldInterceptPathExist = false; if (!this.flightPlanService.has(FlightPlanIndex.Active)) { this.resetPath(); @@ -184,17 +199,20 @@ export class PreNavModeEngagementPathCalculation implements PreNavModeEngagement return; } + this.shouldInterceptPathExist = true; + const interceptAngle = Math.min( MathUtils.normalise360(trueTrack - activeGeometryLeg.outboundCourse), MathUtils.normalise360(activeGeometryLeg.outboundCourse - trueTrack), ); - if (interceptAngle > 120) { + // TODO figure out if this is supposed to be 160 or 120 + if (interceptAngle > 160) { this.resetPath(); return; } - if (this.tryUpdateIntercept(trueTrack, activeGeometryLeg)) { + if (!this.tryUpdateIntercept(trueTrack, activeGeometryLeg)) { this.resetPath(); return; } @@ -247,6 +265,8 @@ export class PreNavModeEngagementPathCalculation implements PreNavModeEngagement this.intercept.location = intercept; this.intercept.distanceToIntercept = distanceToIntercept; } + + return true; } private updateIfLeg(activeGeometryLeg: Leg): IFLeg { @@ -316,4 +336,5 @@ export interface PreNavModeEngagementPath { doesExist(): boolean; getGeometry(): Readonly | null; getIntercept(): Readonly | null; + shouldShowNoNavInterceptMessage(): boolean; } diff --git a/fbw-common/src/systems/instruments/src/ND/shared/TrackLine.tsx b/fbw-common/src/systems/instruments/src/ND/shared/TrackLine.tsx index e59b421d815..e5c522ad719 100644 --- a/fbw-common/src/systems/instruments/src/ND/shared/TrackLine.tsx +++ b/fbw-common/src/systems/instruments/src/ND/shared/TrackLine.tsx @@ -17,12 +17,8 @@ import { MathUtils, EfisNdMode, Arinc429ConsumerSubject } from '@flybywiresim/fb import { NDSimvars } from '../NDSimvarPublisher'; import { GenericDisplayManagementEvents } from '../types/GenericDisplayManagementEvents'; import { GenericFcuEvents } from '../types/GenericFcuEvents'; -import { - ArmedLateralMode, - GenericFlightGuidanceEvents, - LateralMode, - isArmed, -} from '../types/GenericFlightGuidanceEvents'; +import { GenericFlightGuidanceEvents, LateralMode } from '../types/GenericFlightGuidanceEvents'; +import { FmsSymbolsData } from 'instruments/src/ND/FmsSymbolsPublisher'; export interface TrackLineProps { bus: EventBus; @@ -38,7 +34,7 @@ export class TrackLine extends DisplayComponent { private readonly lineRef = FSComponent.createRef(); private readonly sub = this.props.bus.getSubscriber< - GenericDisplayManagementEvents & GenericFlightGuidanceEvents & NDSimvars & GenericFcuEvents + GenericDisplayManagementEvents & GenericFlightGuidanceEvents & NDSimvars & GenericFcuEvents & FmsSymbolsData >(); private readonly ndMode = ConsumerSubject.create(this.sub.on('ndMode').whenChanged(), EfisNdMode.ARC); @@ -79,17 +75,23 @@ export class TrackLine extends DisplayComponent { this.y, ); + private readonly areActiveVectorsTransmitted = Subject.create(false); + onAfterRender(node: VNode) { super.onAfterRender(node); this.headingWord.setConsumer(this.sub.on('heading')); this.trackWord.setConsumer(this.sub.on('track')); + this.sub + .on('vectorsActive') + .handle((data) => this.areActiveVectorsTransmitted.set(data !== null && data !== undefined)); this.headingWord.sub(() => this.handleLineVisibility(), true); this.trackWord.sub(() => this.handleLineVisibility(), true); this.lateralModeSub.sub(() => this.handleLineVisibility(), true); this.lateralArmedSub.sub(() => this.handleLineVisibility(), true); this.ndMode.sub(() => this.handleLineVisibility(), true); + this.areActiveVectorsTransmitted.sub(() => this.handleLineVisibility(), true); } private handleLineVisibility() { @@ -99,7 +101,8 @@ export class TrackLine extends DisplayComponent { const trackInvalid = !this.trackWord.get().isNormalOperation(); const lateralMode = this.lateralModeSub.get(); - const lateralArmed = this.lateralArmedSub.get(); + + const areActiveVectorsTransmitted = this.areActiveVectorsTransmitted.get(); const shouldShowLine = (lateralMode === LateralMode.NONE || @@ -108,7 +111,7 @@ export class TrackLine extends DisplayComponent { lateralMode === LateralMode.RWY || lateralMode === LateralMode.RWY_TRACK || lateralMode === LateralMode.GA_TRACK) && - !isArmed(lateralArmed, ArmedLateralMode.NAV); + !areActiveVectorsTransmitted; if (wrongNDMode || headingInvalid || trackInvalid || !shouldShowLine) { this.visibility.set('hidden'); diff --git a/fbw-common/src/systems/shared/src/FmMessages.ts b/fbw-common/src/systems/shared/src/FmMessages.ts index d99acfb683f..0aa561222cb 100644 --- a/fbw-common/src/systems/shared/src/FmMessages.ts +++ b/fbw-common/src/systems/shared/src/FmMessages.ts @@ -218,4 +218,10 @@ export const FMMessageTypes: Readonly> = { color: 'White', clearable: true, }, + NoNavIntercept: { + id: 20, + text: 'NO NAV INTERCEPT', + color: 'Amber', + clearable: true, + }, }; From b66c9e9879d923e53ddc0c049ce53b4d5734e0e6 Mon Sep 17 00:00:00 2001 From: BBK <22713769+BlueberryKing@users.noreply.github.com> Date: Fri, 3 Jan 2025 12:46:09 +0100 Subject: [PATCH 09/17] Fix formatting --- .../FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js index 7a5eebdd11e..6a2d3cd9700 100644 --- a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js +++ b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js @@ -269,13 +269,13 @@ class CDUDirectToPage { const canSelectRadialIn = directToObject && directToObject.courseIn; const radialIn = isRadialInSelected ? `${directToObject.courseIn.toFixed(0).padStart(3, '0')}°` - : "{small}[ ]°{end}"; + : "[ ]°"; const isRadialOutSelected = directToObject && directToObject.courseOut; const canSelectRadialOut = directToObject && directToObject.courseOut; const radialOut = isRadialOutSelected ? `${directToObject.courseOut.toFixed(0).padStart(3, '0')}°` - : "{small}[ ]°{end}"; + : "[ ]°"; const isDirectToSelected = directToObject && !isWithAbeamSelected && !isRadialInSelected && !isRadialOutSelected; const canSelectDirectTo = directToObject && !isDirectToSelected; From ca2d378dc397441fbecede8840acbc14f4d93e5f Mon Sep 17 00:00:00 2001 From: BBK <22713769+BlueberryKing@users.noreply.github.com> Date: Fri, 3 Jan 2025 12:47:03 +0100 Subject: [PATCH 10/17] Fix DIR with outbound radial --- .../src/flightplanning/FlightPlanService.ts | 8 ++- .../src/flightplanning/legs/FlightPlanLeg.ts | 48 ++++++++++++++---- .../legs/FlightPlanLegNaming.ts | 8 +-- .../src/flightplanning/plans/FlightPlan.ts | 50 +++++++++---------- .../systems/fmgc/src/guidance/lnav/legs/CF.ts | 7 ++- .../systems/fmgc/src/guidance/lnav/legs/FD.ts | 10 ++-- .../systems/fmgc/src/guidance/lnav/legs/FM.ts | 4 +- .../systems/fmgc/src/guidance/lnav/legs/FX.ts | 6 +++ fbw-a32nx/src/systems/fmgc/src/utils/Geo.ts | 7 ++- 9 files changed, 97 insertions(+), 51 deletions(-) create mode 100644 fbw-a32nx/src/systems/fmgc/src/guidance/lnav/legs/FX.ts diff --git a/fbw-a32nx/src/systems/fmgc/src/flightplanning/FlightPlanService.ts b/fbw-a32nx/src/systems/fmgc/src/flightplanning/FlightPlanService.ts index 01edd10267e..5301b79297c 100644 --- a/fbw-a32nx/src/systems/fmgc/src/flightplanning/FlightPlanService.ts +++ b/fbw-a32nx/src/systems/fmgc/src/flightplanning/FlightPlanService.ts @@ -125,7 +125,13 @@ export class FlightPlanService

it === turnEnd); + const turnEndLegIndexInPlan = this.allLegs.findIndex((it) => it === legsToInsert[legsToInsert.length - 1]); if ( shouldInsertDiscontinuityAfterTurnEnd && this.maybeElementAt(turnEndLegIndexInPlan + 1)?.isDiscontinuity === false ) { - this.enrouteSegment.allLegs.splice(2, 0, { isDiscontinuity: true }); + this.enrouteSegment.allLegs.splice(legsToInsert.length, 0, { isDiscontinuity: true }); this.syncSegmentLegsChange(this.enrouteSegment); this.incrementVersion(); @@ -658,5 +658,3 @@ export class FlightPlan

, segment: SegmentType, ) { diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/legs/FM.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/legs/FM.ts index 099ec359522..0fb1eb73c12 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/legs/FM.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/legs/FM.ts @@ -6,19 +6,19 @@ import { GuidanceParameters } from '@fmgc/guidance/ControlLaws'; import { SegmentType } from '@fmgc/wtsdk'; import { Coordinates } from '@fmgc/flightplanning/data/geo'; -import { Leg } from '@fmgc/guidance/lnav/legs/Leg'; import { PathVector, PathVectorType } from '@fmgc/guidance/lnav/PathVector'; import { LegMetadata } from '@fmgc/guidance/lnav/legs/index'; import { NdbNavaid, VhfNavaid, Waypoint } from '@flybywiresim/fbw-sdk'; import { placeBearingDistance } from 'msfs-geo'; import { fixToFixGuidance } from '@fmgc/guidance/lnav/CommonGeometry'; +import { FXLeg } from '@fmgc/guidance/lnav/legs/FX'; /** * Temporary - better solution is just to have an `InfiniteLine` vector... */ const FM_LEG_SIZE = 512; -export class FMLeg extends Leg { +export class FMLeg extends FXLeg { predictedPath: PathVector[] = []; /** diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/legs/FX.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/legs/FX.ts new file mode 100644 index 00000000000..69eb47a6f87 --- /dev/null +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/legs/FX.ts @@ -0,0 +1,6 @@ +import { Fix } from '@flybywiresim/fbw-sdk'; +import { Leg } from '@fmgc/guidance/lnav/legs/Leg'; + +export abstract class FXLeg extends Leg { + readonly fix: Fix; +} diff --git a/fbw-a32nx/src/systems/fmgc/src/utils/Geo.ts b/fbw-a32nx/src/systems/fmgc/src/utils/Geo.ts index 0c59d3670c3..00ac837b0b4 100644 --- a/fbw-a32nx/src/systems/fmgc/src/utils/Geo.ts +++ b/fbw-a32nx/src/systems/fmgc/src/utils/Geo.ts @@ -11,6 +11,7 @@ import { distanceTo, smallCircleGreatCircleIntersection, placeBearingIntersectio import { AFLeg } from '@fmgc/guidance/lnav/legs/AF'; import { TFLeg } from '@fmgc/guidance/lnav/legs/TF'; import { XFLeg } from '@fmgc/guidance/lnav/legs/XF'; +import { FXLeg } from '@fmgc/guidance/lnav/legs/FX'; export class Geo { static computeDestinationPoint( @@ -83,8 +84,10 @@ export class Geo { const intersections1 = placeBearingIntersection( from, MathUtils.normalise360(bearing), - leg instanceof XFLeg ? (leg as XFLeg).fix.location : leg.getPathEndPoint(), - MathUtils.normalise360(leg.outboundCourse - 180), + leg instanceof XFLeg || leg instanceof FXLeg ? (leg as XFLeg).fix.location : leg.getPathEndPoint(), + leg instanceof FXLeg + ? MathUtils.normalise360(leg.outboundCourse) + : MathUtils.normalise360(leg.outboundCourse - 180), ); const d1 = distanceTo(from, intersections1[0]); From c68bd3f36b390ecf6406d2ff1ce8582b23a7d6fe Mon Sep 17 00:00:00 2001 From: BBK <22713769+BlueberryKing@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:35:13 +0100 Subject: [PATCH 11/17] Fix track line vs active plan display logic --- fbw-a32nx/src/systems/fmgc/src/efis/EfisVectors.ts | 13 ++++--------- .../systems/instruments/src/ND/shared/TrackLine.tsx | 13 ++++++------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/fbw-a32nx/src/systems/fmgc/src/efis/EfisVectors.ts b/fbw-a32nx/src/systems/fmgc/src/efis/EfisVectors.ts index 8a58ce95a7f..0f2cf26d153 100644 --- a/fbw-a32nx/src/systems/fmgc/src/efis/EfisVectors.ts +++ b/fbw-a32nx/src/systems/fmgc/src/efis/EfisVectors.ts @@ -133,19 +133,14 @@ export class EfisVectors { switch (planIndex) { case FlightPlanIndex.Active: { const engagedLateralMode = SimVar.GetSimVarValue('L:A32NX_FMA_LATERAL_MODE', 'Number') as LateralMode; - const flightPhase = this.flightPhase.get(); const doesPreNavEngagePathExist = this.guidanceController.doesPreNavModeEngagementPathExist(); const transmitActive = - // In preflight phase, the flight plan line is solid even when NAV is not armed - flightPhase === FmgcFlightPhase.Preflight || - engagedLateralMode === LateralMode.NAV || - engagedLateralMode === LateralMode.LOC_CPT || - engagedLateralMode === LateralMode.LOC_TRACK || - engagedLateralMode === LateralMode.LAND || - engagedLateralMode === LateralMode.FLARE || - engagedLateralMode === LateralMode.ROLL_OUT || + (engagedLateralMode !== LateralMode.HDG && + engagedLateralMode !== LateralMode.TRACK && + engagedLateralMode !== LateralMode.GA_TRACK && + engagedLateralMode !== LateralMode.RWY_TRACK) || doesPreNavEngagePathExist; if (transmitActive) { diff --git a/fbw-common/src/systems/instruments/src/ND/shared/TrackLine.tsx b/fbw-common/src/systems/instruments/src/ND/shared/TrackLine.tsx index e5c522ad719..e1a88617581 100644 --- a/fbw-common/src/systems/instruments/src/ND/shared/TrackLine.tsx +++ b/fbw-common/src/systems/instruments/src/ND/shared/TrackLine.tsx @@ -17,7 +17,7 @@ import { MathUtils, EfisNdMode, Arinc429ConsumerSubject } from '@flybywiresim/fb import { NDSimvars } from '../NDSimvarPublisher'; import { GenericDisplayManagementEvents } from '../types/GenericDisplayManagementEvents'; import { GenericFcuEvents } from '../types/GenericFcuEvents'; -import { GenericFlightGuidanceEvents, LateralMode } from '../types/GenericFlightGuidanceEvents'; +import { ArmedLateralMode, GenericFlightGuidanceEvents, LateralMode } from '../types/GenericFlightGuidanceEvents'; import { FmsSymbolsData } from 'instruments/src/ND/FmsSymbolsPublisher'; export interface TrackLineProps { @@ -101,17 +101,16 @@ export class TrackLine extends DisplayComponent { const trackInvalid = !this.trackWord.get().isNormalOperation(); const lateralMode = this.lateralModeSub.get(); + const lateralArmed = this.lateralArmedSub.get(); const areActiveVectorsTransmitted = this.areActiveVectorsTransmitted.get(); const shouldShowLine = - (lateralMode === LateralMode.NONE || - lateralMode === LateralMode.HDG || + (lateralMode === LateralMode.HDG || lateralMode === LateralMode.TRACK || - lateralMode === LateralMode.RWY || - lateralMode === LateralMode.RWY_TRACK || - lateralMode === LateralMode.GA_TRACK) && - !areActiveVectorsTransmitted; + lateralMode === LateralMode.GA_TRACK || + lateralMode === LateralMode.RWY_TRACK) && + (lateralArmed !== ArmedLateralMode.NAV || !areActiveVectorsTransmitted); if (wrongNDMode || headingInvalid || trackInvalid || !shouldShowLine) { this.visibility.set('hidden'); From d6fd287df7f029fe17abe3533254904e032aa502 Mon Sep 17 00:00:00 2001 From: BBK <22713769+BlueberryKing@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:35:50 +0100 Subject: [PATCH 12/17] Automatically compute inbound radial --- .../CDU/A320_Neo_CDU_DirectToPage.js | 117 ++++++++++++++---- 1 file changed, 93 insertions(+), 24 deletions(-) diff --git a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js index 6a2d3cd9700..575c259af54 100644 --- a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js +++ b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js @@ -4,11 +4,11 @@ // TODO this whole thing is thales layout... class CDUDirectToPage { - static ShowPage(mcdu, directToObject, wptsListIndex = 0) { + static ShowPage(mcdu, directToObject, wptsListIndex = 0, isRadialInPilotEntered = false) { mcdu.clearDisplay(); mcdu.page.Current = mcdu.page.DirectToPage; mcdu.returnPageCallback = () => { - CDUDirectToPage.ShowPage(mcdu, directToObject, wptsListIndex); + CDUDirectToPage.ShowPage(mcdu, directToObject, wptsListIndex, isRadialInPilotEntered); }; mcdu.activeSystem = 'FMGC'; @@ -81,8 +81,8 @@ class CDUDirectToPage { }); }; + // DIRECT TO mcdu.onRightInput[1] = (s, scratchpadCallback) => { - // DIRECT TO if (!directToObject) { mcdu.setScratchpadMessage(NXSystemMessages.notAllowed); scratchpadCallback(); @@ -104,28 +104,56 @@ class CDUDirectToPage { }); }; + // ABEAM mcdu.onRightInput[2] = () => { - // ABEAM mcdu.setScratchpadMessage(NXFictionalMessages.notYetImplemented); }; + + const plan = mcdu.flightPlanService.active; + const defaultRadialIn = CDUDirectToPage.computeDefaultRadialIn(plan, directToObject); + + // RADIAL IN mcdu.onRightInput[3] = (s, scratchpadCallback) => { - // RADIAL IN if (!directToObject) { mcdu.setScratchpadMessage(NXSystemMessages.notAllowed); scratchpadCallback(); return; } - // TODO this should allow a true course - if (!/^\d{1,3}/.test(s)) { - mcdu.setScratchpadMessage(NXSystemMessages.formatError); - scratchpadCallback(); - return; - } + let course = undefined; + let isPilotEntered = false; + if (s === FMCMainDisplay.clrValue) { + if (directToObject.courseIn !== undefined && defaultRadialIn !== undefined) { + mcdu.eraseTemporaryFlightPlan(() => { + directToObject.courseIn = defaultRadialIn; - const course = parseInt(s); - if (course > 360) { - mcdu.setScratchpadMessage(NXSystemMessages.entryOutOfRange); + mcdu.directTo(directToObject).then(() => { + CDUDirectToPage.ShowPage(mcdu, directToObject, wptsListIndex); + }).catch(err => { + mcdu.setScratchpadMessage(NXFictionalMessages.internalError); + console.error(err); + }); + }); + return; + } else { + mcdu.setScratchpadMessage(NXSystemMessages.notAllowed); + scratchpadCallback(); + return; + } + } else if (s === "" && defaultRadialIn !== undefined) { + course = defaultRadialIn; + } else if (/^\d{1,3}/.test(s)) { + course = parseInt(s); + if (course > 360) { + mcdu.setScratchpadMessage(NXSystemMessages.entryOutOfRange); + scratchpadCallback(); + return; + } + + isPilotEntered = true; + } else { + // TODO this should allow a true course + mcdu.setScratchpadMessage(NXSystemMessages.formatError); scratchpadCallback(); return; } @@ -137,7 +165,7 @@ class CDUDirectToPage { delete directToObject.courseOut; mcdu.directTo(directToObject).then(() => { - CDUDirectToPage.ShowPage(mcdu, directToObject, wptsListIndex); + CDUDirectToPage.ShowPage(mcdu, directToObject, wptsListIndex, isPilotEntered); }).catch(err => { mcdu.setScratchpadMessage(NXFictionalMessages.internalError); console.error(err); @@ -145,8 +173,8 @@ class CDUDirectToPage { }); }; + // RADIAL OUT mcdu.onRightInput[4] = (s, scratchpadCallback) => { - // RADIAL OUT if (!directToObject) { mcdu.setScratchpadMessage(NXSystemMessages.notAllowed); scratchpadCallback(); @@ -181,8 +209,6 @@ class CDUDirectToPage { }); }; - const plan = mcdu.flightPlanService.active; - let directWaypointCell = ""; if (directToObject) { if (directToObject.flightPlanLegIndex !== undefined) { @@ -264,12 +290,17 @@ class CDUDirectToPage { const isWithAbeamSelected = directToObject && directToObject.withAbeam; const canSelectWithAbeam = directToObject && isWithAbeamSelected; - // TODO handle automatic course calculation const isRadialInSelected = directToObject && directToObject.courseIn; - const canSelectRadialIn = directToObject && directToObject.courseIn; - const radialIn = isRadialInSelected - ? `${directToObject.courseIn.toFixed(0).padStart(3, '0')}°` - : "[ ]°"; + const canSelectRadialIn = directToObject && (directToObject.courseIn || defaultRadialIn !== undefined); + + let radialInText = "[ ]°"; + if (isRadialInSelected) { + radialInText = isRadialInPilotEntered + ? `${directToObject.courseIn.toFixed(0).padStart(3, '0')}°` + : `{small}${directToObject.courseIn.toFixed(0).padStart(3, '0')}°{end}`; + } else if (defaultRadialIn !== undefined) { + radialInText = `{small}${defaultRadialIn.toFixed(0).padStart(3, '0')}°{end}`; + } const isRadialOutSelected = directToObject && directToObject.courseOut; const canSelectRadialOut = directToObject && directToObject.courseOut; @@ -290,11 +321,49 @@ class CDUDirectToPage { ["", "WITH\xa0"], [waypointsCell[1], `ABEAM PTS ${canSelectWithAbeam ? "}" : " "}[color]${isWithAbeamSelected ? "yellow" : "cyan"}[color]inop`], ["", "RADIAL IN\xa0"], - [waypointsCell[2], `${radialIn} ${canSelectRadialIn ? "}" : " "}[color]${isRadialInSelected ? "yellow" : "cyan"}`], + [waypointsCell[2], `${radialInText} ${canSelectRadialIn ? "}" : " "}[color]${isRadialInSelected ? "yellow" : "cyan"}`], ["", "RADIAL OUT\xa0"], [waypointsCell[3], `${radialOut} ${canSelectRadialOut ? "}" : " "}[color]${isRadialOutSelected ? "yellow" : "cyan"}`], [eraseLabel, insertLabel], [eraseLine ? eraseLine : waypointsCell[4], insertLine] ]); } + + /** + * + * @param {import("../../../../../../../../../systems/fmgc/src/flightplanning/plans/FlightPlan").FlightPlan} plan + * @param {import("../../../../../../../../../systems/fmgc/src/flightplanning/types/DirectTo").DirectTo} directToObject + * @returns {number | undefined} + */ + static computeDefaultRadialIn(plan, directToObject) { + if (!directToObject || directToObject.flightPlanLegIndex === undefined) { + return undefined; + } + + const directToLeg = plan.maybeElementAt(directToObject.flightPlanLegIndex); + if (!directToLeg || directToLeg.isDiscontinuity === true || directToLeg.terminationWaypoint() === null) { + return undefined; + } + + const maybeLegBefore = plan.maybeElementAt(directToObject.flightPlanLegIndex - 1); + const maybeLegAfter = plan.maybeElementAt(directToObject.flightPlanLegIndex + 1); + + if (directToObject.flightPlanLegIndex > plan.activeLegIndex && maybeLegBefore && maybeLegBefore.isDiscontinuity === false && maybeLegBefore.terminationWaypoint() !== null) { + const trueRadialIn = Avionics.Utils.computeGreatCircleHeading(directToLeg.terminationWaypoint().location, maybeLegBefore.terminationWaypoint().location); + + return A32NX_Util.trueToMagnetic( + trueRadialIn, + A32NX_Util.getRadialMagVar(directToLeg.terminationWaypoint()) + ); + } else if (maybeLegAfter && maybeLegAfter.isDiscontinuity === false && maybeLegAfter.terminationWaypoint() !== null) { + const trueRadialIn = 180 + Avionics.Utils.computeGreatCircleHeading(directToLeg.terminationWaypoint().location, maybeLegAfter.terminationWaypoint().location); + + return A32NX_Util.trueToMagnetic( + trueRadialIn, + A32NX_Util.getRadialMagVar(directToLeg.terminationWaypoint()) + ); + } + + return undefined; + } } From 8a0cce0e70fd69cfcbe92594b55dc1ca29b87d87 Mon Sep 17 00:00:00 2001 From: BBK <22713769+BlueberryKing@users.noreply.github.com> Date: Wed, 15 Jan 2025 19:25:32 +0100 Subject: [PATCH 13/17] Fix radial in course 000 not working --- .../CDU/A320_Neo_CDU_DirectToPage.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js index 575c259af54..f2aec847e13 100644 --- a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js +++ b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js @@ -288,10 +288,10 @@ class CDUDirectToPage { } const isWithAbeamSelected = directToObject && directToObject.withAbeam; - const canSelectWithAbeam = directToObject && isWithAbeamSelected; + const canSelectWithAbeam = directToObject && !isWithAbeamSelected; - const isRadialInSelected = directToObject && directToObject.courseIn; - const canSelectRadialIn = directToObject && (directToObject.courseIn || defaultRadialIn !== undefined); + const isRadialInSelected = directToObject && directToObject.courseIn !== undefined; + const canSelectRadialIn = directToObject && (directToObject.courseIn !== undefined || defaultRadialIn !== undefined); let radialInText = "[ ]°"; if (isRadialInSelected) { @@ -302,8 +302,8 @@ class CDUDirectToPage { radialInText = `{small}${defaultRadialIn.toFixed(0).padStart(3, '0')}°{end}`; } - const isRadialOutSelected = directToObject && directToObject.courseOut; - const canSelectRadialOut = directToObject && directToObject.courseOut; + const isRadialOutSelected = directToObject && directToObject.courseOut !== undefined; + const canSelectRadialOut = directToObject && directToObject.courseOut !== undefined; const radialOut = isRadialOutSelected ? `${directToObject.courseOut.toFixed(0).padStart(3, '0')}°` : "[ ]°"; From c49faa0dcb63d748dabbc4afc04ee7ae120cce6b Mon Sep 17 00:00:00 2001 From: BBK <22713769+BlueberryKing@users.noreply.github.com> Date: Wed, 15 Jan 2025 19:34:50 +0100 Subject: [PATCH 14/17] Handle distance computation and PWP placement --- .../fmgc/src/guidance/GuidanceController.ts | 8 +- .../src/guidance/PreNavModeEngagementPath.ts | 39 ++++++++- .../fmgc/src/guidance/lnav/LnavDriver.ts | 83 ++++++++++--------- .../fmgc/src/guidance/lnav/PseudoWaypoints.ts | 17 +++- .../guidance/vnav/VerticalProfileManager.ts | 7 +- .../fmgc/src/guidance/vnav/VnavDriver.ts | 58 +------------ 6 files changed, 108 insertions(+), 104 deletions(-) diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/GuidanceController.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/GuidanceController.ts index 1355fed705e..1290dd05461 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/GuidanceController.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/GuidanceController.ts @@ -499,7 +499,9 @@ export class GuidanceController { !alternate && flightPlanIndex < FlightPlanIndex.FirstSecondary, ); - this.recomputeGeometry(geometry, plan); + if (geometryPIndex !== FlightPlanIndex.Active || !this.doesPreNavModeEngagementPathExist()) { + this.recomputeGeometry(geometry, plan); + } } else { const newGeometry = GeometryFactory.createFromFlightPlan( plan, @@ -591,4 +593,8 @@ export class GuidanceController { shouldShowNoNavInterceptMessage(): boolean { return this.preNavModeEngagementPath.shouldShowNoNavInterceptMessage(); } + + getPreNavModeAlongTrackDistanceToGo(trueTrack: number): number | null { + return this.preNavModeEngagementPath.getAlongTrackDistanceToGo(trueTrack); + } } diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/PreNavModeEngagementPath.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/PreNavModeEngagementPath.ts index 86056bb9e05..9c75be2c3e0 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/PreNavModeEngagementPath.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/PreNavModeEngagementPath.ts @@ -93,6 +93,38 @@ export class PreNavModeEngagementPathCalculation implements PreNavModeEngagement return this.shouldInterceptPathExist && !this.doesExist(); } + getAlongTrackDistanceToGo(trueTrack: number): number | null { + if (!this.doesExist() || !this.flightPlanService.has(FlightPlanIndex.Active)) { + return null; + } + + const activePlan = this.flightPlanService.active; + + const ciLeg = this.geometry.legs.get(activePlan.activeLegIndex - 1); + + const referenceLegIndex = !ciLeg.isAbeam(this.ppos) ? activePlan.activeLegIndex : activePlan.activeLegIndex - 1; + const referenceInboundTransition = this.geometry.transitions.get(referenceLegIndex - 1); + const referenceLeg = this.geometry.legs.get(referenceLegIndex); + const referenceOutboundTransition = this.geometry.transitions.get(referenceLegIndex); + + let atdtg = 0; + + atdtg += Geometry.completeLegAlongTrackPathDistanceToGo( + this.ppos, + trueTrack, + referenceLeg, + referenceInboundTransition, + referenceOutboundTransition, + ); + + if (ciLeg.isAbeam(this.ppos)) { + atdtg += + activePlan.activeLeg?.isDiscontinuity === false ? activePlan.activeLeg.calculated.distanceWithTransitions : 0; + } + + return atdtg; + } + private updateState() { const isNavModeArmed = this.register .setFromSimVar(`L:A32NX_FMGC_${this.fmgcIndex}_DISCRETE_WORD_3`) @@ -229,7 +261,9 @@ export class PreNavModeEngagementPathCalculation implements PreNavModeEngagement this.geometry.legs.set(activeLegIndex - 2, ifLeg); this.geometry.legs.set(activeLegIndex - 1, ciLeg); this.geometry.transitions.set(activeLegIndex - 1, TransitionPicker.forLegs(ciLeg, activeGeometryLeg)); + this.geometry.transitions.delete(activeLegIndex - 2); this.geometry.recomputeWithParameters(trueAirspeed, groundSpeed, this.ppos, trueTrack, activeLegIndex - 1, -1); + this.geometry.updateDistances(activePlan, activeLegIndex - 1, activePlan.firstMissedApproachLegIndex); } private tryUpdateIntercept(trueTrack: number, activeGeometryLeg: Leg): boolean { @@ -238,7 +272,7 @@ export class PreNavModeEngagementPathCalculation implements PreNavModeEngagement intercept = Geo.legIntercept(this.ppos, trueTrack, activeGeometryLeg) ?? null; } catch (e) { this.resetPath(); - return; + return false; } if (intercept === null) { @@ -248,7 +282,7 @@ export class PreNavModeEngagementPathCalculation implements PreNavModeEngagement // Check intercept lies on path const isInterceptAhead = sideOfPointOnCourseToFix(this.ppos, trueTrack, intercept) === PointSide.After; const dtg = activeGeometryLeg.getDistanceToGo(intercept); - const isOnLeg = dtg >= 0 && dtg <= activeGeometryLeg.distance; + const isOnLeg = (dtg === undefined || dtg > 0) && activeGeometryLeg.isAbeam(intercept); if (!isInterceptAhead || !isOnLeg) { return false; @@ -337,4 +371,5 @@ export interface PreNavModeEngagementPath { getGeometry(): Readonly | null; getIntercept(): Readonly | null; shouldShowNoNavInterceptMessage(): boolean; + getAlongTrackDistanceToGo(trueTrack: number): number | null; } diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/LnavDriver.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/LnavDriver.ts index 9728b2e91b1..6f17de204e7 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/LnavDriver.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/LnavDriver.ts @@ -92,19 +92,11 @@ export class LnavDriver implements GuidanceComponent { const geometry = this.guidanceController.activeGeometry; const activeLegIdx = this.guidanceController.activeLegIndex; + this.updateDistanceToDestination(geometry, trueTrack); + if (geometry && geometry.legs.size > 0) { const dtg = geometry.getDistanceToGo(this.guidanceController.activeLegIndex, this.ppos); - const activeLegAlongTrackCompletePathDtg = this.computeAlongTrackDistanceToGo(geometry, activeLegIdx, trueTrack); - if ( - activeLegAlongTrackCompletePathDtg === undefined && - this.guidanceController.activeLegAlongTrackCompletePathDtg !== undefined - ) { - console.log('[FMS/LNAV] No reference leg found to compute alongTrackDistanceToGo'); - } - - this.guidanceController.activeLegAlongTrackCompletePathDtg = activeLegAlongTrackCompletePathDtg; - const inboundTrans = geometry.transitions.get(activeLegIdx - 1); const activeLeg = geometry.legs.get(activeLegIdx); const outboundTrans = geometry.transitions.get(activeLegIdx) ? geometry.transitions.get(activeLegIdx) : null; @@ -409,42 +401,55 @@ export class LnavDriver implements GuidanceComponent { } } - /** - * - * @param geometry active geometry - * @param activeLegIdx index of active leg in the geometry - * @param trueTrack true track of the aircraft - * @returns distance to go along the active leg - */ - private computeAlongTrackDistanceToGo( - geometry: Geometry, - activeLegIdx: number, - trueTrack: DegreesTrue, - ): NauticalMiles { - // Iterate over the upcoming legs until we find one that has a distance to go. - // If we sequence a discontinuity for example, there is no geometry leg for the active leg, so we iterate downpath until we find one. - // This will typically be an IF leg - for (let i = activeLegIdx ?? 0; geometry.legs.has(i) || geometry.legs.has(i + 1); i++) { - const leg = geometry.legs.get(i); - if (!leg || leg instanceof VMLeg || leg instanceof FMLeg) { - continue; - } + private updateDistanceToDestination(geometry: Geometry, trueTrack: number): void { + if (!geometry || geometry.legs.size <= 0) { + this.guidanceController.activeLegAlongTrackCompletePathDtg = undefined; + this.guidanceController.alongTrackDistanceToDestination = undefined; + + return; + } - const inboundTrans = geometry.transitions.get(i - 1); - const outboundTrans = geometry.transitions.get(i); + const activeLegIndex = this.guidanceController.activeLegIndex; + const activeLeg = geometry.legs.get(activeLegIndex); - const completeLegAlongTrackPathDtg = Geometry.completeLegAlongTrackPathDistanceToGo( + let referenceLegIndex = activeLegIndex; + if (!activeLeg) { + referenceLegIndex = activeLegIndex + 1; + } else if (activeLeg instanceof VMLeg || activeLeg instanceof FMLeg) { + referenceLegIndex = activeLegIndex + 2; + } + const referenceLeg = geometry.legs.get(referenceLegIndex); + + if (!referenceLeg) { + this.guidanceController.activeLegAlongTrackCompletePathDtg = undefined; + this.guidanceController.alongTrackDistanceToDestination = undefined; + + return; + } + + let completeLegAlongTrackPathDtg: number | undefined = undefined; + if (this.guidanceController.doesPreNavModeEngagementPathExist()) { + completeLegAlongTrackPathDtg = + this.guidanceController.getPreNavModeAlongTrackDistanceToGo(trueTrack) ?? undefined; + } else { + const inboundTransition = geometry.transitions.get(referenceLegIndex - 1); + const outboundTransition = geometry.transitions.get(referenceLegIndex); + + completeLegAlongTrackPathDtg = Geometry.completeLegAlongTrackPathDistanceToGo( this.ppos, trueTrack, - leg, - inboundTrans, - outboundTrans, + referenceLeg, + inboundTransition, + outboundTransition, ); - - return completeLegAlongTrackPathDtg; } - return undefined; + this.guidanceController.activeLegAlongTrackCompletePathDtg = completeLegAlongTrackPathDtg; + this.guidanceController.alongTrackDistanceToDestination = Number.isFinite( + referenceLeg.calculated?.cumulativeDistanceToEndWithTransitions, + ) + ? completeLegAlongTrackPathDtg + referenceLeg.calculated.cumulativeDistanceToEndWithTransitions + : undefined; } public legEta(gs: Knots, termination: Coordinates): number { diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/PseudoWaypoints.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/PseudoWaypoints.ts index 5cab0d62d46..c791a7bcb96 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/PseudoWaypoints.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/PseudoWaypoints.ts @@ -271,8 +271,17 @@ export class PseudoWaypoints implements GuidanceComponent { const activeLegIndex = this.guidanceController.activeLegIndex; - for (let i = activeLegIndex - 1; i < wptCount; i++) { - const geometryLeg = path.legs.get(i); + for (let i = activeLegIndex - 2; i < wptCount; i++) { + if (i < activeLegIndex - 1 && !this.guidanceController.doesPreNavModeEngagementPathExist()) { + continue; + } + + const geometry = + i <= activeLegIndex && this.guidanceController.doesPreNavModeEngagementPathExist() + ? this.guidanceController.getPreNavModeEngagementPathGeometry() + : path; + + const geometryLeg = geometry.legs.get(i); if (!geometryLeg || geometryLeg.isNull || !geometryLeg.calculated) { continue; @@ -281,8 +290,8 @@ export class PseudoWaypoints implements GuidanceComponent { const accumulator = geometryLeg.calculated.cumulativeDistanceToEndWithTransitions; if (accumulator < distanceFromEnd) { - const inboundTrans = path.transitions.get(i - 1); - const outboundTrans = path.transitions.get(i); + const inboundTrans = geometry.transitions.get(i - 1); + const outboundTrans = geometry.transitions.get(i); const [inboundTransLength, legPartLength, outboundTransLength] = Geometry.completeLegPathLengths( geometryLeg, diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/VerticalProfileManager.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/VerticalProfileManager.ts index acb7bf27adb..dede8ddbb4d 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/VerticalProfileManager.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/VerticalProfileManager.ts @@ -282,9 +282,10 @@ export class VerticalProfileManager { computeTacticalNdProfile(): void { const { fcuAltitude, cleanSpeed, presentPosition, fuelOnBoard, approachSpeed } = this.observer.get(); - const ndProfile = this.fcuModes.isLatAutoControlActive() - ? new NavGeometryProfile(this.flightPlanService, this.constraintReader, this.atmosphericConditions) - : new SelectedGeometryProfile(); + const ndProfile = + this.fcuModes.isLatAutoControlActive() || this.guidanceController.doesPreNavModeEngagementPathExist() + ? new NavGeometryProfile(this.flightPlanService, this.constraintReader, this.atmosphericConditions) + : new SelectedGeometryProfile(); let speedProfile: SpeedProfile; if (this.fcuModes.isExpediteModeActive()) { diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/VnavDriver.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/VnavDriver.ts index 52d93f416a7..24d96d8e334 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/VnavDriver.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/vnav/VnavDriver.ts @@ -30,8 +30,6 @@ import { VerticalCheckpointReason, VerticalWaypointPrediction, } from './profile/NavGeometryProfile'; -import { VMLeg } from '@fmgc/guidance/lnav/legs/VM'; -import { FMLeg } from '@fmgc/guidance/lnav/legs/FM'; export class VnavDriver implements GuidanceComponent { version: number = 0; @@ -124,7 +122,6 @@ export class VnavDriver implements GuidanceComponent { const { flightPhase } = this.computationParametersObserver.get(); this.updateDebugInformation(); - this.updateDistanceToDestination(); if (flightPhase >= FmgcFlightPhase.Takeoff) { this.updateHoldSpeed(); @@ -212,8 +209,9 @@ export class VnavDriver implements GuidanceComponent { isLatAutoControlArmedWithIntercept(): boolean { const { fcuArmedLateralMode } = this.computationParametersObserver.get(); - // FIXME: Figure out if intercept exists - return isArmed(fcuArmedLateralMode, ArmedLateralMode.NAV); + return ( + isArmed(fcuArmedLateralMode, ArmedLateralMode.NAV) && this.guidanceController.doesPreNavModeEngagementPathExist() + ); } isSelectedVerticalModeActive(): boolean { @@ -580,56 +578,6 @@ export class VnavDriver implements GuidanceComponent { `VS ${this.descentGuidance.getTargetVerticalSpeed()?.toFixed(0) ?? '---'} FT/MIN\n`, ); } - - private updateDistanceToDestination(): void { - const geometry = this.guidanceController.activeGeometry; - if (!geometry || geometry.legs.size <= 0) { - this.guidanceController.activeLegAlongTrackCompletePathDtg = undefined; - this.guidanceController.alongTrackDistanceToDestination = undefined; - - return; - } - - // TODO: Proper navigation - const ppos = this.guidanceController.lnavDriver.ppos; - const trueTrack = SimVar.GetSimVarValue('GPS GROUND TRUE TRACK', 'degree'); - - const activeLegIndx = this.guidanceController.activeLegIndex; - const activeLeg = geometry.legs.get(activeLegIndx); - - let referenceLegIndex = activeLegIndx; - if (!activeLeg) { - referenceLegIndex = activeLegIndx + 1; - } else if (activeLeg instanceof VMLeg || activeLeg instanceof FMLeg) { - referenceLegIndex = activeLegIndx + 2; - } - const referenceLeg = geometry.legs.get(referenceLegIndex); - - if (!referenceLeg) { - this.guidanceController.activeLegAlongTrackCompletePathDtg = undefined; - this.guidanceController.alongTrackDistanceToDestination = undefined; - - return; - } - - const inboundTransition = geometry.transitions.get(referenceLegIndex - 1); - const outboundTransition = geometry.transitions.get(referenceLegIndex); - - const completeLegAlongTrackPathDtg = Geometry.completeLegAlongTrackPathDistanceToGo( - ppos, - trueTrack, - referenceLeg, - inboundTransition, - outboundTransition, - ); - - this.guidanceController.activeLegAlongTrackCompletePathDtg = completeLegAlongTrackPathDtg; - this.guidanceController.alongTrackDistanceToDestination = Number.isFinite( - referenceLeg.calculated?.cumulativeDistanceToEndWithTransitions, - ) - ? completeLegAlongTrackPathDtg + referenceLeg.calculated.cumulativeDistanceToEndWithTransitions - : undefined; - } } /// To check whether the value changed from old to new, but not if both values are NaN. (NaN !== NaN in JS) From eed6cbff8fe1a07772d9034a69af4fa38461803b Mon Sep 17 00:00:00 2001 From: BBK <22713769+BlueberryKing@users.noreply.github.com> Date: Wed, 15 Jan 2025 19:36:12 +0100 Subject: [PATCH 15/17] Fix intercept on certain legs --- .../fmgc/src/guidance/PreNavModeEngagementPath.ts | 12 ++++++++---- .../guidance/lnav/transitions/DmeArcTransition.ts | 4 +++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/PreNavModeEngagementPath.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/PreNavModeEngagementPath.ts index 9c75be2c3e0..a70ffa0f19e 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/PreNavModeEngagementPath.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/PreNavModeEngagementPath.ts @@ -339,20 +339,24 @@ export class PreNavModeEngagementPathCalculation implements PreNavModeEngagement } const crossTrackError = SimVar.GetSimVarValue('L:A32NX_FG_CROSS_TRACK_ERROR', 'nautical miles'); - const trackAngleError = SimVar.GetSimVarValue('L:A32NX_FG_TRACK_ANGLE_ERROR', 'Degrees'); - if (Math.abs(crossTrackError) < 0.2 && Math.abs(trackAngleError) < 20) { + if (Math.abs(crossTrackError) < 0.2) { this.resetPath(); } } private shouldComputeInterceptPath(leg?: FlightPlanElement): leg is FlightPlanLeg { - // Possible leg types we can intercept AF, CF, DF, FA, FC, FD, FM, HA, HF, HM, PI, RF, TF + // Possible leg types we can intercept AF, CF, DF, FA, FC, FD, FM, (IF), (HA, HF, HM), (PI), (RF), TF + // We know Vx and Cx (except CF) legs don't get intercepts drawn, + // the others I've excluded here because I don't see how they should word return ( leg?.isDiscontinuity === false && !leg.isVx() && (!leg.isCx() || leg.type === LegType.CF) && - leg.type !== LegType.IF + leg.type !== LegType.IF && + !leg.isHX() && + leg.type !== LegType.RF && + leg.type !== LegType.PI ); } diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/transitions/DmeArcTransition.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/transitions/DmeArcTransition.ts index 762479e9797..714c5b44d46 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/transitions/DmeArcTransition.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/transitions/DmeArcTransition.ts @@ -121,7 +121,9 @@ export class DmeArcTransition extends Transition { this.addDebugPoints(); } } else if (this.nextLeg instanceof AFLeg) { - const turnDirection = Math.sign(MathUtils.diffAngle(this.previousLeg.outboundCourse, this.nextLeg.inboundCourse)); + const inboundCourse = + bearingTo(this.nextLeg.centre, this.previousLeg.getPathEndPoint()) + 90 * this.nextLeg.turnDirectionSign; + const turnDirection = Math.sign(MathUtils.diffAngle(this.previousLeg.outboundCourse, inboundCourse)); const reference = placeBearingDistance( this.previousLeg.getPathEndPoint(), this.previousLeg.outboundCourse + 90 * turnDirection, From 572494d9428cfb8b8a6fa504890c80892c96ef85 Mon Sep 17 00:00:00 2001 From: BBK <22713769+BlueberryKing@users.noreply.github.com> Date: Wed, 15 Jan 2025 19:37:03 +0100 Subject: [PATCH 16/17] Treat RADIAL OUT differently --- .../src/flightplanning/FlightPlanService.ts | 7 +--- .../src/flightplanning/legs/FlightPlanLeg.ts | 19 +-------- .../src/flightplanning/plans/FlightPlan.ts | 39 ++++++++++--------- .../systems/fmgc/src/guidance/lnav/legs/CF.ts | 8 +--- .../systems/fmgc/src/guidance/lnav/legs/IF.ts | 5 +++ 5 files changed, 31 insertions(+), 47 deletions(-) diff --git a/fbw-a32nx/src/systems/fmgc/src/flightplanning/FlightPlanService.ts b/fbw-a32nx/src/systems/fmgc/src/flightplanning/FlightPlanService.ts index 5301b79297c..e897fa5fa3c 100644 --- a/fbw-a32nx/src/systems/fmgc/src/flightplanning/FlightPlanService.ts +++ b/fbw-a32nx/src/systems/fmgc/src/flightplanning/FlightPlanService.ts @@ -126,12 +126,7 @@ export class FlightPlanService

extends BaseFlightPlan

{ static empty

( @@ -175,27 +176,31 @@ export class FlightPlan

it === legsToInsert[legsToInsert.length - 1]); + const turnEndLegIndexInPlan = this.allLegs.findIndex((it) => it === turnEnd); if ( shouldInsertDiscontinuityAfterTurnEnd && this.maybeElementAt(turnEndLegIndexInPlan + 1)?.isDiscontinuity === false ) { - this.enrouteSegment.allLegs.splice(legsToInsert.length, 0, { isDiscontinuity: true }); + this.enrouteSegment.allLegs.splice(2, 0, { isDiscontinuity: true }); this.syncSegmentLegsChange(this.enrouteSegment); this.incrementVersion(); diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/legs/CF.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/legs/CF.ts index 5df38f1b35b..78767d73608 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/legs/CF.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/legs/CF.ts @@ -16,7 +16,6 @@ import { MathUtils, Fix } from '@flybywiresim/fbw-sdk'; import { LegMetadata } from '@fmgc/guidance/lnav/legs/index'; import { IFLeg } from '@fmgc/guidance/lnav/legs/IF'; import { PathVector, PathVectorType } from '../PathVector'; -import { IN_BND_IDENT, OUT_BND_IDENT } from '@fmgc/flightplanning/legs/FlightPlanLegNaming'; export class CFLeg extends XFLeg { private computedPath: PathVector[] = []; @@ -43,7 +42,8 @@ export class CFLeg extends XFLeg { } getPathStartPoint(): Coordinates | undefined { - if (this.inboundGuidable instanceof IFLeg && this.isIfSuitableStartPoint(this.inboundGuidable)) { + // Make sure an inbound radial doesn't connect to the actual IN-BND waypoint which is at PPOS + if (this.inboundGuidable instanceof IFLeg && !this.inboundGuidable.isInbndOrOutbnd()) { return this.inboundGuidable.fix.location; } @@ -152,8 +152,4 @@ export class CFLeg extends XFLeg { get repr(): string { return `CF(${this.course.toFixed(1)}T) TO ${this.fix.ident}`; } - - private isIfSuitableStartPoint(ifLeg: IFLeg): boolean { - return ifLeg.ident !== IN_BND_IDENT && ifLeg.ident !== OUT_BND_IDENT; - } } diff --git a/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/legs/IF.ts b/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/legs/IF.ts index 0fd89536c30..550805ba99d 100644 --- a/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/legs/IF.ts +++ b/fbw-a32nx/src/systems/fmgc/src/guidance/lnav/legs/IF.ts @@ -13,6 +13,7 @@ import { Guidable } from '@fmgc/guidance/Guidable'; import { Leg } from '@fmgc/guidance/lnav/legs/Leg'; import { Fix, WaypointDescriptor } from '@flybywiresim/fbw-sdk'; import { distanceTo } from 'msfs-geo'; +import { IN_BND_IDENT, OUT_BND_IDENT } from '@fmgc/flightplanning/legs/FlightPlanLegNaming'; export class IFLeg extends XFLeg { constructor( @@ -98,4 +99,8 @@ export class IFLeg extends XFLeg { get repr(): string { return `IF AT ${this.fix.ident}`; } + + isInbndOrOutbnd(): boolean { + return this.ident === IN_BND_IDENT || this.ident === OUT_BND_IDENT; + } } From 5bb1cccda63b903a2b56c232b095a01fe09016fd Mon Sep 17 00:00:00 2001 From: BBK <22713769+BlueberryKing@users.noreply.github.com> Date: Wed, 15 Jan 2025 19:45:25 +0100 Subject: [PATCH 17/17] Fix formatting on DIR page --- .../FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js index f2aec847e13..5bc7f7e4ab4 100644 --- a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js +++ b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_DirectToPage.js @@ -291,7 +291,7 @@ class CDUDirectToPage { const canSelectWithAbeam = directToObject && !isWithAbeamSelected; const isRadialInSelected = directToObject && directToObject.courseIn !== undefined; - const canSelectRadialIn = directToObject && (directToObject.courseIn !== undefined || defaultRadialIn !== undefined); + const canSelectRadialIn = directToObject && !isRadialInSelected; let radialInText = "[ ]°"; if (isRadialInSelected) { @@ -303,7 +303,7 @@ class CDUDirectToPage { } const isRadialOutSelected = directToObject && directToObject.courseOut !== undefined; - const canSelectRadialOut = directToObject && directToObject.courseOut !== undefined; + const canSelectRadialOut = directToObject && !isRadialOutSelected; const radialOut = isRadialOutSelected ? `${directToObject.courseOut.toFixed(0).padStart(3, '0')}°` : "[ ]°";