初级会员

- 积分
- 122
- 金钱
- 122
- 注册时间
- 2014-10-10
- 在线时间
- 17 小时
|

楼主 |
发表于 2015-7-20 15:41:18
|
显示全部楼层
回复【2楼】正点原子:
---------------------------------
float xiaoyu_2000[1200];
float dayu_2000[1200];
uint16_t clk, i_old,i_new;
void list(void)
{
float Angle_1,Angle_2;
float encoder_1,encoder_2;
uint16_t i,j;
for(i=0;i<1200;i++)
{
encoder_1+=0.05;
Angle_1 = encoder_1*PI/180;
dayu_2000 = (Angle_1-atanf( L*(1-cos(Angle_1))/(S+L*sin(Angle_1))))*180/PI;
//printf("\r\n the data is111: %f\r\n",dayu_2000);
}
for(j=0;j<1200;j++)
{
encoder_2+=0.05;
Angle_2 = encoder_2*PI/180;
xiaoyu_2000[j] = (Angle_2+atanf( L*(1-cos(Angle_2))/(S-L*sin(Angle_2))))*180/PI;
//printf("\r\n the data is: %f \r\n",xiaoyu_2000[j]);
}
printf("\r\n the data is: completed \r\n");
} |
|