BNO055をI2CとUARTで使用するためのライブラリ。UARTはmbedにて不安定なため使用できるボードとできないボードがある模様。
Dependents: BNO055_BME280_ Yabusame2_gyro GRhanawaizman test_deg_read
Revision 5:64b033b30802, committed 2019-05-13
- Comitter:
- Yajirushi
- Date:
- Mon May 13 14:46:38 2019 +0000
- Parent:
- 4:9efb4abafd2e
- Commit message:
- change comment
Changed in this revision
BNO055.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/BNO055.cpp Mon May 13 14:17:45 2019 +0000 +++ b/BNO055.cpp Mon May 13 14:46:38 2019 +0000 @@ -1164,12 +1164,12 @@ // 2019/05/13: 記事中のRollとPitchの軸の説明が逆であるため修正 double q3q3 = q3 * q3; - //Y-axis rotation + //X-axis rotation double m1 = +2.0 * (q1 * q2 + q3 * q4); double m2 = +1.0 - 2.0 * (q2 * q2 + q3q3); E_pitch = atan2(m1, m2) * 57.2957795131; - //X-axis rotation + //Y-axis rotation m1 = +2.0 * (q1 * q3 - q4 * q2); m1 = (m1 > 1.0)? 1.0 : m1; m1 = (m1 < -1.0)? -1.0 : m1;