FW move altitude first order hold (FOH) and loiter to position special cases from navigator to position controller

Co-authored-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
Daniel Agar
2020-10-06 16:57:12 -04:00
committed by GitHub
co-authored by RomanBapst
parent 9838e340e0
commit c01fabaf11
7 changed files with 125 additions and 218 deletions
@@ -194,6 +194,8 @@ private:
float _althold_epv{0.0f}; ///< the position estimate accuracy when engaging alt hold
bool _was_in_deadband{false}; ///< wether the last stick input was in althold deadband
float _min_current_sp_distance_xy{FLT_MAX};
position_setpoint_s _hdg_hold_prev_wp {}; ///< position where heading hold started
position_setpoint_s _hdg_hold_curr_wp {}; ///< position to which heading hold flies
@@ -262,6 +264,7 @@ private:
ECL_L1_Pos_Controller _l1_control;
TECS _tecs;
uint8_t _type{0};
enum FW_POSCTRL_MODE {
FW_POSCTRL_MODE_AUTO,
FW_POSCTRL_MODE_POSITION,