49 #include <px4_platform_common/px4_config.h> 50 #include <px4_platform_common/defines.h> 51 #include <px4_platform_common/module.h> 52 #include <px4_platform_common/module_params.h> 53 #include <px4_platform_common/module.h> 54 #include <px4_platform_common/module_params.h> 55 #include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp> 70 class LandDetector :
public ModuleBase<LandDetector>, ModuleParams, px4::ScheduledWorkItem
85 static int print_usage(
const char *reason =
nullptr);
95 static int task_spawn(
int argc,
char *argv[]);
102 virtual void _update_params();
107 virtual void _update_topics();
112 virtual bool _get_landed_state() = 0;
140 static constexpr uint32_t LAND_DETECTOR_UPDATE_INTERVAL = 20_ms;
155 .ground_contact =
true,
156 .maybe_landed =
true,
168 void _update_state();
170 void _update_total_flight_time();
172 bool _previous_armed_state{
false};
184 DEFINE_PARAMETERS_CUSTOM_PARENT(
186 (ParamInt<px4::params::LND_FLIGHT_T_HI>) _param_total_flight_time_high,
187 (ParamInt<px4::params::LND_FLIGHT_T_LO>) _param_total_flight_time_low
virtual float _get_max_altitude()
measure the time elapsed performing an event
static void print_usage()
#define ORB_ID(_name)
Generates a pointer to the uORB metadata structure for a given topic.
virtual bool _get_ground_contact_state()
static int custom_command(int argc, char *argv[])
__BEGIN_DECLS typedef uint64_t hrt_abstime
Absolute time, in microsecond units.
Hysteresis of a boolean value.
virtual bool _get_ground_effect_state()
virtual bool _get_maybe_landed_state()
virtual bool _get_freefall_state()
Performance measuring tools.