Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accelerometer and gyroscope seem to be swapped #27

Open
z80 opened this issue Jul 8, 2021 · 0 comments
Open

Accelerometer and gyroscope seem to be swapped #27

z80 opened this issue Jul 8, 2021 · 0 comments

Comments

@z80
Copy link

z80 commented Jul 8, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant