 
 
 
 
  
  
 where $v$ is the forward velocity of the robot, angled at $\theta$ to the $x$ axis.
$$v={(\omega_R+\omega_L)R\over 2}$$ $$\omega={(\omega_R-\omega_L)R\over L}$$
where $R$ is the radius of the wheels and $L$ is the distance between wheels
 
  
 $$x=a_1\cos\theta_1 + a_2\cos(\theta_1+\theta_2)$$ $$y=a_1\sin\theta_1 + a_2\sin(\theta_1+\theta_2)$$ $$\theta=\theta_1+\theta_2$$
 
 $$x^2+y^2=a_1^2+a_2^2+2a_1a_2\cos\theta_2$$
| hence | 
$$\theta=\arccos\left({(x^2+y^2)-(a_1^2+a_2^2) \over 2a_1a_2}\right)$$
$$\tan(\alpha+\theta_1)={y \over x}$$ $$\sin\alpha={a_2\sin\theta_2\over \sqrt{x^2+y^2}}$$
 
  
 
 
 