Skip to main content
Visitor II
February 14, 2018
Question

MotionFX gives wrong results

  • February 14, 2018
  • 2 replies
  • 2639 views
Posted on February 14, 2018 at 20:16

Hello to all,

I'm trying to get run the MotionFX library using STM32F4 Discovery board and STEVAL-MKI159V1 board (which consists of 9 axes LSM9DS1 inertial module). I represent this module as a combination of LSM6DS0 accelerometer+gyroscope and LIS3MDL magnetometer which seems to be correct according to the data sheets of these modules.

I got the library run but the output values are very weird.

Firstly, I can't find the units of them anywhere. Are they the same as input units?

Secondly, the gravity data just roll from -1 to 1 for all axes.

The acceleration and rotation seem to be random numbers.

The heading has some consistency but sill jumps as well.

Also I never can get the magnetometer calibration done.

I've checked the input data and it seems to be correct for all sensors.

Can anybody help me and explain what I'm doing wrong?

Kind regards,

Sergey

#lsm9ds1 #motionfx #lis3mdl #lsm6ds0

Note: this post was migrated and contained many threaded conversations, some content may be missing.
    This topic has been closed for replies.

    2 replies

    Visitor II
    February 15, 2018
    Posted on February 15, 2018 at 15:04

    Hi Sergey,

    I suggest to start with the example, DataLogFusion is using MotionFX library.

    Have you read already the

    http://www.st.com/content/ccc/resource/technical/document/design_tip/group0/4e/f7/06/e0/34/0f/44/ca/DM00358267/files/DM00358267.pdf/jcr:content/translations/en.DM00358267.pdf

    ?
    Visitor II
    February 15, 2018
    Posted on February 15, 2018 at 15:49

    Hi Jaime,

    I am using exactly this example which I've changed a bit to run it with the available hardware.

    I read the Quick guide but haven't found there anything that can help me.

    Is it possible that this weird behavior is caused by incorrect knobs?

    Kind regards,

    Sergey

    Visitor II
    February 15, 2018
    Posted on February 15, 2018 at 17:00

    Yes, knobs have a big impact on the behavior.

    The input values are:

    • mag in uT/50
    • acc in g
    • gyro in dps

    Make sure you're passing the data with that units.

    The output data is:

    • rotation in degrees
    • quaternion has not units
    • gravity in g
    • linear acceleration in m/s2
    Visitor II
    February 15, 2018
    Posted on February 15, 2018 at 18:02

    Thank you very much for clarifications.

    I left the knobs as the were in the original DataLogFusion example, just changed the orientation (maybe incorrectly though, but I tried different variants, the result is the same).

    And I wonder why magnetometer calibration never gets successful...