mirror of https://github.com/ArduPilot/ardupilot
Copter: bug fix for descent during loiter_turns
This commit is contained in:
parent
3b982bc908
commit
e34702f524
|
@ -287,6 +287,7 @@ update_circle(float dt)
|
||||||
// calculate target position
|
// calculate target position
|
||||||
circle_target.x = circle_center.x + cir_radius * cosf(-circle_angle);
|
circle_target.x = circle_center.x + cir_radius * cosf(-circle_angle);
|
||||||
circle_target.y = circle_center.y - cir_radius * sinf(-circle_angle);
|
circle_target.y = circle_center.y - cir_radius * sinf(-circle_angle);
|
||||||
|
circle_target.z = wp_nav.get_desired_alt();
|
||||||
|
|
||||||
// re-use loiter position controller
|
// re-use loiter position controller
|
||||||
wp_nav.set_loiter_target(circle_target);
|
wp_nav.set_loiter_target(circle_target);
|
||||||
|
|
Loading…
Reference in New Issue