After reading this:
http://www.euclideanspace.com/physics/kinematics/angularvelocity/quatDiff1stAttempt.htmhttp://www.euclideanspace.com/physics/kinematics/angularvelocity/I did something like:
Code:
btQuaternion diffQuater = gyroQuater - boxQuater;
btQuaternion diffConjQuater;
diffConjQuater.setX(-(diffQuater.x()));
diffConjQuater.setY(-(diffQuater.y()));
diffConjQuater.setZ(-(diffQuater.z()));
////////////////
//W(t) = 2 * dq(t) /dt * conj(q(t))
btQuaternion velQuater;
velQuater = ((diffQuater * 2) / d_time) * diffConjQuater;
But it is not working as I expect, I mean, there is written, vector part of the result quaternion should be vector of angular velocity, and scalar part should be 0, but my result is not like that.
Quote:
angular velocity vector represented as quaternion with zero scalar part, i.e
W (t ) = (0, W x (t ), W y (t ), W z (t ))
Any ideas?