These are chat archives for dronekit/dronekit-android

Aug 2016
Phu Nguyen
Aug 18 2016 06:52
@kellyschrock good thing I got on
seven days later

here you go:

GeoFenceSetDataMessage JSON
"coord": [ [ [Lat, Lon], [Lat, Lon], [Lat, Lon] ] ],
"subCoord": [ [ [Lat, Lon], [Lat, Lon], [Lat, Lon] ] ]
"type": 0

the coord is a collection (array) of geofences (array) of pairs of points (array) of double type
meant for multiple geofences
the subcoord is a similarly typed collection
Phu Nguyen
Aug 18 2016 06:58
the subcoord polygons are the smaller offsets of the polygons that define the geofences in coord
the offset is the amount of buffer you want to have before the copter slams on the brakes
type: 0 means inclusion geofence (copter stays inside polygon defined)
type : 1 is exclusion geofence (copter stays out of a polygon defined) - this is not yet implemented on shotmanager
but can be extended quickly based on the implementation of the
Phu Nguyen
Aug 18 2016 07:15
@kellyschrock have you integrated version_3.0?
Kelly Schrock
Aug 18 2016 13:59
@phmagic Yes, I'm running version_3.0, but not the latest. I ran into an unknown difficulty with one of the shots in my app when I ran with the latest, so I dropped back to an older version.
@phmagic Thanks for the info on the fence. I arrived at basically that conclusion after poking around in On my first test I didn't know what subCoord might be, so I just made it the same as coord. After observing how the copter would stop but sort of "stick" to a fence wall, I realized subCoord must be an inset. And sure enough, there it was in :-)
@phmagic I assume there's a plan or a desire to implement the Solo's Geofence in terms of ArduCopter's new POLY_FENCE when it's available?
Phu Nguyen
Aug 18 2016 15:42
there is no plan for that yet
Kelly Schrock
Aug 18 2016 15:55
Sounds good. I've seen videos of that in action, and it appears to work well. It has an advantage in that it can control position directly and actually slow the copter down on the way to the fence edge and stop it. You can "push" against the fence edge at an angle, and it just flies along it without any bounce. I did a low-altitude fence some time ago for a company in NZ (lets them fly over the ocean without going under), and the ability to control position on the fly makes a huge difference. :-)