mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-01 07:14:07 +08:00
Fixes #7313: Invalid setpoint yaw after takeoff
This commit is contained in:
parent
89a8c656f2
commit
d9cec600ed
@ -519,6 +519,7 @@ MissionBlock::mission_item_to_position_setpoint(const struct mission_item_s *ite
|
||||
sp->lon = item->lon;
|
||||
sp->alt = item->altitude_is_relative ? item->altitude + _navigator->get_home_position()->alt : item->altitude;
|
||||
sp->yaw = item->yaw;
|
||||
sp->yaw_valid = !PX4_ISFINITE(item->yaw);
|
||||
sp->loiter_radius = (fabsf(item->loiter_radius) > NAV_EPSILON_POSITION) ? fabsf(item->loiter_radius) :
|
||||
_navigator->get_loiter_radius();
|
||||
sp->loiter_direction = (item->loiter_radius > 0) ? 1 : -1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user