mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AC_Avoidance: add enabled and margin accessors
This commit is contained in:
parent
1c4f47f882
commit
0d032ecd86
@ -35,6 +35,9 @@ public:
|
||||
return _singleton;
|
||||
}
|
||||
|
||||
// return true if any avoidance feature is enabled
|
||||
bool enabled() const { return _enabled != AC_AVOID_DISABLED; }
|
||||
|
||||
/*
|
||||
* Adjusts the desired velocity so that the vehicle can stop
|
||||
* before the fence/object.
|
||||
@ -76,6 +79,9 @@ public:
|
||||
// kP should be non-zero for Copter which has a non-linear response
|
||||
float get_max_speed(float kP, float accel_cmss, float distance_cm, float dt) const;
|
||||
|
||||
// return margin (in meters) that the vehicle should stay from objects
|
||||
float get_margin() const { return _margin; }
|
||||
|
||||
static const struct AP_Param::GroupInfo var_info[];
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user