18 #if CONFIG_HAL_BOARD == HAL_BOARD_SITL 25 #define PROXIMITY_MAX_RANGE 200.0f 26 #define PROXIMITY_ACCURACY 0.1f 43 AP_HAL::panic(
"Proximity_SITL: Failed to find FENCE_ALT_MAX");
81 if (
fence ==
nullptr) {
84 if (
fence ==
nullptr) {
108 float test_dist = (max_dist+min_dist)*0.5
f;
113 max_dist = test_dist;
115 min_dist = test_dist;
140 #endif // CONFIG_HAL_BOARD void location_update(struct Location &loc, float bearing, float distance)
static AP_Param * find_object(const char *name)
bool get_distance_to_fence(float angle_deg, float &distance) const
bool _distance_valid[PROXIMITY_SECTORS_MAX]
float distance_max() const
bool get_upward_distance(float &distance) const
float _angle[PROXIMITY_SECTORS_MAX]
static AP_Param * find(const char *name, enum ap_var_type *ptype)
uint16_t _sector_middle_deg[PROXIMITY_SECTORS_MAX]
bool load_point_from_eeprom(uint16_t i, Vector2l &point)
void set_status(AP_Proximity::Proximity_Status status)
int32_t lat
param 3 - Latitude * 10**7
bool boundary_valid(uint16_t num_points, const Vector2< T > *points, bool contains_return_point) const
float distance_min() const
static auto MAX(const A &one, const B &two) -> decltype(one > two ? one :two)
A system for managing and storing variables that are of general interest to the system.
float wrap_360(const T angle, float unit_mod)
float _distance[PROXIMITY_SECTORS_MAX]
int32_t alt
param 2 - Altitude in centimeters (meters * 100) see LOCATION_ALT_MAX_M
#define PROXIMITY_MAX_RANGE
const AP_HAL::HAL & hal
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
AC_PolyFence_loader fence_loader
AP_Proximity_SITL(AP_Proximity &_frontend, AP_Proximity::Proximity_State &_state)
int32_t lng
param 4 - Longitude * 10**7
#define PROXIMITY_ACCURACY
void update_boundary_for_sector(uint8_t sector)
void * create_point_array(uint8_t element_size)
void panic(const char *errormsg,...) FMT_PRINTF(1
bool boundary_breached(const Vector2< T > &location, uint16_t num_points, const Vector2< T > *points, bool contains_return_point) const
void update(void) override