fw_tecs: Support tighter altitude tracking during low-height flight (#23519)

* fw_tecs: Support tighter altitude tracking during low-height flight. Added FW_T_THR_LOW_HGT defining low-height flight threshold

* tecs: Applied smoothed-out altitude TC transition to landings

* fw_tecs: modified tighter altitude control for low-height implementation

* addressed PR comments

* addressed PR comments

---------

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Alvaro Fernandez
2024-09-19 16:24:53 +03:00
committed by GitHub
co-authored by Silvan Fuhrer
parent 4d83badba1
commit 2ecffff700
5 changed files with 143 additions and 21 deletions
+8
View File
@@ -651,6 +651,14 @@ public:
float get_pitch_setpoint() {return _control.getPitchSetpoint();}
float get_throttle_setpoint() {return _control.getThrottleSetpoint();}
/**
* Returns the altitude tracking time constant
*/
float get_altitude_error_time_constant() const
{
return 1.0f / math::max(_control_param.altitude_error_gain, 0.01f);
}
uint64_t timestamp() { return _update_timestamp; }
float get_underspeed_ratio() { return _control.getRatioUndersped(); }