APM:Libraries
|
#include <AP_Beacon.h>
Classes | |
struct | BeaconState |
Public Types | |
enum | AP_BeaconType { AP_BeaconType_None = 0, AP_BeaconType_Pozyx = 1, AP_BeaconType_Marvelmind = 2, AP_BeaconType_SITL = 10 } |
Public Member Functions | |
AP_Beacon (AP_SerialManager &_serial_manager) | |
void | init (void) |
bool | enabled (void) |
bool | healthy (void) |
void | update (void) |
bool | get_origin (Location &origin_loc) const |
bool | get_vehicle_position_ned (Vector3f &pos, float &accuracy_estimate) const |
uint8_t | count () const |
bool | get_beacon_data (uint8_t beacon_instance, struct BeaconState &state) const |
uint8_t | beacon_id (uint8_t beacon_instance) const |
bool | beacon_healthy (uint8_t beacon_instance) const |
float | beacon_distance (uint8_t beacon_instance) const |
Vector3f | beacon_position (uint8_t beacon_instance) const |
uint32_t | beacon_last_update_ms (uint8_t beacon_instance) const |
void | update_boundary_points () |
const Vector2f * | get_boundary_points (uint16_t &num_points) const |
Static Public Attributes | |
static const struct AP_Param::GroupInfo | var_info [] |
Private Member Functions | |
bool | device_ready (void) const |
Static Private Member Functions | |
static bool | get_next_boundary_point (const Vector2f *boundary, uint8_t num_points, uint8_t current_index, float start_angle, uint8_t &next_index, float &next_angle) |
Private Attributes | |
AP_Int8 | _type |
AP_Float | origin_lat |
AP_Float | origin_lon |
AP_Float | origin_alt |
AP_Int16 | orient_yaw |
AP_Beacon_Backend * | _driver |
AP_SerialManager & | serial_manager |
Vector3f | veh_pos_ned |
float | veh_pos_accuracy |
uint32_t | veh_pos_update_ms |
uint8_t | num_beacons = 0 |
BeaconState | beacon_state [AP_BEACON_MAX_BEACONS] |
Vector2f | boundary [AP_BEACON_MAX_BEACONS+1] |
uint8_t | boundary_num_points |
uint8_t | boundary_num_beacons |
Friends | |
class | AP_Beacon_Backend |
Definition at line 29 of file AP_Beacon.h.
Enumerator | |
---|---|
AP_BeaconType_None | |
AP_BeaconType_Pozyx | |
AP_BeaconType_Marvelmind | |
AP_BeaconType_SITL |
Definition at line 37 of file AP_Beacon.h.
AP_Beacon::AP_Beacon | ( | AP_SerialManager & | _serial_manager | ) |
float AP_Beacon::beacon_distance | ( | uint8_t | beacon_instance | ) | const |
Definition at line 204 of file AP_Beacon.cpp.
Referenced by DataFlash_Class::Log_Write_Beacon(), NavEKF2_core::readRngBcnData(), and NavEKF3_core::readRngBcnData().
bool AP_Beacon::beacon_healthy | ( | uint8_t | beacon_instance | ) | const |
Definition at line 195 of file AP_Beacon.cpp.
Referenced by NavEKF2_core::readRngBcnData(), and NavEKF3_core::readRngBcnData().
uint8_t AP_Beacon::beacon_id | ( | uint8_t | beacon_instance | ) | const |
Definition at line 186 of file AP_Beacon.cpp.
uint32_t AP_Beacon::beacon_last_update_ms | ( | uint8_t | beacon_instance | ) | const |
Definition at line 223 of file AP_Beacon.cpp.
Referenced by NavEKF2_core::readRngBcnData(), and NavEKF3_core::readRngBcnData().
Vector3f AP_Beacon::beacon_position | ( | uint8_t | beacon_instance | ) | const |
Definition at line 213 of file AP_Beacon.cpp.
Referenced by NavEKF2_core::readRngBcnData(), NavEKF3_core::readRngBcnData(), and update_boundary_points().
uint8_t AP_Beacon::count | ( | ) | const |
Definition at line 167 of file AP_Beacon.cpp.
Referenced by DataFlash_Class::Log_Write_Beacon(), NavEKF2_core::readRngBcnData(), and NavEKF3_core::readRngBcnData().
|
private |
Definition at line 373 of file AP_Beacon.cpp.
Referenced by beacon_position(), count(), get_beacon_data(), get_boundary_points(), get_origin(), get_vehicle_position_ned(), healthy(), update(), and update_boundary_points().
bool AP_Beacon::enabled | ( | void | ) |
Definition at line 101 of file AP_Beacon.cpp.
Referenced by DataFlash_Class::Log_Write_Beacon().
bool AP_Beacon::get_beacon_data | ( | uint8_t | beacon_instance, |
struct BeaconState & | state | ||
) | const |
const Vector2f * AP_Beacon::get_boundary_points | ( | uint16_t & | num_points | ) | const |
Definition at line 361 of file AP_Beacon.cpp.
Referenced by AC_Avoid::adjust_velocity_beacon_fence().
|
staticprivate |
Definition at line 321 of file AP_Beacon.cpp.
Referenced by update_boundary_points().
bool AP_Beacon::get_origin | ( | Location & | origin_loc | ) | const |
Definition at line 128 of file AP_Beacon.cpp.
Referenced by NavEKF2_core::readRngBcnData(), and NavEKF3_core::readRngBcnData().
bool AP_Beacon::get_vehicle_position_ned | ( | Vector3f & | pos, |
float & | accuracy_estimate | ||
) | const |
Definition at line 149 of file AP_Beacon.cpp.
Referenced by DataFlash_Class::Log_Write_Beacon(), loop(), NavEKF2_core::readRngBcnData(), and NavEKF3_core::readRngBcnData().
bool AP_Beacon::healthy | ( | void | ) |
Definition at line 107 of file AP_Beacon.cpp.
Referenced by beacon_distance(), and DataFlash_Class::Log_Write_Beacon().
void AP_Beacon::init | ( | void | ) |
Definition at line 80 of file AP_Beacon.cpp.
Referenced by setup().
void AP_Beacon::update | ( | void | ) |
Definition at line 116 of file AP_Beacon.cpp.
Referenced by loop().
void AP_Beacon::update_boundary_points | ( | ) |
Definition at line 232 of file AP_Beacon.cpp.
Referenced by update().
|
friend |
Definition at line 32 of file AP_Beacon.h.
|
private |
Definition at line 123 of file AP_Beacon.h.
Referenced by device_ready(), healthy(), init(), and update().
|
private |
Definition at line 116 of file AP_Beacon.h.
Referenced by beacon_last_update_ms(), device_ready(), enabled(), and init().
|
private |
Definition at line 133 of file AP_Beacon.h.
Referenced by beacon_distance(), beacon_healthy(), beacon_id(), beacon_last_update_ms(), beacon_position(), get_beacon_data(), AP_Beacon_Backend::set_beacon_distance(), and AP_Beacon_Backend::set_beacon_position().
|
private |
Definition at line 136 of file AP_Beacon.h.
Referenced by get_boundary_points(), and update_boundary_points().
|
private |
Definition at line 138 of file AP_Beacon.h.
Referenced by update_boundary_points().
|
private |
Definition at line 137 of file AP_Beacon.h.
Referenced by get_boundary_points(), and update_boundary_points().
|
private |
Definition at line 132 of file AP_Beacon.h.
Referenced by beacon_distance(), beacon_healthy(), beacon_id(), beacon_last_update_ms(), beacon_position(), count(), get_beacon_data(), AP_Beacon_Backend::set_beacon_distance(), AP_Beacon_Backend::set_beacon_position(), and update_boundary_points().
|
private |
Definition at line 120 of file AP_Beacon.h.
Referenced by AP_Beacon_Backend::correct_for_orient_yaw().
|
private |
Definition at line 119 of file AP_Beacon.h.
Referenced by AP_Beacon_Backend::get_beacon_origin_alt(), and get_origin().
|
private |
Definition at line 117 of file AP_Beacon.h.
Referenced by AP_Beacon_Backend::get_beacon_origin_lat(), and get_origin().
|
private |
Definition at line 118 of file AP_Beacon.h.
Referenced by AP_Beacon_Backend::get_beacon_origin_lon(), and get_origin().
|
private |
Definition at line 124 of file AP_Beacon.h.
Referenced by init().
|
static |
Definition at line 100 of file AP_Beacon.h.
Referenced by AP_Beacon(), and setup().
|
private |
Definition at line 128 of file AP_Beacon.h.
Referenced by get_vehicle_position_ned(), and AP_Beacon_Backend::set_vehicle_position().
|
private |
Definition at line 127 of file AP_Beacon.h.
Referenced by get_vehicle_position_ned(), and AP_Beacon_Backend::set_vehicle_position().
|
private |
Definition at line 129 of file AP_Beacon.h.
Referenced by get_vehicle_position_ned(), and AP_Beacon_Backend::set_vehicle_position().