Commit Graph

39 Commits

Author SHA1 Message Date
Peter Barker e30a6bbce3 AC_Fence: rename sys_status methods from geofence_ to sys_status_ 2018-01-09 17:15:19 +00:00
Peter Barker a5aafab7ff AC_Fence: use pre-arm checks for sanity checks
Magically resetting people's parameters not a great look.
2018-01-09 17:15:19 +00:00
Peter Barker 155407956c AC_Fence: add a pre-arm check for polygon fence validity
Also change SYS_STATUS bit to be unhealthy if boundary invalid
2018-01-09 17:15:19 +00:00
Peter Barker 588b0c17c8 AC_Fence: remove AC_FENCE_TYPE_NONE define
0 is the appropriate value for a bitmask which is empty
2017-12-28 15:38:37 +00:00
Peter Barker aa482bae40 AC_Fence: remove argument to check()
Also, rename check_fence() to check()
2017-12-28 15:38:37 +00:00
Peter Barker 0f94fde434 AC_Fence: get home distance directly from ahrs 2017-12-15 01:42:49 +00:00
Andrew Tridgell 25b9a7e711 AC_Fence: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Peter Barker 1ecfdffa76 AC_Fence: methods to help populate SYS_STATUS 2017-12-13 10:04:50 +09:00
Peter Barker ac3f030a34 AC_Fence: factor out check_fence_alt_max
NFC
2017-12-13 10:04:50 +09:00
Peter Barker d04a4dd0f8 AC_Fence: factor out check_fence_circle
NFC
2017-12-13 10:04:50 +09:00
Peter Barker d379c7bbd9 AC_Fence: factor out check_fence_polygon
NFC
2017-12-13 10:04:50 +09:00
khancyr 65373b85f0 AC_Fence: replace AP_InertialNav by AHRS 2017-12-13 10:04:50 +09:00
Lucas De Marchi 52686ec838 AC_Fence: add static create method 2017-09-26 03:01:21 +01:00
khancyr f583121433 AC_Fence: reset fences breach on disable
Also rename enable function parameter
2017-07-27 20:41:40 +09:00
Peter Barker ae6df4fc04 AC_Fence: remove global static send_statustext_chan 2017-07-11 23:53:53 +01:00
Randy Mackay c1a25c25f7 AC_Fence: return failure message 2017-03-25 10:50:58 +09:00
Jacob Walser 3c6df7cc0e AC_Fence: Add minimum altitude limit
get_safe_alt() -> get_safe_alt_max() and get_safe_alt_min()
2017-02-21 11:26:14 +11:00
murata c808ee2f49 Global: To nullptr from NULL.
RC_Channel: To nullptr from NULL.

AC_Fence: To nullptr from NULL.

AC_Avoidance: To nullptr from NULL.

AC_PrecLand: To nullptr from NULL.

DataFlash: To nullptr from NULL.

SITL: To nullptr from NULL.

GCS_MAVLink: To nullptr from NULL.

DataFlash: To nullptr from NULL.

AP_Compass: To nullptr from NULL.

Global: To nullptr from NULL.

Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Peter Barker d188504b8b AC_Fence: remove unused variable _boundary_revalidate 2016-10-24 08:57:56 -02:00
Randy Mackay e820506c5a AC_Fence: add polygon fence check to check_destination_within_fence 2016-07-04 18:25:03 +09:00
Randy Mackay 5153c3d195 AC_Fence: merge with add polygon support 2016-06-25 15:55:55 +09:00
Randy Mackay d91805edbf AC_Fence: add support for polygon fences 2016-06-25 15:55:55 +09:00
Daniel Ricketts e60710332b AC_Fence: add accessors to return radius and safety margin 2016-06-22 11:38:15 +09:00
Randy Mackay 4829dbb55d AC_Fence: rename check_destination_within_fence and accept distances in meters 2016-05-21 09:56:12 +09:00
Saloni Jain ff843448aa AC_Fence: Added a new function to check whether the guided waypoint is within the fence 2016-05-21 09:56:12 +09:00
Lucas De Marchi 7dc3942ad4 AC_Fence: replace header guard with pragma once 2016-03-16 18:40:39 +11:00
Gustavo Jose de Sousa d030e817d9 AC_Fence: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:28:41 +10:00
Randy Mackay f06c859d93 AC_Fence: add comment re check_fence method 2015-04-14 16:10:09 +09:00
Jonathan Challinger 05fda4ee4c AC_Fence: accept curr_alt parameter instead of getting alt from inav 2015-04-14 16:10:07 +09:00
Jonathan Challinger f06cc5d0c1 AC_Fence: change inav to const reference 2015-04-14 16:10:02 +09:00
Randy Mackay cc9c3bb5aa AC_Fence: increase default radius to 300m
300m is still within line of sight and this should reduce the number of
false breaches due to bad GPS positions
2014-07-14 11:25:04 +09:00
Randy Mackay e855cfec02 AC_Fence: add 10sec manual recovery
This resolves issue #461 by giving the pilot a minimum of 10 seconds to
attempt to manually recover before the autopilot will attempt to retake
control to bring the copter home or land.
2014-04-27 11:11:07 +09:00
Tobias 596c7a25b7 AC_Fence: make member pointer to AP_InertialNav const, remove unused
gps-pointer member
2013-10-27 13:41:09 +09:00
Randy Mackay 04b84664e5 AC_Fence: add safety margin parameter
This will allow auto modes to proactively avoid breaching the fence
2013-08-15 16:05:38 +09:00
Randy Mackay 47f5c9b7a4 AC_Fence: remove unused gps pointer 2013-08-03 19:04:59 +09:00
Randy Mackay bd75de6a22 AC_Fence: reduce to 150m radius and 100m high
100m high,
2013-05-03 14:57:37 +09:00
Randy Mackay 2d17688363 AC_Fence: add backup fence
Also includes fixes from code review with Tridge
2013-05-01 17:05:04 +09:00
Randy Mackay 9910d6d1cd AC_Fence: first implemenation of library 2013-04-27 11:14:05 +09:00