@ -67,14 +67,10 @@ class PrecLand : public MissionBlock, public ModuleParams
@@ -67,14 +67,10 @@ class PrecLand : public MissionBlock, public ModuleParams
{
public :
PrecLand ( Navigator * navigator ) ;
~ PrecLand ( ) override = default ;
~ PrecLand ( ) = default ;
virtual void on_inactive ( ) ;
virtual void on_activation ( ) ;
virtual void on_active ( ) ;
void on_activation ( ) override ;
void on_active ( ) override ;
void set_mode ( PrecLandMode mode ) { _mode = mode ; } ;
@ -103,22 +99,26 @@ private:
@@ -103,22 +99,26 @@ private:
void slewrate ( float & sp_x , float & sp_y ) ;
landing_target_pose_s _target_pose { } ; /**< precision landing target position */
int _targetPoseSub ;
bool _target_pose_valid ; /**< wether we have received a landing target position message */
int _targetPoseSub { - 1 } ;
bool _target_pose_valid { false } ; /**< wether we have received a landing target position message */
struct map_projection_reference_s _map_ref { } ; /**< reference for local/global projections */
uint64_t _state_start_time ; /**< time when we entered current state */
uint64_t _last_slewrate_time ; /**< time when we last limited setpoint changes */
uint64_t _target_acquired_time ; /**< time when we first saw the landing target during search */
uint64_t _point_reached_time ; /**< time when we reached a setpoint */
int _search_cnt ; /**< counter of how many times we had to search for the landing target */
float _approach_alt ; /**< altitude at which to stay during horizontal approach */
uint64_t _state_start_time { 0 } ; /**< time when we entered current state */
uint64_t _last_slewrate_time { 0 } ; /**< time when we last limited setpoint changes */
uint64_t _target_acquired_time { 0 } ; /**< time when we first saw the landing target during search */
uint64_t _point_reached_time { 0 } ; /**< time when we reached a setpoint */
int _search_cnt { 0 } ; /**< counter of how many times we had to search for the landing target */
float _approach_alt { 0.0f } ; /**< altitude at which to stay during horizontal approach */
matrix : : Vector2f _sp_pev ;
matrix : : Vector2f _sp_pev_prev ;
PrecLandState _state ;
PrecLandState _state { PrecLandState : : Start } ;
PrecLandMode _mode ;
PrecLandMode _mode { PrecLandMode : : Opportunistic } ;
DEFINE_PARAMETERS (
( ParamFloat < px4 : : params : : PLD_BTOUT > ) _param_timeout ,