mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
geofence fix combined simple and polygon logic
- require being inside both fences, not either
This commit is contained in:
parent
bce7ecb0f6
commit
17990cf5dc
@ -168,7 +168,9 @@ bool Geofence::inside(double lat, double lon, float altitude)
|
||||
}
|
||||
}
|
||||
|
||||
inside_fence |= inside_polygon(lat, lon, altitude);
|
||||
// to be inside the geofence both fences have to report being inside
|
||||
// as they both report being inside when not enabled
|
||||
inside_fence = inside_fence && inside_polygon(lat, lon, altitude);
|
||||
|
||||
if (inside_fence) {
|
||||
_outside_counter = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user