ArduPilot / ArduPilot/MissionPlanner

Copter: display tin-can fence based on parameters

Open
#3,589 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2.4k
Forks
2.9k
Avg merge
19h 16m
Merged PRs (30d)
4

Description

Users are sometimes unaware that the [Copter tin-can fence](https://ardupilot.org/copter/docs/common-ac2_simple_geofence.html) is enabled and are then surprised when the vehicle RTLs or stops at the fence. It would be great if this fence was shown on the MP map just like other fences.

MP could check for these parameters:

- [FENCE_ENABLE](https://ardupilot.org/copter/docs/parameters.html#fence-enable-fence-enable-disable) = 1
- [FENCE_TYPE](https://ardupilot.org/copter/docs/parameters.html#fence-type-fence-type)'s bit1 is set (e.g. "2")
- [FENCE_RADIUS](https://ardupilot.org/copter/docs/parameters.html#fence-radius-circular-fence-radius) > 0

BTW, we have a flight code PR that is attempting to add the tin-can fence into the list of regular fences but it is quite complicated: https://github.com/ArduPilot/ardupilot/pull/31064

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in Mission Planner's map fence-display path and compare how existing fences are detected and rendered. Use FENCE_ENABLE, FENCE_TYPE bit 1, and FENCE_RADIUS > 0 as the conditions, then verify that the tin-can fence appears on the map with the expected radius.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.