// if we are doing a panorama set the circle_angle to the current heading
if(_radius<=0){
_angular_vel_max=ToRad(_rate);
_angular_accel=max(fabs(_angular_vel_max),ToRad(AC_CIRCLE_ANGULAR_ACCEL_MIN));// reach maximum yaw velocity in 1 second
_angular_accel=max(fabsf(_angular_vel_max),ToRad(AC_CIRCLE_ANGULAR_ACCEL_MIN));// reach maximum yaw velocity in 1 second
}else{
// calculate max velocity based on waypoint speed ensuring we do not use more than half our max acceleration for accelerating towards the center of the circle