cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble runing MotionGC_Update function.

PMach.1
Senior

Hi,

I've been trying to get the calibration values for my gyroscope using MotionGC library. I'm using the sample code available in the MotionGC starter guide but the said function return all the output values as 0. The bias_update variable is also set to 0, meaning that the sensor isn't stable, or so the guide says.

However, I'm being very careful to hold the sensor at a given position and not move it throughout the measurements.

What might be the cause of this issue?

Thanks in advance.

Kind regards,

Pedro Machado

22 REPLIES 22

Good news, Pedro, I've used your data for feeding the MotionGC library using GyroscopeCalibration application from X-CUBE-MEMS1 package running on Nucleo-L476RG + IKS01A3 exapansion board and you can see very good result in the attached picture above. Summarized: your accelerometer data are stable enough; your sample rate is 1 sample per 29 ms = almost 35 Hz, which is in the range <25 Hz; 200 Hz> required by the library; library returns calculated bias correctly and calibrated gyroscope data look reasonable. I don't know where exactly is the issue in your application but I'm sure that you have good data and library works well. Please focus on correct data feed, that's all I can think of without having your code and your HW.

Hi, Petr,

I finally found out what the (stupid) problem. I was testing the calibration for a set of 20 readings. Turns out that the calibration function only starts outputting data after the 21st reading. Being so, increasing the number of readings that input the said function solved the problem!

That's great you solved it, thanks for the info.