cancel
Showing results for 
Search instead for 
Did you mean: 

lsm6dsv and quaternions and direction of a cube/dice

MK..1
Associate III

Hi 

based on the quaternion/Sensor fusion of LSM6DSV example I developed an application where I display the direction of a cube. Everything works fine, no drift, but: when I take the device move and turn it around, then put it back in the same exact position, the drawing on the PC is not back to the same direction as when I started.

What is going wrong?

Thx

1 ACCEPTED SOLUTION

Accepted Solutions
MK..1
Associate III

Hi

actually I played around with the different parameters and solved it. I didn't need the magnetometer.

The parameter  I changed was "sm6dsv_gy_full_scale_set(&dev_ctx, LSM6DSV_2000dps);"

I set it to a lower value.

View solution in original post

3 REPLIES 3
Eddess
Associate II

It is most likely due to derivation from the imprecision of the gyroscope. This problem can supposedly be solved by adding a magnetometer but so far I haven't been able to get the magnetic data from my sensor hub so I can't guarantee it will work.

MK..1
Associate III

Hi

actually I played around with the different parameters and solved it. I didn't need the magnetometer.

The parameter  I changed was "sm6dsv_gy_full_scale_set(&dev_ctx, LSM6DSV_2000dps);"

I set it to a lower value.

that makes sense less precision means less error derivation

how did you manage to set the lsm6dsv to give you quaternion information by the way?