I've been working on a low-altitude fence for ArduCopter, and wanted to get peoples' input on how they'd like for something like that to work if they were going to use it.
The idea is that if you're flying over water or weeds (or other conditions where a landing is undesirable), a low-altitude fence prevents the copter from descending beyond a certain altitude.
I added a new value to the FENCE_TYPE mask, so it can be used in conjunction with or in lieu of the other fence types, or excluded.
I added a FENCE_MIN_ALT parameter specifying the minimum altitude, in meters. With the fence set to REPORT_ONLY, it keeps the altitude at or above FENCE_MIN_ALT while the low-altitude fence is active.
I added a FENCE_LOW_RADIUS parameter specifying the number of meters from the launch point at which the low-altitude fence becomes active. Inside this radius, the copter flies normally, and it's possible to land, etc. Beyond this radius, the fence reports a breach if the altitude falls below the FENCE_MIN_ALT's specified value.
In testing, it's getting the expected results. If I set a FENCE_LOW_RADIUS of 20 and a FENCE_MIN_ALT of 10, then launch and fly at 1-2 meters, the copter flies normally until it reaches 20 meters from launch, then rises to 10 meters. At that point, I can fly around at 0 throttle, and the copter stays at 10 meters until I get back inside the radius. At that point, the copter descends as if the fence were not active.
I'd like to see what everyone thinks of the idea, and what they think of the way it's described here.