forked from Archive/PX4-Autopilot
geofence: disable altitude check if not configured
It currently cannot be configured via mavlink mission protocol.
This commit is contained in:
parent
2981ece921
commit
4c1328483d
|
@ -260,9 +260,11 @@ bool Geofence::checkPolygons(double lat, double lon, float altitude)
|
|||
}
|
||||
|
||||
/* Vertical check */
|
||||
if (_altitude_max > _altitude_min) { // only enable vertical check if configured properly
|
||||
if (altitude > _altitude_max || altitude < _altitude_min) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* Horizontal check: iterate all polygons */
|
||||
bool outside_exclusion = true;
|
||||
|
|
Loading…
Reference in New Issue