金牌会员
- 积分
- 1194
- 威望
- 592
- 贡献
- 344
- 兑换币
- 346
- 注册时间
- 2013-3-10
- 在线时间
- 129 小时
|
额差速 是这样给的
float RBasic[2][14] = {
{1000,1000,1000,1000,1000,38437,33473,29186,26092,23190,21824,19022,15000,15000},//17259,15911
{1000,1000,1000,1000,1000,32983,28390,23398,20230,17357,15839,13082,7000,6800}//11248,9892
};
这个数组是用车推出来的 放在平地上 舵机输出脉冲每增加20 记一段路程 内外轮的累计脉冲
R1=RBasic[0][er/20];
R2=RBasic[1][er/20];
r=(R1+R2)/2;
speeddt=r/speed;
if(Pos<0)
{
speedr=R1/speeddt;
speedl=R2/speeddt;
speeder1=speedr-speed;
speedr=speed+K_farH*speeder1;
speeder=speed-speedl;
speedl=speed-speeder*K_far;
}
else
{
speedr=R2/speeddt;
speedl=R1/speeddt;
speeder1=speedl-speed;
speedl=speed+K_farH*speeder1;
speeder=speed-speedr;
speedr=speed-speeder*K_far;
}
|
|