Using MetaMotionC in a vertical position
I saw related post "Offset for vertical usage" but unable to determine the appropriate solution. In the default configuration, I understand that the sensor laying flat that the x-axis points to the right, the y-axis pointing away from me, and the z-axis pointing up. I would now now like to use the sensor so that the z-axis is now pointing to me, y-axis pointing up and x-axis still pointing right. Using a vertical orientation and rotating on the new y-axis while the metawear is on its edge, I notice that two axis are affected rather than just the yaw component.
I believe I need to rotate the quaternion to achieve this, and then convert to Euler angles to a readable format.
Is this just a matter of creating a new quaternion (new.w = old.w ; new.x = old.x; new.y= old.z ; new.z= -old.y) and then converting to Euler from there? I also do recall that at the chip level, it is possible to set the axis as well. While the equation would be simplest, I'm wondering if the hardware register setting would be possible too?
This discussion has been closed.
Comments