Closed tcerqueira closed 2 years ago
The accel, gyro, and mag all use the coordinate frame depicted. If I accelerate the gyro in the positive X direction, I get a positive acceleration. Positive gyro is likewise a right-hand rotation around the axis. I'm not seeing why you think the accel and gyro are inverted.
For example, with my breakout board laying flat the acceleration along the z-axis is -9 meaning the z-axis is pointing up. I'd expect a negative rotation if I rotate clockwise, which is not the case. The same happens for other axis. So only the gyro frame matches the documentation.
Im using this board if it matters. https://electropeak.com/learn/interfacing-gy-91-9-axis-mpu9250-bmp280-module-with-arduino/
I think there's a misunderstanding; an accelerometer at rest will measure 9.80665 m/s/s of upwards acceleration. There is a Wikipedia article that gives a decent explanation. You can try accelerating the IMU by hand in different directions (i.e. accelerating forward along the X axis) and I think you can see that the accelerometer and gyro axis are in agreement and match the documentation.
Oh I thought the accelerometer data was an acceleration vector so I was expecting a positive value for gravity since the z-axis is down. Wrong assumption I guess, thanks for clarifying.
It is an acceleration vector, except for gravity.
Months using this library with some problems along the way and I just realized for each gyro axis the accelerometer axis is inverted. I have been assuming the same frame of reference for both and it explains a lot of my problems. Is this intended behaviour or am I missing something?