Navigator: set position setpoint to current location instead of to NAN

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer 2023-01-25 14:51:44 +01:00
parent eaa4180920
commit 805de8a6d9
1 changed files with 3 additions and 2 deletions

View File

@ -846,8 +846,9 @@ MissionBlock::set_land_item(struct mission_item_s *item)
/* set the land item */
item->nav_cmd = NAV_CMD_LAND;
item->lat = (double)NAN; //descend at current position
item->lon = (double)NAN; //descend at current position
// set land item to current position
item->lat = _navigator->get_global_position()->lat;
item->lon = _navigator->get_global_position()->lon;
item->yaw = _navigator->get_local_position()->heading;
item->altitude = 0;