mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-09 03:02:36 +08:00
fix landing angle if no gps
This commit is contained in:
committed by
Lorenz Meier
parent
6a60ff9dc3
commit
64092f087f
@@ -711,7 +711,13 @@ MissionBlock::set_land_item(struct mission_item_s *item, bool at_current_locatio
|
||||
if (at_current_location) {
|
||||
item->lat = _navigator->get_global_position()->lat;
|
||||
item->lon = _navigator->get_global_position()->lon;
|
||||
item->yaw = _navigator->get_global_position()->yaw;
|
||||
|
||||
if (_navigator->home_position_valid()) {
|
||||
item->yaw = _navigator->get_global_position()->yaw;
|
||||
|
||||
} else {
|
||||
item->yaw = _navigator->get_local_position()->yaw;
|
||||
}
|
||||
|
||||
/* use home position */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user