fixed calculation of angular rate