Fix yaw handling for land command

This commit is contained in:
Lorenz Meier 2016-05-10 12:09:47 +02:00
parent 65f9a86c19
commit 05b19c8e85

View File

@ -539,11 +539,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;
/* use home position */
} else {
item->lat = _navigator->get_home_position()->lat;
item->lon = _navigator->get_home_position()->lon;
item->yaw = _navigator->get_home_position()->yaw;
}
item->altitude = 0;