GithubHelp home page GithubHelp logo

Comments (3)

dahlsrud avatar dahlsrud commented on June 10, 2024
  1. My experience is the same. I am not activating the magnetic compass, so in that case the IMU does not have a fixed reference point for Yaw and just initializes it during startup to wherever it is pointing. The gyros can only detect relative movement, and the accelerometers can't detect Yaw. I guess the IMU could fix Yaw towards magnetic north at startup, but during testing I have never achieved that. For Pitch and Roll it is different, because the IMU can easily fix them to the horizontal plane by looking at the accelerometer and determining the direction of gravity.
    If you want a fixed Yaw from every boot I guess you must add some extra code yourself by calculating the magnetic compass heading and compensating gyro Yaw against that. But I'd like to know more info about that myself.

  2. In my understanding, this is a bug. Wikipedia has another formula for calculating Euler from Quaternions which works as expected:
    https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles

from 9dof_razor_imu.

theonteg avatar theonteg commented on June 10, 2024
  1. Does enabled mag log means that it is enabled?
    I was hoping to avoid writing my own code for solving this (so that the solution is merged to the official firmware) but I will try.

  2. Used this (Wikipedia's) approach yesterday but I have one problem. Pitch in some directions freezes at 90 degrees no matter the movement. I don't believe that there is something wrong with the code but I will check it thoroughly this weekend.

from 9dof_razor_imu.

dahlsrud avatar dahlsrud commented on June 10, 2024
  1. I never worked with it, but I suppose so yes.
    I fear that we are lacking a good calibration code for the compass and that it involves having to rotate the IMU physically in 8-circles to gather calibration values for the earth magnetism in a given location.

Btw, the current original firmware also contains a bug which multiplies Pitch with 2 erroneously.

  1. I posted working firmware code in this thread:
    https://forum.sparkfun.com/viewtopic.php?f=14&t=45516
    It contains its own routine to convert Quaternions to Euler angles. It is working great for me.
    You might have to modify the output format for your needs, though.

from 9dof_razor_imu.

Related Issues (20)

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.