2
$\begingroup$

I want to use a MPU9150 to give me the position (XY) and heading (angle) of a wheeled robot. This MPU9150 from invensense has a Digital Motion Processor in it which can give me a quaternion. But how do I convert this quaternion data to an XY-coordinate and an angle so I can plot the position of my vehicle?

$\endgroup$

1 Answer 1

2
$\begingroup$

The quaternion only contains information about the rotation of the vehicle. It will not contain information about the location of you vehicle on a 2-d plane.

One method of converting quaternions to euler angles is to create the transformation matrix that is defined by the rotation and get the euler angles from that.

https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.