APM:Libraries
Classes | Public Types | Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
AC_PrecLand Class Reference

#include <AC_PrecLand.h>

Collaboration diagram for AC_PrecLand:
[legend]

Classes

struct  inertial_data_frame_s
 
struct  precland_state
 

Public Types

enum  PrecLandBehaviour { PRECLAND_BEHAVIOUR_DISABLED, PRECLAND_BEHAVIOR_ALWAYSLAND, PRECLAND_BEHAVIOR_CAUTIOUS }
 
enum  PrecLandType {
  PRECLAND_TYPE_NONE = 0, PRECLAND_TYPE_COMPANION, PRECLAND_TYPE_IRLOCK, PRECLAND_TYPE_SITL_GAZEBO,
  PRECLAND_TYPE_SITL
}
 

Public Member Functions

 AC_PrecLand (const AP_AHRS_NavEKF &ahrs)
 
 AC_PrecLand (const AC_PrecLand &other)=delete
 
AC_PrecLandoperator= (const AC_PrecLand &)=delete
 
void init ()
 
bool healthy () const
 
bool enabled () const
 
uint32_t last_update_ms () const
 
void update (float rangefinder_alt_cm, bool rangefinder_alt_valid)
 
bool get_target_position_cm (Vector2f &ret)
 
bool get_target_position_relative_cm (Vector2f &ret)
 
bool get_target_velocity_relative_cms (Vector2f &ret)
 
bool target_acquired ()
 
void handle_msg (mavlink_message_t *msg)
 

Static Public Attributes

static const struct AP_Param::GroupInfo var_info []
 

Private Types

enum  estimator_type_t { ESTIMATOR_TYPE_RAW_SENSOR = 0, ESTIMATOR_TYPE_KALMAN_FILTER = 1 }
 

Private Member Functions

enum PrecLandBehaviour get_behaviour () const
 
void run_estimator (float rangefinder_alt_m, bool rangefinder_alt_valid)
 
bool construct_pos_meas_using_rangefinder (float rangefinder_alt_m, bool rangefinder_alt_valid)
 
bool retrieve_los_meas (Vector3f &target_vec_unit_body)
 
void run_output_prediction ()
 

Private Attributes

const AP_AHRS_NavEKF_ahrs
 
AP_Int8 _enabled
 
AP_Int8 _type
 
AP_Int8 _bus
 
AP_Int8 _estimator_type
 
AP_Float _yaw_align
 
AP_Float _land_ofs_cm_x
 
AP_Float _land_ofs_cm_y
 
AP_Float _accel_noise
 
AP_Vector3f _cam_offset
 
uint32_t _last_update_ms
 
bool _target_acquired
 
uint32_t _last_backend_los_meas_ms
 
PosVelEKF _ekf_x
 
PosVelEKF _ekf_y
 
uint32_t _outlier_reject_count
 
Vector3f _target_pos_rel_meas_NED
 
Vector2f _target_pos_rel_est_NE
 
Vector2f _target_vel_rel_est_NE
 
Vector2f _target_pos_rel_out_NE
 
Vector2f _target_vel_rel_out_NE
 
AP_Buffer< inertial_data_frame_s, 8 > _inertial_history
 
struct AC_PrecLand::precland_state _backend_state
 
AC_PrecLand_Backend_backend
 

Friends

class AC_PrecLand_Backend
 
class AC_PrecLand_Companion
 
class AC_PrecLand_IRLock
 
class AC_PrecLand_SITL_Gazebo
 
class AC_PrecLand_SITL
 

Detailed Description

Definition at line 18 of file AC_PrecLand.h.

Member Enumeration Documentation

◆ estimator_type_t

Enumerator
ESTIMATOR_TYPE_RAW_SENSOR 
ESTIMATOR_TYPE_KALMAN_FILTER 

Definition at line 84 of file AC_PrecLand.h.

◆ PrecLandBehaviour

Enumerator
PRECLAND_BEHAVIOUR_DISABLED 
PRECLAND_BEHAVIOR_ALWAYSLAND 
PRECLAND_BEHAVIOR_CAUTIOUS 

Definition at line 35 of file AC_PrecLand.h.

◆ PrecLandType

Enumerator
PRECLAND_TYPE_NONE 
PRECLAND_TYPE_COMPANION 
PRECLAND_TYPE_IRLOCK 
PRECLAND_TYPE_SITL_GAZEBO 
PRECLAND_TYPE_SITL 

Definition at line 42 of file AC_PrecLand.h.

Constructor & Destructor Documentation

◆ AC_PrecLand() [1/2]

AC_PrecLand::AC_PrecLand ( const AP_AHRS_NavEKF ahrs)

Definition at line 100 of file AC_PrecLand.cpp.

Here is the call graph for this function:

◆ AC_PrecLand() [2/2]

AC_PrecLand::AC_PrecLand ( const AC_PrecLand other)
delete

Member Function Documentation

◆ construct_pos_meas_using_rangefinder()

bool AC_PrecLand::construct_pos_meas_using_rangefinder ( float  rangefinder_alt_m,
bool  rangefinder_alt_valid 
)
private

Definition at line 348 of file AC_PrecLand.cpp.

Referenced by get_behaviour(), and run_estimator().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enabled()

bool AC_PrecLand::enabled ( ) const
inline

Definition at line 57 of file AC_PrecLand.h.

◆ get_behaviour()

enum PrecLandBehaviour AC_PrecLand::get_behaviour ( ) const
inlineprivate

Definition at line 90 of file AC_PrecLand.h.

Here is the call graph for this function:

◆ get_target_position_cm()

bool AC_PrecLand::get_target_position_cm ( Vector2f ret)

Definition at line 188 of file AC_PrecLand.cpp.

Referenced by last_update_ms().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_target_position_relative_cm()

bool AC_PrecLand::get_target_position_relative_cm ( Vector2f ret)

Definition at line 202 of file AC_PrecLand.cpp.

Referenced by last_update_ms().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_target_velocity_relative_cms()

bool AC_PrecLand::get_target_velocity_relative_cms ( Vector2f ret)

Definition at line 211 of file AC_PrecLand.cpp.

Referenced by last_update_ms().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ handle_msg()

void AC_PrecLand::handle_msg ( mavlink_message_t *  msg)

Definition at line 221 of file AC_PrecLand.cpp.

Referenced by last_update_ms().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ healthy()

bool AC_PrecLand::healthy ( ) const
inline

Definition at line 54 of file AC_PrecLand.h.

◆ init()

void AC_PrecLand::init ( )

Definition at line 115 of file AC_PrecLand.cpp.

Here is the call graph for this function:

◆ last_update_ms()

uint32_t AC_PrecLand::last_update_ms ( ) const
inline

Definition at line 60 of file AC_PrecLand.h.

Here is the call graph for this function:

◆ operator=()

AC_PrecLand& AC_PrecLand::operator= ( const AC_PrecLand )
delete

◆ retrieve_los_meas()

bool AC_PrecLand::retrieve_los_meas ( Vector3f target_vec_unit_body)
private

Definition at line 326 of file AC_PrecLand.cpp.

Referenced by construct_pos_meas_using_rangefinder(), and get_behaviour().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run_estimator()

void AC_PrecLand::run_estimator ( float  rangefinder_alt_m,
bool  rangefinder_alt_valid 
)
private

Definition at line 233 of file AC_PrecLand.cpp.

Referenced by get_behaviour(), and update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run_output_prediction()

void AC_PrecLand::run_output_prediction ( )
private

Definition at line 379 of file AC_PrecLand.cpp.

Referenced by get_behaviour(), and run_estimator().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ target_acquired()

bool AC_PrecLand::target_acquired ( )

Definition at line 182 of file AC_PrecLand.cpp.

Referenced by get_target_position_cm(), get_target_position_relative_cm(), get_target_velocity_relative_cms(), last_update_ms(), and run_estimator().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void AC_PrecLand::update ( float  rangefinder_alt_cm,
bool  rangefinder_alt_valid 
)

Definition at line 157 of file AC_PrecLand.cpp.

Referenced by last_update_ms().

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ AC_PrecLand_Backend

friend class AC_PrecLand_Backend
friend

Definition at line 21 of file AC_PrecLand.h.

◆ AC_PrecLand_Companion

friend class AC_PrecLand_Companion
friend

Definition at line 22 of file AC_PrecLand.h.

Referenced by init().

◆ AC_PrecLand_IRLock

friend class AC_PrecLand_IRLock
friend

Definition at line 23 of file AC_PrecLand.h.

Referenced by init().

◆ AC_PrecLand_SITL

friend class AC_PrecLand_SITL
friend

Definition at line 25 of file AC_PrecLand.h.

Referenced by init().

◆ AC_PrecLand_SITL_Gazebo

friend class AC_PrecLand_SITL_Gazebo
friend

Definition at line 24 of file AC_PrecLand.h.

Referenced by init().

Member Data Documentation

◆ _accel_noise

AP_Float AC_PrecLand::_accel_noise
private

Definition at line 116 of file AC_PrecLand.h.

Referenced by run_estimator().

◆ _ahrs

const AP_AHRS_NavEKF& AC_PrecLand::_ahrs
private

◆ _backend

AC_PrecLand_Backend* AC_PrecLand::_backend
private

◆ _backend_state

struct AC_PrecLand::precland_state AC_PrecLand::_backend_state
private

Referenced by AC_PrecLand(), healthy(), and init().

◆ _bus

AP_Int8 AC_PrecLand::_bus
private

Definition at line 111 of file AC_PrecLand.h.

Referenced by AC_PrecLand_Backend::get_bus().

◆ _cam_offset

AP_Vector3f AC_PrecLand::_cam_offset
private

Definition at line 117 of file AC_PrecLand.h.

Referenced by construct_pos_meas_using_rangefinder(), and run_output_prediction().

◆ _ekf_x

PosVelEKF AC_PrecLand::_ekf_x
private

Definition at line 123 of file AC_PrecLand.h.

Referenced by run_estimator().

◆ _ekf_y

PosVelEKF AC_PrecLand::_ekf_y
private

Definition at line 123 of file AC_PrecLand.h.

Referenced by run_estimator().

◆ _enabled

AP_Int8 AC_PrecLand::_enabled
private

Definition at line 109 of file AC_PrecLand.h.

Referenced by enabled(), get_behaviour(), and update().

◆ _estimator_type

AP_Int8 AC_PrecLand::_estimator_type
private

Definition at line 112 of file AC_PrecLand.h.

Referenced by run_estimator().

◆ _inertial_history

AP_Buffer<inertial_data_frame_s,8> AC_PrecLand::_inertial_history
private

◆ _land_ofs_cm_x

AP_Float AC_PrecLand::_land_ofs_cm_x
private

Definition at line 114 of file AC_PrecLand.h.

Referenced by run_output_prediction().

◆ _land_ofs_cm_y

AP_Float AC_PrecLand::_land_ofs_cm_y
private

Definition at line 115 of file AC_PrecLand.h.

Referenced by run_output_prediction().

◆ _last_backend_los_meas_ms

uint32_t AC_PrecLand::_last_backend_los_meas_ms
private

Definition at line 121 of file AC_PrecLand.h.

Referenced by retrieve_los_meas().

◆ _last_update_ms

uint32_t AC_PrecLand::_last_update_ms
private

Definition at line 119 of file AC_PrecLand.h.

Referenced by last_update_ms(), run_estimator(), and target_acquired().

◆ _outlier_reject_count

uint32_t AC_PrecLand::_outlier_reject_count
private

Definition at line 124 of file AC_PrecLand.h.

Referenced by run_estimator().

◆ _target_acquired

bool AC_PrecLand::_target_acquired
private

Definition at line 120 of file AC_PrecLand.h.

Referenced by run_estimator(), and target_acquired().

◆ _target_pos_rel_est_NE

Vector2f AC_PrecLand::_target_pos_rel_est_NE
private

Definition at line 128 of file AC_PrecLand.h.

Referenced by run_estimator(), and run_output_prediction().

◆ _target_pos_rel_meas_NED

Vector3f AC_PrecLand::_target_pos_rel_meas_NED
private

Definition at line 126 of file AC_PrecLand.h.

Referenced by construct_pos_meas_using_rangefinder(), and run_estimator().

◆ _target_pos_rel_out_NE

Vector2f AC_PrecLand::_target_pos_rel_out_NE
private

◆ _target_vel_rel_est_NE

Vector2f AC_PrecLand::_target_vel_rel_est_NE
private

Definition at line 129 of file AC_PrecLand.h.

Referenced by run_estimator(), and run_output_prediction().

◆ _target_vel_rel_out_NE

Vector2f AC_PrecLand::_target_vel_rel_out_NE
private

Definition at line 132 of file AC_PrecLand.h.

Referenced by get_target_velocity_relative_cms(), and run_output_prediction().

◆ _type

AP_Int8 AC_PrecLand::_type
private

Definition at line 110 of file AC_PrecLand.h.

Referenced by init().

◆ _yaw_align

AP_Float AC_PrecLand::_yaw_align
private

Definition at line 113 of file AC_PrecLand.h.

Referenced by retrieve_los_meas().

◆ var_info

const AP_Param::GroupInfo AC_PrecLand::var_info
static

Definition at line 81 of file AC_PrecLand.h.

Referenced by AC_PrecLand().


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