AC_Fence: add accessors to return radius and safety margin

This commit is contained in:
Daniel Ricketts 2016-06-20 10:14:14 +09:00 committed by Randy Mackay
parent d1b28aaed9
commit e60710332b
1 changed files with 6 additions and 0 deletions

View File

@ -75,6 +75,12 @@ public:
/// get_safe_alt - returns maximum safe altitude (i.e. alt_max - margin)
float get_safe_alt() const { return _alt_max - _margin; }
/// get_radius - returns the fence radius in meters
float get_radius() const { return _circle_radius.get(); }
/// get_margin - returns the fence margin in meters
float get_margin() const { return _margin.get(); }
/// manual_recovery_start - caller indicates that pilot is re-taking manual control so fence should be disabled for 10 seconds
/// should be called whenever the pilot changes the flight mode
/// has no effect if no breaches have occurred