43 #include <matrix/math.hpp> 44 #include <lib/ecl/geo/geo.h> 46 #include <uORB/topics/landing_target_pose.h> 51 enum class PrecLandState {
61 enum class PrecLandMode {
72 void on_activation()
override;
73 void on_active()
override;
75 void set_mode(PrecLandMode mode) { _mode = mode; };
77 PrecLandMode get_mode() {
return _mode; };
81 void updateParams()
override;
84 void run_state_start();
85 void run_state_horizontal_approach();
86 void run_state_descend_above_target();
87 void run_state_final_approach();
88 void run_state_search();
89 void run_state_fallback();
92 bool switch_to_state_start();
93 bool switch_to_state_horizontal_approach();
94 bool switch_to_state_descend_above_target();
95 bool switch_to_state_final_approach();
96 bool switch_to_state_search();
97 bool switch_to_state_fallback();
98 bool switch_to_state_done();
101 bool check_state_conditions(PrecLandState state);
102 void slewrate(
float &sp_x,
float &sp_y);
104 landing_target_pose_s _target_pose{};
106 int _target_pose_sub{-1};
107 bool _target_pose_valid{
false};
108 bool _target_pose_updated{
false};
110 struct map_projection_reference_s _map_ref {};
112 uint64_t _state_start_time{0};
113 uint64_t _last_slewrate_time{0};
114 uint64_t _target_acquired_time{0};
115 uint64_t _point_reached_time{0};
118 float _approach_alt{0.0f};
120 matrix::Vector2f _sp_pev;
121 matrix::Vector2f _sp_pev_prev;
123 PrecLandState _state{PrecLandState::Start};
125 PrecLandMode _mode{PrecLandMode::Opportunistic};
139 float _param_acceleration_hor{0.0f};
140 float _param_xy_vel_cruise{0.0f};
#define PARAM_INVALID
Handle returned when a parameter cannot be found.
Definition: param.h:103
Definition: px4_param.h:313
Helper class to use mission items.
Definition: mission_block.h:56
Definition: navigator_main.cpp:80
Definition: px4_param.h:318
C++ base class for modules/classes using configuration parameters.
Definition: px4_module_params.h:46
Definition: precland.h:66
Definition: navigator.h:83
Base class for different modes in navigator.
uint32_t param_t
Parameter handle.
Definition: param.h:98