BNO080 axis

Hello,

I’have a question about the BNO080 axis.

When I read the BNO080 (here: https://cdn.sparkfun.com/assets/2/b/9/0 … BNO080.pdf), I understand that the BNO080 default frame is define like this (see page 41): “Assume that for the device the BNO08X is mounted in,the Z-axis is Up, the X-axis is East and the Y-axis is North.”

Frame orientation from BNO datasheet:


This correspond to the frame drawn on the board.

Assuming that normaly yaw / pitch / roll is define like this: https://en.wikipedia.org/wiki/Aircraft_ … _ortho.svg, I will have expected that:

  • Rotating BNO around Y axis correspond to a roll value variation

  • Rotation BNO arround X axis correspond to a pitch value variation

But when I upload the “Example17-EulerAngles.ino” from Sparkun, I have:

  • A rotation of BNO arround X axis give variations of Roll values

  • A rotation of BNO arround Y axis give a variation of Pitch values

Exactly the opposite of what I have expected.

Is there something that I miss or I doen’t have correctly understand ?

Thanks,

Math

It’s possible we have X and Y swapped in code.

An easy fix would be to rotate the board 90 degrees and that should flip the X any Y axes the right way around for you. If that gives you negative readings from what you expect on X and Y, rotate the board 90 degrees in the opposite direction.

Hello,

In fact, I I did not pay attention, but it’s clearly writen on the library code :

// Return the roll (rotation around the x-axis) in Radians

// Return the pitch (rotation around the y-axis) in Radians

As I want to use the heading, I cannot rotate the board: Y axis should be orientate to the north.

Math

You’re going to need to modify your code to take this into account then.