From 20a9e1dd9d4fee84568904525c997834d6c53f28 Mon Sep 17 00:00:00 2001 From: Lukas Michels Date: Thu, 12 Dec 2024 20:33:03 +0100 Subject: [PATCH] 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;