fix landing angle if no gps

This commit is contained in:
ChristophTobler
2017-02-10 11:48:48 +01:00
committed by Lorenz Meier
parent 6a60ff9dc3
commit 64092f087f

View File

@@ -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 */