mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 17:53:34 +08:00
navigator : add support for precision landing
This commit is contained in:
committed by
Lorenz Meier
parent
652d295b2d
commit
aa4c6c038d
@@ -91,6 +91,7 @@ Navigator::Navigator() :
|
||||
_loiter(this, "LOI"),
|
||||
_takeoff(this, "TKF"),
|
||||
_land(this, "LND"),
|
||||
_precland(this, "PLD"),
|
||||
_rtl(this, "RTL"),
|
||||
_rcLoss(this, "RCL"),
|
||||
_dataLinkLoss(this, "DLL"),
|
||||
@@ -122,7 +123,9 @@ Navigator::Navigator() :
|
||||
_navigation_mode_array[6] = &_rcLoss;
|
||||
_navigation_mode_array[7] = &_takeoff;
|
||||
_navigation_mode_array[8] = &_land;
|
||||
_navigation_mode_array[9] = &_follow_target;
|
||||
_navigation_mode_array[9] = &_precland;
|
||||
_navigation_mode_array[10] = &_follow_target;
|
||||
|
||||
}
|
||||
|
||||
Navigator::~Navigator()
|
||||
@@ -648,6 +651,12 @@ Navigator::task_main()
|
||||
navigation_mode_new = &_land;
|
||||
break;
|
||||
|
||||
case vehicle_status_s::NAVIGATION_STATE_AUTO_PRECLAND:
|
||||
_pos_sp_triplet_published_invalid_once = false;
|
||||
navigation_mode_new = &_precland;
|
||||
_precland.set_mode(PrecLandMode::Required);
|
||||
break;
|
||||
|
||||
case vehicle_status_s::NAVIGATION_STATE_DESCEND:
|
||||
_pos_sp_triplet_published_invalid_once = false;
|
||||
navigation_mode_new = &_land;
|
||||
|
||||
Reference in New Issue
Block a user