PX4 Firmware
PX4 Autopilot Software http://px4.io
land_detector::VtolLandDetector Class Reference

#include <VtolLandDetector.h>

Inheritance diagram for land_detector::VtolLandDetector:
Collaboration diagram for land_detector::VtolLandDetector:

Public Member Functions

 VtolLandDetector ()=default
 
 ~VtolLandDetector () override=default
 
- Public Member Functions inherited from land_detector::MulticopterLandDetector
 MulticopterLandDetector ()
 
 ~MulticopterLandDetector () 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

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

Private Member Functions

 DEFINE_PARAMETERS_CUSTOM_PARENT (MulticopterLandDetector,(ParamFloat< px4::params::LNDFW_AIRSPD_MAX >) _param_lndfw_airspd_max)
 

Private Attributes

uORB::Subscription _airspeed_sub {ORB_ID(airspeed)}
 
uORB::Subscription _vehicle_status_sub {ORB_ID(vehicle_status)}
 
airspeed_s _airspeed {}
 
vehicle_status_s _vehicle_status {}
 
bool _was_in_air {false}
 indicates whether the vehicle was in the air in the previous iteration More...
 
float _airspeed_filtered {0.0f}
 low pass filtered airspeed More...
 

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 52 of file VtolLandDetector.h.

Constructor & Destructor Documentation

◆ VtolLandDetector()

land_detector::VtolLandDetector::VtolLandDetector ( )
default

◆ ~VtolLandDetector()

land_detector::VtolLandDetector::~VtolLandDetector ( )
overridedefault

Member Function Documentation

◆ _get_landed_state()

bool land_detector::VtolLandDetector::_get_landed_state ( )
overrideprotectedvirtual
Returns
true if UAV is in a landed state.

Reimplemented from land_detector::MulticopterLandDetector.

Definition at line 66 of file VtolLandDetector.cpp.

References land_detector::LandDetector::_actuator_armed, _airspeed, _airspeed_filtered, land_detector::MulticopterLandDetector::_get_landed_state(), _vehicle_status, _was_in_air, actuator_armed_s::armed, airspeed_s::confidence, hrt_elapsed_time(), airspeed_s::indicated_airspeed_m_s, airspeed_s::timestamp, vehicle_status_s::timestamp, vehicle_status_s::vehicle_type, and VEHICLE_TYPE_FIXED_WING.

Here is the call graph for this function:

◆ _get_maybe_landed_state()

bool land_detector::VtolLandDetector::_get_maybe_landed_state ( )
overrideprotectedvirtual
Returns
true if UAV is in almost landed state

Reimplemented from land_detector::MulticopterLandDetector.

Definition at line 56 of file VtolLandDetector.cpp.

References land_detector::LandDetector::_actuator_armed, land_detector::MulticopterLandDetector::_get_maybe_landed_state(), _vehicle_status, actuator_armed_s::armed, vehicle_status_s::timestamp, vehicle_status_s::vehicle_type, and VEHICLE_TYPE_FIXED_WING.

Here is the call graph for this function:

◆ _update_topics()

void land_detector::VtolLandDetector::_update_topics ( )
overrideprotectedvirtual

Updates subscribed uORB topics.

Reimplemented from land_detector::MulticopterLandDetector.

Definition at line 49 of file VtolLandDetector.cpp.

References _airspeed, _airspeed_sub, land_detector::MulticopterLandDetector::_update_topics(), _vehicle_status, _vehicle_status_sub, and uORB::Subscription::update().

Here is the call graph for this function:

◆ DEFINE_PARAMETERS_CUSTOM_PARENT()

land_detector::VtolLandDetector::DEFINE_PARAMETERS_CUSTOM_PARENT ( MulticopterLandDetector  ,
(ParamFloat< px4::params::LNDFW_AIRSPD_MAX >)  _param_lndfw_airspd_max 
)
private

Member Data Documentation

◆ _airspeed

airspeed_s land_detector::VtolLandDetector::_airspeed {}
private

Definition at line 68 of file VtolLandDetector.h.

Referenced by _get_landed_state(), and _update_topics().

◆ _airspeed_filtered

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

low pass filtered airspeed

Definition at line 72 of file VtolLandDetector.h.

Referenced by _get_landed_state().

◆ _airspeed_sub

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

Definition at line 65 of file VtolLandDetector.h.

Referenced by _update_topics().

◆ _vehicle_status

vehicle_status_s land_detector::VtolLandDetector::_vehicle_status {}
private

Definition at line 69 of file VtolLandDetector.h.

Referenced by _get_landed_state(), _get_maybe_landed_state(), and _update_topics().

◆ _vehicle_status_sub

uORB::Subscription land_detector::VtolLandDetector::_vehicle_status_sub {ORB_ID(vehicle_status)}
private

Definition at line 66 of file VtolLandDetector.h.

Referenced by _update_topics().

◆ _was_in_air

bool land_detector::VtolLandDetector::_was_in_air {false}
private

indicates whether the vehicle was in the air in the previous iteration

Definition at line 71 of file VtolLandDetector.h.

Referenced by _get_landed_state().


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