AC_WPNav: clean up atan2

This commit is contained in:
Jonathan Challinger 2015-02-02 16:50:30 -08:00 committed by Randy Mackay
parent 4311fa8952
commit baa3e802ee
1 changed files with 1 additions and 1 deletions

View File

@ -246,7 +246,7 @@ void AC_Circle::init_start_angle(bool use_heading)
_angle = wrap_PI(_ahrs.yaw-PI);
} else {
// get bearing from circle center to vehicle in radians
float bearing_rad = ToRad(90) + fast_atan2(-(curr_pos.x-_center.x), curr_pos.y-_center.y);
float bearing_rad = fast_atan2(curr_pos.y-_center.y,curr_pos.x-_center.x);
_angle = wrap_PI(bearing_rad);
}
}