PX4 Firmware
PX4 Autopilot Software http://px4.io
land_detector::FixedwingLandDetector Class Referencefinal

#include <FixedwingLandDetector.h>

Inheritance diagram for land_detector::FixedwingLandDetector:
Collaboration diagram for land_detector::FixedwingLandDetector:

Public Member Functions

 FixedwingLandDetector ()
 
 ~FixedwingLandDetector () override=default
 
- Public Member Functions inherited from land_detector::LandDetector
 LandDetector ()
 
virtual ~LandDetector ()
 
int print_status () override
 
void start ()
 Get the work queue going. More...
 

Protected Member Functions

bool _get_landed_state () override
 
void _update_topics () override
 Updates subscribed uORB topics. More...
 
- Protected Member Functions inherited from land_detector::LandDetector
virtual void _update_params ()
 Updates parameters. More...
 
virtual bool _get_maybe_landed_state ()
 
virtual bool _get_ground_contact_state ()
 
virtual bool _get_freefall_state ()
 
virtual float _get_max_altitude ()
 
virtual bool _get_ground_effect_state ()
 

Private Member Functions

 DEFINE_PARAMETERS_CUSTOM_PARENT (LandDetector,(ParamFloat< px4::params::LNDFW_XYACC_MAX >) _param_lndfw_xyaccel_max,(ParamFloat< px4::params::LNDFW_AIRSPD_MAX >) _param_lndfw_airspd,(ParamFloat< px4::params::LNDFW_VEL_XY_MAX >) _param_lndfw_vel_xy_max,(ParamFloat< px4::params::LNDFW_VEL_Z_MAX >) _param_lndfw_vel_z_max)
 

Private Attributes

uORB::Subscription _airspeed_sub {ORB_ID(airspeed)}
 
airspeed_s _airspeed {}
 
float _airspeed_filtered {0.0f}
 
float _velocity_xy_filtered {0.0f}
 
float _velocity_z_filtered {0.0f}
 
float _xy_accel_filtered {0.0f}
 

Static Private Attributes

static constexpr hrt_abstime LANDED_TRIGGER_TIME_US = 2_s
 Time in us that landing conditions have to hold before triggering a land. More...
 
static constexpr hrt_abstime FLYING_TRIGGER_TIME_US = 0_us
 

Additional Inherited Members

- Static Public Member Functions inherited from land_detector::LandDetector
static int custom_command (int argc, char *argv[])
 
static int print_usage (const char *reason=nullptr)
 
static int task_spawn (int argc, char *argv[])
 
- Protected Attributes inherited from land_detector::LandDetector
systemlib::Hysteresis _freefall_hysteresis {false}
 
systemlib::Hysteresis _landed_hysteresis {true}
 
systemlib::Hysteresis _maybe_landed_hysteresis {true}
 
systemlib::Hysteresis _ground_contact_hysteresis {true}
 
systemlib::Hysteresis _ground_effect_hysteresis {false}
 
actuator_armed_s _actuator_armed {}
 
vehicle_acceleration_s _vehicle_acceleration {}
 
vehicle_land_detected_s _land_detected
 
vehicle_local_position_s _vehicle_local_position {}
 
uORB::Publication< vehicle_land_detected_s_vehicle_land_detected_pub {ORB_ID(vehicle_land_detected)}
 
- Static Protected Attributes inherited from land_detector::LandDetector
static constexpr uint32_t LAND_DETECTOR_UPDATE_INTERVAL = 20_ms
 Run main land detector loop at this interval. More...
 

Detailed Description

Definition at line 55 of file FixedwingLandDetector.h.

Constructor & Destructor Documentation

◆ FixedwingLandDetector()

land_detector::FixedwingLandDetector::FixedwingLandDetector ( )

Definition at line 47 of file FixedwingLandDetector.cpp.

References land_detector::LandDetector::_landed_hysteresis, FLYING_TRIGGER_TIME_US, LANDED_TRIGGER_TIME_US, and systemlib::Hysteresis::set_hysteresis_time_from().

Here is the call graph for this function:

◆ ~FixedwingLandDetector()

land_detector::FixedwingLandDetector::~FixedwingLandDetector ( )
overridedefault

Member Function Documentation

◆ _get_landed_state()

bool land_detector::FixedwingLandDetector::_get_landed_state ( )
overrideprotectedvirtual

◆ _update_topics()

void land_detector::FixedwingLandDetector::_update_topics ( )
overrideprotectedvirtual

Updates subscribed uORB topics.

Reimplemented from land_detector::LandDetector.

Definition at line 54 of file FixedwingLandDetector.cpp.

References _airspeed, _airspeed_sub, land_detector::LandDetector::_update_topics(), and uORB::Subscription::update().

Here is the call graph for this function:

◆ DEFINE_PARAMETERS_CUSTOM_PARENT()

land_detector::FixedwingLandDetector::DEFINE_PARAMETERS_CUSTOM_PARENT ( LandDetector  ,
(ParamFloat< px4::params::LNDFW_XYACC_MAX >)  _param_lndfw_xyaccel_max,
(ParamFloat< px4::params::LNDFW_AIRSPD_MAX >)  _param_lndfw_airspd,
(ParamFloat< px4::params::LNDFW_VEL_XY_MAX >)  _param_lndfw_vel_xy_max,
(ParamFloat< px4::params::LNDFW_VEL_Z_MAX >)  _param_lndfw_vel_z_max 
)
private

Member Data Documentation

◆ _airspeed

airspeed_s land_detector::FixedwingLandDetector::_airspeed {}
private

Definition at line 74 of file FixedwingLandDetector.h.

Referenced by _get_landed_state(), and _update_topics().

◆ _airspeed_filtered

float land_detector::FixedwingLandDetector::_airspeed_filtered {0.0f}
private

Definition at line 76 of file FixedwingLandDetector.h.

Referenced by _get_landed_state().

◆ _airspeed_sub

uORB::Subscription land_detector::FixedwingLandDetector::_airspeed_sub {ORB_ID(airspeed)}
private

Definition at line 72 of file FixedwingLandDetector.h.

Referenced by _update_topics().

◆ _velocity_xy_filtered

float land_detector::FixedwingLandDetector::_velocity_xy_filtered {0.0f}
private

Definition at line 77 of file FixedwingLandDetector.h.

Referenced by _get_landed_state().

◆ _velocity_z_filtered

float land_detector::FixedwingLandDetector::_velocity_z_filtered {0.0f}
private

Definition at line 78 of file FixedwingLandDetector.h.

Referenced by _get_landed_state().

◆ _xy_accel_filtered

float land_detector::FixedwingLandDetector::_xy_accel_filtered {0.0f}
private

Definition at line 79 of file FixedwingLandDetector.h.

Referenced by _get_landed_state().

◆ FLYING_TRIGGER_TIME_US

constexpr hrt_abstime land_detector::FixedwingLandDetector::FLYING_TRIGGER_TIME_US = 0_us
staticprivate

Definition at line 70 of file FixedwingLandDetector.h.

Referenced by FixedwingLandDetector().

◆ LANDED_TRIGGER_TIME_US

constexpr hrt_abstime land_detector::FixedwingLandDetector::LANDED_TRIGGER_TIME_US = 2_s
staticprivate

Time in us that landing conditions have to hold before triggering a land.

Definition at line 69 of file FixedwingLandDetector.h.

Referenced by FixedwingLandDetector().


The documentation for this class was generated from the following files: