Skip to content

Commit

Permalink
Rover: fix use-pivot-steering
Browse files Browse the repository at this point in the history
absolute yaw error should be used
  • Loading branch information
rmackay9 committed Oct 26, 2017
1 parent fb94432 commit fb9f695
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion APMrover2/Steering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ bool Rover::use_pivot_steering(float yaw_error_cd)
}

// calc bearing error
const float yaw_error = yaw_error_cd / 100.0f;
const float yaw_error = fabsf(yaw_error_cd) * 0.01f;

// if error is larger than pivot_turn_angle start pivot steering
if (yaw_error > g.pivot_turn_angle) {
Expand Down

0 comments on commit fb9f695

Please sign in to comment.