GithubHelp home page GithubHelp logo

Yaw Calculation about icm20948_we HOT 2 CLOSED

wollewald avatar wollewald commented on September 24, 2024
Yaw Calculation

from icm20948_we.

Comments (2)

wollewald avatar wollewald commented on September 24, 2024

Hi, the issue with the yaw angle is that you can't calculate it from the (static) acceleration values when the sensor is positioned flat. The z-sensor will show 1g, x and y are 0.

You could use the magnetometer values to detect the direction of the x- and y-axis. In theory, this is easy, in praxis it is less easy. The biggest hurdle is to write a reliable calibration routine. I tried a bit but did not get something which was working good enough. Therefore, my library only provides the raw magnetometer values.

The other option is to constantly measure the gyroscope data. E.g. if you detect a rotational speed of let's say 120°/s for 0.5 seconds, you know that the yaw angle has changed 60°. But even if you measure at high frequency, you will always have certain error and this will sum up over time.

The best option to calculate orientations and rotations is through quaternions (https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation)

You find this implemented e.g. in the great library of Kris Winer for the MPU9250:

https://github.com/kriswiner/MPU9250/blob/master/quaternionFilters.ino

But sorry, this is stuff for which I would need much time to understand how it's working and for the implementation. Time that I do not have, and therefore I will not promise to work on this in near future.

from icm20948_we.

wollewald avatar wollewald commented on September 24, 2024

Since there was no further comment I close this issue.

from icm20948_we.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.