Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BHI160B sudden jumps in quaternion

    BHI160B sudden jumps in quaternion

    Established Member

    Dear Bosch community,

    We are performing some tests with BHI160B, and occasionally we observe sudden jumps in quaternion elements.

    A CSV file of the log and a few screenshots are attached.

    We are using the "Bosch_PCB_7183_di03_BMI160-7183_di03.2.1.11824" firmware and the provided c driver ( with some modifications:

    • 100Hz sampling rate
    • Sensor mounted vertically with proper remapping matrix 

    Any advice would be highly appreciated.

    9 REPLIES 9

    Community Moderator
    Community Moderator

    Hi soroush,

    In your CSV log file, accuracy was always 0. Could we know detailed information about your hardware and software information?

    Established Member

    Thank you for your reply.
    To our understanding, according to the datasheet (revision 1.6, page 60), the game rotation vector's accuracy is supposed to be zero. 

    We are using STM32L475RG, bare metal, tool-chain: Ac6 STM32 MCU GCC (O3 optimization), I2C (400Hz), BHI160B's ROM: v11693 RAM: v11824.FIFO size: 500B, Sample rate: 100Hz

    Please let me know if I can provide more details

    New Poster

    We have the same problem with our BHI160B.  Hope the bosch engineer can give more explanation.

    Established Member

    An update regarding discontinuity on quaternion data:

    We always warm start our BHI160B by uploading previously saved acc/gyro biases to the sensor and ensuring that the acc/gyro accuracies both go to level 3 before any test. Recently, we also tried to perform a 6-face calibration after the warm start and in this situation discontinuity in Game Rotation Vector quaternion data is slightly less frequent but still exists which leads to more than 30 deg error in Euler angles. We tried to match the time when discontinuities happen with changes in acc/gyro biases or other events but we cannot see any associations.

    We perform our tests in a way that we hold the sensor in hand and swing our arm to +- 60 deg. We also have a platform which has a little bit of vibration and the same movements make discontinuity even more frequent.

    Any advice to solve this problem is highly appreciated.