cancel
Showing results for 
Search instead for 
Did you mean: 

Facing issue with MotionMC library

Anil3
Associate III

Hello Everyone!

I am working on a project Ecompass using controllers STM32F401CBU6 and mems sensor ISM303DAC. can able to read raw values of both accelerometer data and magnetometer data properly and after reading the magnetometer data i am parsing magnetometer data to MotionMC library for calibration purpose but after calling MotionMC_GetCalParams function output is always showing as

HI_Bias = {0, 0, 0},

SF_Matrix = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}},

CalQuality = MMC_CALQSTATUSUNKNOWN

i have used systick as timestamp and and also cross verified with heap and stack, rotating the sensor in 3D space 8 direction everting tried but nothing got work..... got stuck at this point.

could anyone please let me know what might be the problem.

Thank you!!!

ANIL.

 

 

12 REPLIES 12
Anil3
Associate III

Hello @Petr S 

As suggested by you I have gone once again through  Magnetometer Calibration application code in latest X-CUBE-MEMS1 and compared my code with the example code there,  i have found that i am making a mistake with the library initialization function and have changed the values accordingly and later i have flashed the code and moved in 3d space an it got calibration quality as 3 which is good. 

but again i have removed the power supply and turned it on now again the calibration quality become 0.... which means we need to calibrate the magneto meter every time with respective to power cycle???

One more this is that, after getting calibrated i have parsed the data to MotionEC library, there i have observed that there is a drift of 0.9 - 1.0 deg  with a standard deviation of 0.10 - 0.15 Is it possible to make the compass not to drift for such a huge values? 

regards,

ANIL.

I'm glad you finally calibrated successfully. After disconnecting power you need to calibrate it again otherwise you should implement storage of your calibration parameters and reload it after powerup but since magnetic field can change it's always better to calibrate again. Concerning the drift I'm not an expert for the algorithm so I cannot answer. Bye bye.

Hello @Petr S

       Let's consider that I am receiving a GNSS heading string, is it possible to calibrate compass by considering that string as reference.

       One more thing!!!! my device is fixed to an antenna and can't move it for calibration purpose. if we consider this  case and calibrating the compass by using previous stored calibration parameters it will give show that it as been calibrated but magnetic filed will differ from place to place and cant get the exact value right. 

regards,

ANIL.