James O'Shannessy
e4f1e26b5c
AC_Fence: Disable fence floor when disabling the rest of the fence
2021-03-05 14:52:46 +11:00
James O'Shannessy
f228adfa75
ArduCopter: Improve auto-enable/disable of fence
2021-03-05 14:52:46 +11:00
Dr.-Ing. Amilcar do Carmo Lucas
dd5ede0fe0
autotest: small comment improvements
2021-03-05 14:52:46 +11:00
James O'Shannessy
bbd606b8b5
AutoTest: Corrections to autotests
2021-03-05 14:52:46 +11:00
Steven Josefs
c783410494
AC_Fence: adjusted AP_GROUPINFO to contain all copters
2021-03-05 14:52:46 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas
22bdc3e54c
AC_Fence: extend pre-arm checks
...
Fix comments
2021-03-05 14:52:46 +11:00
James O'Shannessy
a3efc9ad98
AutoTest: Fix MAVlite test allowing plane fence to be enabled
2021-03-05 14:52:46 +11:00
James O'Shannessy
47e76a1807
AutoTest: Move fence enable/disable to common location
2021-03-05 14:52:46 +11:00
Dr.-Ing. Amilcar do Carmo Lucas
528defd560
Autotest: activate the fence via a mavlink command
...
This should not be required in the future, please fix this and revert this commit
2021-03-05 14:52:46 +11:00
Dr.-Ing. Amilcar do Carmo Lucas
92122e5133
Copter: automatically enable and disable floor fence on automated takeoff and landing
2021-03-05 14:52:46 +11:00
Dr.-Ing. Amilcar do Carmo Lucas
2e422f249a
AC_Fence: small comment improvements. Do not call the same function four times
2021-03-05 14:52:46 +11:00
Dr.-Ing. Amilcar do Carmo Lucas
15e95be7d7
AC_Fence: do not delete the FENCE_ENABLE parameter. It would confuse many users.
...
Talked to Randy about this. The consensus was not to delete the parameter
2021-03-05 14:52:46 +11:00
Dr.-Ing. Amilcar do Carmo Lucas
8d8753b14c
Autotest: fix two copter tests after parameter rename
...
I'm not sure if a better fix would be to remove the set_parameter() call
2021-03-05 14:52:46 +11:00
James O'Shannessy
215901be30
Autotest: Correct the logic for fence based autotest functions
...
Adds corrections to enabling fence using aux function.
Correctly test fences statically. Only uploaded fences can be checked using a fence file, so we check those first. Then we add steps to check tin can, max and minm all set the fence as present, as expected.
Plane will support MAV_PROTOCOL_CAPABILITY_MISSION_FENCE, so we assert that it does support it.
To test ceiling and floor, leverage some existing functions for takeoff, change altitude and land. Check for respective breach.
Add a floor breach check to copter.
2021-03-05 14:52:46 +11:00
James O'Shannessy
783a4b7965
AC_Fence: Change logic to fence enable and sys_status reporting
2021-03-05 14:52:46 +11:00
Dr.-Ing. Amilcar do Carmo Lucas
4f7ffc5eb1
Plane: move fence disable code to a function to enable reusability
2021-03-05 14:52:46 +11:00
Dr.-Ing. Amilcar do Carmo Lucas
fef8b37b11
Plane: Address Randy review comments
2021-03-05 14:52:46 +11:00
James O'Shannessy
aae092b88f
ArduPlane: Remove all unused geofence capability
...
ArduPlane: Remove missed geofence logic
2021-03-05 14:52:46 +11:00
James O'Shannessy
a23e8d46da
AP_Vehicle: Add additional fence mode change reason
2021-03-05 14:52:46 +11:00
James O'Shannessy
8ca69c2e89
AP_Logger: Add support for fence floor events
2021-03-05 14:52:46 +11:00
James O'Shannessy
1a3e168ced
Autotest: Fence is present, but test looking for not present
...
Autotest: Remove ties to mavlink FENCE_ACTION
Autotest: Add ArduPlane autotest to test ceiling and floor
Adds a test to ensure the vehicle reverts to RTL when breaching a ceiling or floor.
Autotest: Progress the test once we reach takeoff complete and fence enable
Autotest: Use RC_OPTION for Aux Switch functionality
Autotest: Enable fence last
2021-03-05 14:52:46 +11:00
James O'Shannessy
c2abf27d78
GCS_MAVLink: Add reporting of fence floor breaches to GCS_MAVLink
...
GCS_MAVLink: Add disabling of fence floor only, per mavlink spec
GCS_MAVLink: Cannot enable a fence if the fence is not present
2021-03-05 14:52:46 +11:00
James O'Shannessy
0e73b7bce1
AP_Arming: Enable and Disable the fence when vehicle is armed/disarmed
...
AP_Arming: Use auto enable flag to arm fence only when armed (as per enum)
AP_Arming: Config defines are not available in AP_Arming
Since config definitions are not available in AP_Arming, we can still rely on singleton access of the AC_Fence object.
AP_Arming: Perform fence checks for all vehicles
2021-03-05 14:52:46 +11:00
James O'Shannessy
87b66b4b49
AC_Fence: Add parameters from Geofence to AC_Fence
...
AC_Fence: Add fence floor breach checks and calculations
AC_Fence: Add event logging to enable/disable of fence floor
AC_Fence: Adjust sys_status reporting to look at total fence count
AC_Fence: Make retrieving of the return point accessible
AC_Fence: Check whether fence is enabled or autoenable is set for arming checks
Checks whether the fence is currently enabled OR if the fence is intended to be enabled automatically.
These checks are used to find out enabled fences, or prearm checks
2021-03-05 14:52:46 +11:00
James O'Shannessy
17fb585bf1
ArduPlane: Add support for AC_Fence
...
ArduPlane: Remove some geofence logic from ArduPlane
ArduPlane: Refactor action and mode return implementation
ArduPlane: Use polyfence to find the return point.
2021-03-05 14:52:46 +11:00
Paul Riseborough
9b53d505ea
AP_AHRS: Handle airspeed estimation with have_inertial_nav() == false
2021-03-05 12:10:01 +11:00
Paul Riseborough
e3eea0a54a
AP_NavEKF3: Use specialised function for in-flight plane yaw alignment
2021-03-05 12:10:01 +11:00
Paul Riseborough
4675aea0bf
AP_NavEKF3: Update parameter description
2021-03-05 12:10:01 +11:00
Paul Riseborough
baea2c33bd
Plane: remove unnecessary call to setTakeoffExpected
...
This is already set from inside Plane::set_servos_controlled when throttle up and or launch accel is detected.
2021-03-05 12:10:01 +11:00
Paul Riseborough
246b80dc06
AP_NavEKF3: Don't return a 0,0 lat,lng unless absolutely necessary
2021-03-05 12:10:01 +11:00
Paul Riseborough
aa49e92edc
AP_AHRS: Remove unused AP_AHRS_NavEKF::yaw_alignment_complete API
2021-03-05 12:10:01 +11:00
Paul Riseborough
1a3258a039
AP_AHRS: Fall back to DCM airspeed estimate if EKF velocity not available
2021-03-05 12:10:01 +11:00
Paul Riseborough
a50be71b41
AP_NavEKF3: Fix inconsistency in reporting raw GPS position validity
2021-03-05 12:10:01 +11:00
Paul Riseborough
d52594c576
Tools: Fix set_home autotest
...
Don't try to get home until EKF has passed alignment and GPs checks.
Use a more realistic lat/lon offset threshold
2021-03-05 12:10:01 +11:00
Paul Riseborough
ec401083bf
AP_AHRS: Remove unused variable
2021-03-05 12:10:01 +11:00
Paul Riseborough
af2bf6097b
AP_AHRS: Add accessor function for EKF3 yaw alignment status
2021-03-05 12:10:01 +11:00
Paul Riseborough
6a603019d5
AP_NavEKF3: Add accessor function for yaw alignment status
2021-03-05 12:10:01 +11:00
Paul Riseborough
1dc79f0be8
Plane: Clarify calculation used to detect throw
2021-03-05 12:10:01 +11:00
Paul Riseborough
3634a942a1
AP_NavEKF3: Fix bug causing unwanted use of default airspeed
2021-03-05 12:10:01 +11:00
Paul Riseborough
a0faa55ef5
AP_AHRS: Fix rebase build error
2021-03-05 12:10:01 +11:00
Paul Riseborough
912db3512e
AP_NavEKF3: Fix EKF selection bug
2021-03-05 12:10:01 +11:00
Paul Riseborough
85c0040fa3
AP_NavEKF3: Improve inFlight detection for fixed wing
...
Better handle case where no airspeed sensor is being used with a hand launch.
2021-03-05 12:10:01 +11:00
Paul Riseborough
4e648734fa
Plane: Fix takeoff pitch for hand launch
2021-03-05 12:10:01 +11:00
Paul Riseborough
39e1eb238d
Plane: make detection of impending takeoff more likely
2021-03-05 12:10:01 +11:00
Paul Riseborough
a1bde16abd
Plane: Fix failure to disarm after landing in strong winds
2021-03-05 12:10:01 +11:00
Andrew Tridgell
6d6ec44d59
AP_AHRS: fixed build on boards without EKF2
2021-03-05 12:10:01 +11:00
Paul Riseborough
ad582a90dd
Plane: Don't set takeoff expected until vehicle is armed.
2021-03-05 12:10:01 +11:00
Paul Riseborough
295c1e1308
AP_NavEKF3: Reset covariances when falling back to non aiding mode
2021-03-05 12:10:01 +11:00
Paul Riseborough
adae7365e1
AP_NavEKF3: Fix LLH reporting bug
2021-03-05 12:10:01 +11:00
Paul Riseborough
ddadc45854
AP_NavEKF3: Reset states when falling back into non aiding mode.
2021-03-05 12:10:01 +11:00