Skip to content

Commit 624ec3e

Browse files
committed
Fix the Q point used for heading accuracy estimate.
Per the SH2 manual, Section 6.5.18 Rotation Vector (0x05) In addition an estimate of the heading accuracy is reported. The units for the accuracy estimate are radians. The Q point is 12.
1 parent 263c274 commit 624ec3e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/SparkFun_BNO080_Arduino_Library.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ float BNO080::getQuatReal()
372372
//Return the rotation vector accuracy
373373
float BNO080::getQuatRadianAccuracy()
374374
{
375-
float quat = qToFloat(rawQuatRadianAccuracy, rotationVector_Q1);
375+
float quat = qToFloat(rawQuatRadianAccuracy, rotationVectorAccuracy_Q1);
376376
return (quat);
377377
}
378378

src/SparkFun_BNO080_Arduino_Library.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ class BNO080
271271
//These Q values are defined in the datasheet but can also be obtained by querying the meta data records
272272
//See the read metadata example for more info
273273
int16_t rotationVector_Q1 = 14;
274+
int16_t rotationVectorAccuracy_Q1 = 12; //Heading accuracy estimate in radians. The Q point is 12.
274275
int16_t accelerometer_Q1 = 8;
275276
int16_t linear_accelerometer_Q1 = 8;
276277
int16_t gyro_Q1 = 9;

0 commit comments

Comments
 (0)