Commit 9678db8f authored by oscar's avatar oscar

提交代码

parent 22d9874d
......@@ -20,18 +20,18 @@ float to360(float rot_y,float lidar_x_angle)
{
angle += _PI_ * 2;
}
SDK_LOG(SDK_INFO, "rot_y = %f, angle = %f", rot_y, angle);
//SDK_LOG(SDK_INFO, "rot_y = %f, angle = %f", rot_y, angle);
float tmp_angle = 0.0f;
float car_angle = angle / _PI_ * 180.0f;
tmp_angle = lidar_x_angle - car_angle;
SDK_LOG(SDK_INFO, "car_angle = %f, tmp_angle = %f,lidar_x_angle = %f", car_angle, tmp_angle, lidar_x_angle);
tmp_angle = car_angle - lidar_x_angle;
//SDK_LOG(SDK_INFO, "car_angle = %f, tmp_angle = %f,lidar_x_angle = %f", car_angle, tmp_angle, lidar_x_angle);
tmp_angle += 360;
while (tmp_angle > 360)
{
tmp_angle -= 360;
}
angle = tmp_angle;
SDK_LOG(SDK_INFO, "angle = %f,angle_y = %f", angle, angle/180*3.1415926);
//SDK_LOG(SDK_INFO, "angle = %f,angle_y = %f", angle, angle/180*3.1415926);
return angle;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment