Setting Origin of Orientation

Hi, 

I'm making an app the requires comparison of orientations between two sensors.

When I first started working, the two sensors I have had the same orientation origin, ie pointing them in the same direction would read the same orientation (SensorFusion streaming quaternions). Somewhere along the way this changed, and they are considerably out of sync.

I haven't been able to find anything in the Documentation or API on changing the origin of orientation. Is there a way to do this? Hoping for a way to get a consistent origin across multiple boards without a complicated calibration process.

Thanks!

Comments

    • What does the quaternion data look like?
    • What is the configuration for the sensor fusion algorithm?
    • How are you rotating / moving the boards?
    You can't change the orientation though you can reset it by resetting the board.
  • Thanks for the reply,

     I used the MetaWear iPhone app to soft reset the boards and they're in sync again. 

    The quaternions were stable when the boards aren't moving, and I converted them into Eulars for easier debugging. The values looked good, except the Eular z values were different by ~60 while the boards were physically aligned.

    For the configuration of the sensor fusion algorithm: 

    mode NDOF
    accRange AR_2G
    gyroRange GR_250DPS

    Which I fully admit to having copied from one of the example apps without fully understanding (the rotating cube app, I think).

    I'm rotating the boards by hand, or placing them on paper which I then move for a bit more precision.

    Do you have any suggestions as to how I can prevent them from slipping out of sync again? Or can I soft reset every time they're connected/disconnected without much consequence?
  • Hrm, that is an interesting behavior regarding the yaw angle (assuming that's what you mean when you say "euler z value").  It's possible the magnetometer is being affected by external disturbances i.e. an iron distortion, which is distorting the heading values.

    You can try using relative orientation changes instead of absolute orientation.  If you don't to reset the board, maybe try doing figure 8 motions.
This discussion has been closed.