Is the BNO055 Euler Vector same as Heading, Pitch, Roll?

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
shanDesai
 
Posts: 12
Joined: Tue Dec 12, 2017 9:38 am

Is the BNO055 Euler Vector same as Heading, Pitch, Roll?

Post by shanDesai »

hello,

I have a BNO055 Interfaced to a Yun and want to display Linear Acceleration and Heading, Pitch and Roll.
I do use the code in the GitHub Repo as follows however the most confusing part is with .x(), .y(), .z() where as I am in need of Heading Pitch and Roll

Code: Select all

imu::Vector<3> euler = bno.getVector(Adafruit_BNO055::VECTOR_EULER);

  /* Display the floating point data */
  Serial.print("X: ");
  Serial.print(euler.x());
  Serial.print(" Y: ");
  Serial.print(euler.y());
  Serial.print(" Z: ");
  Serial.print(euler.z());
Serial.print("\t\t");
Does the above mention code actually equate to Heading, Pitch, Roll or should I perform something else to obtain the results?

Thanks.

User avatar
dlleigh
 
Posts: 225
Joined: Wed Jan 30, 2013 8:08 pm

Re: Is the BNO055 Euler Vector same as Heading, Pitch, Roll?

Post by dlleigh »

The Euler vector contains the Euler angles. You can read about them here: https://en.wikipedia.org/wiki/Euler_angles

The Euler angles are referenced to "down" (the gravitational direction) and magnetic north. How these relate to your heading, pitch and roll will depend on how you've oriented the sensor board with respect to the moving platform, as well as whether the platform can only move in one direction with respect to its shape (like an airplane) or multiple directions (like a quadrotor). For an airplane. the heading is always in the direction of the nose. For a quadrotor, the heading can be in almost any direction w.r.t. the platform, which is a problem because the BNO055 has no way of knowing the direction in which it's heading. It can only measure it's orientation relative to gravity and the earth's magnetic field.

The easiest way to visualize how the Euler angles map onto heading, pitch and roll is to print them out while rotating the sensor board in various directions. Having a magnetic compass handy will help. Hold the board level and point it toward magnetic north, then rotate it in the plane while observing the Euler angles. Do the same, but applying "pitch" and "roll" rotations instead of "yaw".

Let us know how it goes.

User avatar
shanDesai
 
Posts: 12
Joined: Tue Dec 12, 2017 9:38 am

Re: Is the BNO055 Euler Vector same as Heading, Pitch, Roll?

Post by shanDesai »

Hi, In my case they will be on a boat which I guess, might be considered as a case similar to the aeroplane travelling in a single direction.
Hence should I align the board in the front of the boat and the heading would perhaps be in the X direction (Assumption here!) and Euler.x() would be the same value as heading?

User avatar
dlleigh
 
Posts: 225
Joined: Wed Jan 30, 2013 8:08 pm

Re: Is the BNO055 Euler Vector same as Heading, Pitch, Roll?

Post by dlleigh »

One of the Euler angles will probably be the same (or nearly the same) as the heading if you align the sensor board with the boat as you suggest. I say nearly because there might be a sign change.

Your best bet is to just try it and see what you get.

User avatar
jps2000
 
Posts: 811
Joined: Fri Jun 02, 2017 4:12 pm

Re: Is the BNO055 Euler Vector same as Heading, Pitch, Roll?

Post by jps2000 »

You may have a look at this
viewtopic.php?f=19&t=124368

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”