Skip to content

Accelerometer and gyroscope seem to be swapped #27

@z80

Description

@z80

Hello!

Awesome implementation! Thank you so much for making it available at github!
I've tested your code (commit 0b869f4). My impression is accelerometer and gyroscope readings are swapped. I.e. accelerometer shows angular velocity and gyroscope shows acceleration.

For example, this code
builder << "gyro x: " << (int)inState.gyroscope.x << std::endl;
builder << "gyro y: " << (int)inState.gyroscope.y << std::endl;
builder << "gyro z: " << (int)inState.gyroscope.z << std::endl;
builder << "acc x: " << (int)inState.accelerometer.x << std::endl;
builder << "acc y: " << (int)inState.accelerometer.y << std::endl;
builder << "acc z: " << (int)inState.accelerometer.z << std::endl;

provides this output (controller is 100% stationary)
gyro x: -243
gyro y: 8187
gyro z: 1453
acc x: -5
acc y: 11
acc z: 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions