Mission feasibility: Geofence check fix

Current implementation checks against geofence only if it is in polygon form.
When it's created via params, it accepts all the waypoints as the number of vertices = 0.
Thus, changed the function to the one that is used to check whether geofence is breached in flight.
This commit is contained in:
Michal Stasiak
2016-11-05 11:07:23 +01:00
committed by Lorenz Meier
parent bf9a1c5a18
commit 2bfac7ff4f
4 changed files with 18 additions and 6 deletions
+2
View File
@@ -88,6 +88,8 @@ public:
const struct vehicle_gps_position_s &gps_position, float baro_altitude_amsl,
const struct home_position_s home_pos, bool home_position_set);
bool inside(const struct mission_item_s &mission_item);
bool inside_polygon(double lat, double lon, float altitude);
int clearDm();