Skip to main content
Visitor II
February 1, 2023
Question

MotionEC Update Rate

  • February 1, 2023
  • 1 reply
  • 1218 views

I'm using an LSM303AGR to create a compass using the MotionEC library for calculating quaternions.

Since the ODR of the magnetometer inside the LSM303AGR is 20Hz while the ODR of the accelerometer is 25Hz with which frequency and with which data is it better to call the MotionEC_Run function?

    This topic has been closed for replies.

    1 reply

    ST Employee
    February 2, 2023

    I would recommend to run both accelerometer and magnetometer at 50Hz, this ODR is available for both sensors. If not possible you can call the function at 25Hz with actual accelerometer data and latest available magnetometer data.

    CSharpinoAuthor
    Visitor II
    February 2, 2023

    Thanks for the reply, if instead I go down to 10Hz which is an ODR available for all 2 components is that a problem? I have not found any information on the minimum frequency with which MotionEC is usable.

    ST Employee
    February 2, 2023

    It is not a problem. It depends how fast motion do you want to track and what is your target application. With 10Hz the response won't be so fast.