Skip to content

Commit

Permalink
fix: pitch_flare_tweak
Browse files Browse the repository at this point in the history
revert changes to flightmodel

fine tune
  • Loading branch information
Revyn112 committed Jan 9, 2025
1 parent 12024ec commit 80f59e2
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions hdw-a339x/src/wasm/fbw_a330/src/model/PitchNormalLaw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1401,8 +1401,8 @@ void PitchNormalLaw::step(const real_T *rtu_In_time_dt, const real_T *rtu_In_nz_
PitchNormalLaw_DWork.is_active_c2_PitchNormalLaw = 1U;
PitchNormalLaw_DWork.is_c2_PitchNormalLaw = PitchNormalLaw_IN_Ground;
rtb_in_flare = 0;
PitchNormalLaw_B.flare_Theta_c_deg = -2.0;
PitchNormalLaw_B.flare_Theta_c_rate_deg_s = -1000.0;
PitchNormalLaw_B.flare_Theta_c_deg = 0.0;
PitchNormalLaw_B.flare_Theta_c_rate_deg_s = 0.0;
} else {
switch (PitchNormalLaw_DWork.is_c2_PitchNormalLaw) {
case PitchNormalLaw_IN_Flare_Active_Armed:
Expand All @@ -1415,7 +1415,7 @@ void PitchNormalLaw::step(const real_T *rtu_In_time_dt, const real_T *rtu_In_nz_
if ((*rtu_In_H_radio_ft <= 30.0) || (rtb_Switch_f == 1.0)) {
PitchNormalLaw_DWork.is_c2_PitchNormalLaw = PitchNormalLaw_IN_Flare_Active_Reduce;
rtb_in_flare = 1;
PitchNormalLaw_B.flare_Theta_c_deg = -2.0;
PitchNormalLaw_B.flare_Theta_c_deg = 0.0;
} else if ((*rtu_In_in_flight == 1.0) && (*rtu_In_H_radio_ft > 50.0) && (rtb_ManualSwitch == 0.0)) {
PitchNormalLaw_DWork.is_c2_PitchNormalLaw = PitchNormalLaw_IN_Flight;
rtb_in_flare = 0;
Expand All @@ -1428,20 +1428,20 @@ void PitchNormalLaw::step(const real_T *rtu_In_time_dt, const real_T *rtu_In_nz_
if (*rtu_In_in_flight == 0.0) {
PitchNormalLaw_DWork.is_c2_PitchNormalLaw = PitchNormalLaw_IN_Ground;
rtb_in_flare = 0;
PitchNormalLaw_B.flare_Theta_c_deg = -2.0;
PitchNormalLaw_B.flare_Theta_c_rate_deg_s = -1000.0;
PitchNormalLaw_B.flare_Theta_c_deg = 0.0;
PitchNormalLaw_B.flare_Theta_c_rate_deg_s = 0.0;
} else if ((*rtu_In_in_flight == 1.0) && (*rtu_In_H_radio_ft > 50.0) && (rtb_ManualSwitch == 0.0)) {
PitchNormalLaw_DWork.is_c2_PitchNormalLaw = PitchNormalLaw_IN_Flight;
rtb_in_flare = 0;
} else {
rtb_in_flare = 1;
PitchNormalLaw_B.flare_Theta_c_deg = -2.0;
PitchNormalLaw_B.flare_Theta_c_deg = 0.0;
}
break;

case PitchNormalLaw_IN_Flare_Prepare:
if ((*rtu_In_H_radio_ft <= 50.0) || (rtb_ManualSwitch == 1.0)) {
PitchNormalLaw_B.flare_Theta_c_rate_deg_s = -(std::fmax(-2.0, rtb_Y_j) + 2.0) / 8.0;
PitchNormalLaw_B.flare_Theta_c_rate_deg_s = -1000.0;
PitchNormalLaw_DWork.is_c2_PitchNormalLaw = PitchNormalLaw_IN_Flare_Active_Armed;
rtb_in_flare = 1;
} else if ((*rtu_In_in_flight == 1.0) && (*rtu_In_H_radio_ft > 50.0) && (rtb_ManualSwitch == 0.0)) {
Expand All @@ -1454,8 +1454,8 @@ void PitchNormalLaw::step(const real_T *rtu_In_time_dt, const real_T *rtu_In_nz_

case PitchNormalLaw_IN_Flight:
if ((*rtu_In_H_radio_ft <= 50.0) || (rtb_ManualSwitch == 1.0)) {
PitchNormalLaw_B.flare_Theta_c_rate_deg_s = -1000.0;
PitchNormalLaw_B.flare_Theta_c_deg = rtb_Y_j;
PitchNormalLaw_B.flare_Theta_c_rate_deg_s = 0.0;
PitchNormalLaw_B.flare_Theta_c_deg = rtb_Y_cf;
PitchNormalLaw_DWork.is_c2_PitchNormalLaw = PitchNormalLaw_IN_Flare_Prepare;
rtb_in_flare = 0;
} else {
Expand All @@ -1469,8 +1469,8 @@ void PitchNormalLaw::step(const real_T *rtu_In_time_dt, const real_T *rtu_In_nz_
rtb_in_flare = 0;
} else {
rtb_in_flare = 0;
PitchNormalLaw_B.flare_Theta_c_deg = -2.0;
PitchNormalLaw_B.flare_Theta_c_rate_deg_s = -1000.0;
PitchNormalLaw_B.flare_Theta_c_deg = 0.0;
PitchNormalLaw_B.flare_Theta_c_rate_deg_s = 0.0;
}
break;
}
Expand Down

0 comments on commit 80f59e2

Please sign in to comment.