2020-10-23 07:04 AM
Hello I am using Lsm6dsox(acc and gyro) and lsm303ah(mag) and sending data to motionfx to calculate the linear acceleration.
My sensors are working in mode2 sync with drdy at 104HZ. So I'm reading every 10ms the data from the sensors and sending it to motionfx to calculate the linear acceleration. I ve set the motionfx setting as described in example, and calibrated the magnetometer.
My problem is the following:
So I shake the board and rotate and the data seems good, but when I put it on table while shaking to rest in a stationary state,it has a slope it takes to long to convergate to zero(about 2s).
How can I achieve to go instantly to zero when in statinary state?
Solved! Go to Solution.
2020-10-27 05:21 AM
Hi @Eleon BORLINI actually playing with the Atime and Mtime solved my issue! LMode is set to 2, but know I'm having problem with the quaternions.
If I hold the device steady in the hand and move in one direction, I expect that the quaternion values are more or less static during the walk but the values vary a lot.
Edit: I have printed now motiofx data heading_9X so if I rotate it on the table fast seems to be good. But when I take the device in my hand and walk from A to B in one direction data seems good, than i rotate, and stand still for 5s and go back from B to A the data seems also good. But if I rotate faster about 1 second and go back from B to A data is bad. It is like the magnetometer needs some time when I walk and rotate. How can I fix this?
2020-10-23 08:08 AM
Hi @suads ,
do you see these slow data value variations before the motionFX algorithm (I mean, if you acquires the LSM6DSOX acceleration stand alone), or just after the sensor fusion computation? In the first case, for the LSM6DSOX you could enable the High Pass filter HPCF_XL_[2:0] in the CTRL8_XL (17h) and the HP_SLOPE_XL_EN bit of the same register for configuring the Accelerometer slope filter / high-pass filter. See datasheet, p. 63.
-Eleon
2020-10-23 11:06 AM
Hi @Eleon BORLINI I'm using it after motionfx algorithm, I set the MTime to 6 and Atime to 0.5 also I Have calibrated the gbias_acc/gyro/mag_th_sc it is better, but still Is there anyting I can do more to correct this issue?
Thank you!
2020-10-26 09:57 AM
Hi @suads ,
How did you configured the "LMode" parameter that represents the gyroscope bias learning mode? This should automatically track and calibrate gyro zero-rate bias drift.
-Eleon
2020-10-27 05:21 AM
Hi @Eleon BORLINI actually playing with the Atime and Mtime solved my issue! LMode is set to 2, but know I'm having problem with the quaternions.
If I hold the device steady in the hand and move in one direction, I expect that the quaternion values are more or less static during the walk but the values vary a lot.
Edit: I have printed now motiofx data heading_9X so if I rotate it on the table fast seems to be good. But when I take the device in my hand and walk from A to B in one direction data seems good, than i rotate, and stand still for 5s and go back from B to A the data seems also good. But if I rotate faster about 1 second and go back from B to A data is bad. It is like the magnetometer needs some time when I walk and rotate. How can I fix this?
2020-10-30 08:21 AM
Hi @suads ,
glad to hear from you you solved your problem, at least partially.
Did you periodically calibrate the magnetometer, for example with this gesture?
-Eleon
2020-10-30 02:23 PM
hi @Eleon BORLINI yes one of my problem was I calibrated it once at the beginning and never check again MFX_MAGCALGOOD. Also I needed to test with different values for Mtime,Atime,Frtime to get the linear acc and quaternions bout correct, for now it seems the data is ok.
Also I want to point, If someone is having problems? There are 2 different documents the older one DT0075 and newer one UM2220
FRTime,ATime and Mtime differ in this two documents. In the old from 0.5 - 10 and new from 0 - 1.
Old DT0075
New UM2220
Thanks, need some more tests to be for sure!
2020-11-04 06:53 AM
HI @suads ,
Thank you for your reporting.
Please refer to the second manual, the more recent user manual UM2220.
I'll check internally why we have two different indications online... The first one might refer to an older version of the Sensor fusion library...
-Eleon