APM:Libraries
Public Member Functions | Private Member Functions | Private Attributes | List of all members
AP_Proximity_SITL Class Reference

#include <AP_Proximity_SITL.h>

Inheritance diagram for AP_Proximity_SITL:
[legend]
Collaboration diagram for AP_Proximity_SITL:
[legend]

Public Member Functions

 AP_Proximity_SITL (AP_Proximity &_frontend, AP_Proximity::Proximity_State &_state)
 
void update (void) override
 
float distance_max () const
 
float distance_min () const
 
bool get_upward_distance (float &distance) const
 
- Public Member Functions inherited from AP_Proximity_Backend
 AP_Proximity_Backend (AP_Proximity &_frontend, AP_Proximity::Proximity_State &_state)
 
virtual ~AP_Proximity_Backend (void)
 
virtual void handle_msg (mavlink_message_t *msg)
 
bool get_horizontal_distance (float angle_deg, float &distance) const
 
const Vector2fget_boundary_points (uint16_t &num_points) const
 
bool get_closest_object (float &angle_deg, float &distance) const
 
uint8_t get_object_count () const
 
bool get_object_angle_and_distance (uint8_t object_number, float &angle_deg, float &distance) const
 
bool get_horizontal_distances (AP_Proximity::Proximity_Distance_Array &prx_dist_array) const
 

Private Member Functions

void load_fence (void)
 
bool get_distance_to_fence (float angle_deg, float &distance) const
 

Private Attributes

SITL::SITLsitl
 
Vector2lfence
 
AP_Int8 * fence_count
 
AP_Float * fence_alt_max
 
uint32_t last_load_ms
 
AC_PolyFence_loader fence_loader
 
Location current_loc
 
uint8_t last_sector
 

Additional Inherited Members

- Protected Member Functions inherited from AP_Proximity_Backend
void set_status (AP_Proximity::Proximity_Status status)
 
bool convert_angle_to_sector (float angle_degrees, uint8_t &sector) const
 
void init_boundary ()
 
void update_boundary_for_sector (uint8_t sector)
 
uint8_t get_ignore_area_count () const
 
bool get_ignore_area (uint8_t index, uint16_t &angle_deg, uint8_t &width_deg) const
 
bool get_next_ignore_start_or_end (uint8_t start_or_end, int16_t start_angle, int16_t &ignore_start) const
 
- Protected Attributes inherited from AP_Proximity_Backend
AP_Proximityfrontend
 
AP_Proximity::Proximity_Statestate
 
uint8_t _num_sectors = PROXIMITY_MAX_DIRECTION
 
uint16_t _sector_middle_deg [PROXIMITY_SECTORS_MAX] = {0, 45, 90, 135, 180, 225, 270, 315, 0, 0, 0, 0}
 
uint8_t _sector_width_deg [PROXIMITY_SECTORS_MAX] = {45, 45, 45, 45, 45, 45, 45, 45, 0, 0, 0, 0}
 
float _angle [PROXIMITY_SECTORS_MAX]
 
float _distance [PROXIMITY_SECTORS_MAX]
 
bool _distance_valid [PROXIMITY_SECTORS_MAX]
 
Vector2f _sector_edge_vector [PROXIMITY_SECTORS_MAX]
 
Vector2f _boundary_point [PROXIMITY_SECTORS_MAX]
 

Detailed Description

Definition at line 9 of file AP_Proximity_SITL.h.

Constructor & Destructor Documentation

◆ AP_Proximity_SITL()

AP_Proximity_SITL::AP_Proximity_SITL ( AP_Proximity _frontend,
AP_Proximity::Proximity_State _state 
)

Definition at line 31 of file AP_Proximity_SITL.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ distance_max()

float AP_Proximity_SITL::distance_max ( ) const
virtual

Implements AP_Proximity_Backend.

Definition at line 123 of file AP_Proximity_SITL.cpp.

◆ distance_min()

float AP_Proximity_SITL::distance_min ( ) const
virtual

Implements AP_Proximity_Backend.

Definition at line 127 of file AP_Proximity_SITL.cpp.

◆ get_distance_to_fence()

bool AP_Proximity_SITL::get_distance_to_fence ( float  angle_deg,
float &  distance 
) const
private

Definition at line 93 of file AP_Proximity_SITL.cpp.

Referenced by update().

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

◆ get_upward_distance()

bool AP_Proximity_SITL::get_upward_distance ( float &  distance) const
virtual

Reimplemented from AP_Proximity_Backend.

Definition at line 133 of file AP_Proximity_SITL.cpp.

Here is the call graph for this function:

◆ load_fence()

void AP_Proximity_SITL::load_fence ( void  )
private

Definition at line 73 of file AP_Proximity_SITL.cpp.

Referenced by update().

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

◆ update()

void AP_Proximity_SITL::update ( void  )
overridevirtual

Implements AP_Proximity_Backend.

Definition at line 48 of file AP_Proximity_SITL.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ current_loc

Location AP_Proximity_SITL::current_loc
private

Definition at line 33 of file AP_Proximity_SITL.h.

Referenced by get_distance_to_fence(), and update().

◆ fence

Vector2l* AP_Proximity_SITL::fence
private

Definition at line 28 of file AP_Proximity_SITL.h.

Referenced by get_distance_to_fence(), load_fence(), and update().

◆ fence_alt_max

AP_Float* AP_Proximity_SITL::fence_alt_max
private

Definition at line 30 of file AP_Proximity_SITL.h.

Referenced by AP_Proximity_SITL(), and get_upward_distance().

◆ fence_count

AP_Int8* AP_Proximity_SITL::fence_count
private

Definition at line 29 of file AP_Proximity_SITL.h.

Referenced by AP_Proximity_SITL(), get_distance_to_fence(), load_fence(), and update().

◆ fence_loader

AC_PolyFence_loader AP_Proximity_SITL::fence_loader
private

Definition at line 32 of file AP_Proximity_SITL.h.

Referenced by get_distance_to_fence(), load_fence(), and update().

◆ last_load_ms

uint32_t AP_Proximity_SITL::last_load_ms
private

Definition at line 31 of file AP_Proximity_SITL.h.

Referenced by load_fence().

◆ last_sector

uint8_t AP_Proximity_SITL::last_sector
private

Definition at line 36 of file AP_Proximity_SITL.h.

Referenced by update().

◆ sitl

SITL::SITL* AP_Proximity_SITL::sitl
private

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