mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-02 20:00:35 +08:00
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:
committed by
Lorenz Meier
parent
bf9a1c5a18
commit
2bfac7ff4f
@@ -126,6 +126,11 @@ bool Geofence::inside(const struct vehicle_global_position_s &global_position,
|
||||
}
|
||||
}
|
||||
|
||||
bool Geofence::inside(const struct mission_item_s &mission_item)
|
||||
{
|
||||
return inside(mission_item.lat, mission_item.lon, mission_item.altitude);
|
||||
}
|
||||
|
||||
bool Geofence::inside(double lat, double lon, float altitude)
|
||||
{
|
||||
float max_horizontal_distance = _param_max_hor_distance.get();
|
||||
|
||||
Reference in New Issue
Block a user