diff --git a/libraries/AP_TECS/AP_TECS.cpp b/libraries/AP_TECS/AP_TECS.cpp index 36542fcf63464b..db26212ab02048 100644 --- a/libraries/AP_TECS/AP_TECS.cpp +++ b/libraries/AP_TECS/AP_TECS.cpp @@ -552,18 +552,6 @@ void AP_TECS::_update_height_demand(void) _hgt_rate_dem = constrain_float(_hgt_rate_dem, -_sink_rate_limit, _climb_rate_limit); _hgt_dem = _hgt_dem_in_raw; - } else { - // set all height filter states to current height to prevent large pitch transients if flare is aborted - _hgt_dem_lpf = _height; - - if (!_flare_initialised) { - _hgt_at_start_of_flare = _hgt_afe; - _flare_initialised = true; - } - - // Go to pure sink rate control for flare. Sink rate is already constrained. - _hgt_dem = _height; - _hgt_rate_dem = -_sink_rate_limit; } } @@ -1093,7 +1081,6 @@ void AP_TECS::_initialise_states(int32_t ptchMinCO_cd, float hgt_afe) // misc variables used for alternative precision landing pitch control _hgt_afe = 0.0f; - _pitch_min_at_flare_entry = 0.0f; _max_climb_scaler = 1.0f; _max_sink_scaler = 1.0f; @@ -1219,16 +1206,7 @@ void AP_TECS::update_pitch_throttle(int32_t hgt_dem_cm, // calculate the expected pitch angle from the demanded climb rate and airspeed fo ruse during approach and flare if (_landing.is_flaring()) { - // smoothly move the min pitch to the required minimum at touchdown - float p; // 0 at start of flare, 1 at finish - if (!_flare_initialised) { - p = 0.0f; - } else if (_hgt_at_start_of_flare > _flare_holdoff_hgt) { - p = constrain_float((_hgt_at_start_of_flare - _hgt_afe) / _hgt_at_start_of_flare, 0.0f, 1.0f); - } else { - p = 1.0f; - } - const float pitch_limit_deg = (1.0f - p) * _pitch_min_at_flare_entry + p * 0.01f * _landing.get_pitch_cd(); + const float pitch_limit_deg = _landing.get_pitch_cd(); // in flare use min pitch from LAND_PITCH_DEG _PITCHminf = MAX(_PITCHminf, pitch_limit_deg); @@ -1243,10 +1221,6 @@ void AP_TECS::update_pitch_throttle(int32_t hgt_dem_cm, _THRminf = 0; } else if (_landing.is_on_approach()) { _PITCHminf = MAX(_PITCHminf, aparm.pitch_limit_min); - _pitch_min_at_flare_entry = _PITCHminf; - _flare_initialised = false; - } else { - _flare_initialised = false; } if (_landing.is_on_approach()) { diff --git a/libraries/AP_TECS/AP_TECS.h b/libraries/AP_TECS/AP_TECS.h index c2644050f4642e..2c6b8b670446cd 100644 --- a/libraries/AP_TECS/AP_TECS.h +++ b/libraries/AP_TECS/AP_TECS.h @@ -382,10 +382,7 @@ class AP_TECS { float _SKEdot; // variables used for precision landing pitch control - float _hgt_at_start_of_flare; - float _hgt_rate_at_flare_entry; float _hgt_afe; - float _pitch_min_at_flare_entry; // used to scale max climb and sink limits to match vehicle ability float _max_climb_scaler;