mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 18:03:34 +08:00
navigator: reject mission if the first waypoint is too far from home
This commit is contained in:
@@ -91,6 +91,12 @@ private:
|
||||
*/
|
||||
void advance_mission();
|
||||
|
||||
/**
|
||||
* Check distance to first waypoint (with lat/lon)
|
||||
* @return true only if it's not too far from home (< MIS_DIST_1WP)
|
||||
*/
|
||||
bool check_dist_1wp();
|
||||
|
||||
/**
|
||||
* Set new mission items
|
||||
*/
|
||||
@@ -127,8 +133,9 @@ private:
|
||||
*/
|
||||
void publish_mission_result();
|
||||
|
||||
control::BlockParamFloat _param_onboard_enabled;
|
||||
control::BlockParamInt _param_onboard_enabled;
|
||||
control::BlockParamFloat _param_takeoff_alt;
|
||||
control::BlockParamFloat _param_dist_1wp;
|
||||
|
||||
struct mission_s _onboard_mission;
|
||||
struct mission_s _offboard_mission;
|
||||
@@ -148,6 +155,7 @@ private:
|
||||
} _mission_type;
|
||||
|
||||
bool _inited;
|
||||
bool _dist_1wp_ok;
|
||||
|
||||
MissionFeasibilityChecker missionFeasiblityChecker; /**< class that checks if a mission is feasible */
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user