Skip to content

Commit

Permalink
AC_Circle: fixes from lthall
Browse files Browse the repository at this point in the history
  • Loading branch information
lthall authored and rmackay9 committed Sep 16, 2024
1 parent aaf35bd commit 28680c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/AC_WPNav/AC_Circle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ bool AC_Circle::update(float climb_rate_cms)
target.y += - _radius * sinf(-_angle);

// heading is from vehicle to center of circle
_yaw = get_bearing_cd(_inav.get_position_xy_cm() - _pos_control.get_pos_offset_cm().xy().tofloat(), _center.tofloat().xy());
_yaw = get_bearing_cd(_pos_control.get_pos_target_cm().xy().tofloat(), _center.tofloat().xy());

if ((_options.get() & CircleOptions::FACE_DIRECTION_OF_TRAVEL) != 0) {
_yaw += is_positive(_rate)?-9000.0f:9000.0f;
Expand Down

0 comments on commit 28680c5

Please sign in to comment.