FixedWingPositionControl: push altitude setpoint locking into TECS

Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
RomanBapst
2021-11-05 18:04:33 +01:00
committed by Silvan Fuhrer
parent 296db60a58
commit 6e75b7cffd
2 changed files with 43 additions and 74 deletions
@@ -176,14 +176,10 @@ private:
map_projection_reference_s _global_local_proj_ref{};
float _global_local_alt0{NAN};
float _hold_alt{0.0f}; ///< hold altitude for altitude mode
float _manual_height_rate_setpoint_m_s{NAN};
float _takeoff_ground_alt{0.0f}; ///< ground altitude at which plane was launched
float _hdg_hold_yaw{0.0f}; ///< hold heading for velocity mode
bool _hdg_hold_enabled{false}; ///< heading hold enabled
bool _yaw_lock_engaged{false}; ///< yaw is locked for heading hold
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};
@@ -309,6 +305,8 @@ private:
*/
float get_terrain_altitude_takeoff(float takeoff_alt);
float getManualHeightRateSetpoint();
/**
* Check if we are in a takeoff situation
*/