Using MetaMotionC in a vertical position

edited July 2017 in General
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?


Comments

  • What sensor fusion mode are you using?  

    I'm not exactly sure what @ivancap did in his thread (http://community.mbientlab.com/discussion/comment/4483/#Comment_4483) but based on that post, I assume he computed a rotation quaternion that maps the initial vertical position value to the initial horizontal value.
  • Hi Eric, I am using the NDoF sensor fusion mode.

    Other than @ivancap solution of rotating, is expected orientation of the sensor to be flat to give correct readings?
  • I am not aware of any limitations in the sensor fusion algorithm that dictates the sensor has to be horizontal.
This discussion has been closed.