Coder Social home page Coder Social logo

Comments (5)

xioTechnologies avatar xioTechnologies commented on September 26, 2024

The type of the argument gyroscope is FusionVector. This is a structure with three members: x, y, and z. These are the x, y, and z axis measurements provided by the gyroscope.

Pitch, roll, and yaw are Euler angles. These terms are not applicable to gyroscope measurements of angular velocity. The word "normalized" has a specific meaning when referring to vectors. The gyroscope vector should not be normalised.

from fusion.

David-OConnor avatar David-OConnor commented on September 26, 2024

Thank you for the detailed explanation!

The IMU gyroscopes I've dealt with measure angular velocity in 3 axes, which can be described a pitch, roll, and yaw. How would you use these in this library's update function API?

typedef union {
    float array[3];

    struct {
        float x;
        float y;
        float z;
    } axis;
} FusionVector;

My best guess is the mapping is x: pitch, y: roll, z: yaw, based on the axes of rotation.

Both the gyro and accel readings are of type FusionVector. This makes sense for the accelerator, since it really is an acceleration vector in 3 axes. It's a bit... muddier for the gyro.

from fusion.

xioTechnologies avatar xioTechnologies commented on September 26, 2024

Gyroscope axes are usually described as: x, y, and z. It sounds like the gyroscope you are using has instead assigned the labels: pitch, roll, and yaw. The correspondence of these labels is ambiguous. Are you able to share a link to the documentation?

from fusion.

David-OConnor avatar David-OConnor commented on September 26, 2024

Looking at the datasheet, it's described as you say - around the X, Y, and Z axes. The pitch/yaw/roll terminology isn't part of the IMU, but a convention I've been using, where x, y, and z are linear directions, and pitch, roll, and yaw are angular directions. With this in mind, your explanation solves this entirely. Thank you very much!

image

So, the mapping I'm now using, from an internal struct works out to be:

let gyro_data_for_ahrs = Vec3 {
    x: imu_data.v_pitch,
    y: imu_data.v_roll,
    z: imu_data.v_yaw,
};
let accel_data_for_ahrs = Vec3 {
    x: imu_data.a_x,
    y: imu_data.a_y,
    z: imu_data.a_z,
};

from fusion.

David-OConnor avatar David-OConnor commented on September 26, 2024

Fixed by #9

from fusion.

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.