LoginSignup
0
0

More than 5 years have passed since last update.

傾斜計 > dmpGetYawPitchRoll()はバグっているのかもしれない

Last updated at Posted at 2016-07-01

関連 http://qiita.com/7of9/items/b8a31f470555fb845cb5
関連 http://qiita.com/7of9/items/31fa9ab93e792f60a3d8

Quaternionを使っての図示に失敗したため、roll, pitch, yawで図示しようとしている。
しかしこちらも意図通りに図示できていない。

そんな中、以下のリンクを見つけた。
http://forum.arduino.cc/index.php?topic=331084.0

When I spin my mpu6050 in 80 degree in the X axis (or Y axis) the MPU6050 tells my arduino it has 80 degree, great! But when I spin my mpu6050 in 100 degree in the X axis (or Y axis) the MPU6050 also tells my arduino it has 80 degree!

dmpGetYawPitchRoll()の結果がどうもおかしいということらしい。

#10にてPs991さんが独自の計算関数を掲載している。
それを実際にためしてみた。

左3つはdmpGetYawPitchRoll()の出力。右3つはPs991さんの関数の出力。

yawPitchRoll    177.60  -1.75   -79.81 |    177.60  350.04  79.96
...
yawPitchRoll    177.73  -1.75   -82.36 |    177.73  346.73  82.57
...
yawPitchRoll    178.05  -1.78   -87.03 |    178.05  323.21  87.62

値がプラスマイナス違うのは定義の問題なのでなんとかなる。

問題は2つ目の数値(-1.75と350.04)や(-1.78と323.21)など。
両者の値が足して360度になるなら定義の違いだけだが、足しても360にならない。どちらかの計算に間違いがあるが、dmpGetYawPitchRoll()はバグっているのかもしれない。

関連あるのか不明だが、以下のリンクも見つけた。
https://github.com/jrowberg/i2cdevlib/issues/64

Hello, I'm not totally sure but I think the problem is because dmp code on this library isn't the last version. Invensense updated a new code (you can download it in invensense official website in developers corner).

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0