Skip to content

Conversation

tao-qian
Copy link

Hello, I added two methods for the calculation of pitch and poll, which are commonly used with heading.

@kevin-pololu
Copy link
Member

Thank you for your contribution. Can you explain where you got your formulas for calculating pitch and roll?

Do you assume that the -Y axis is the "front" and the +Z axis is the "top"? This seems to produce results that make the most sense, although it seems like the angles might be reversed from what I understand to be the convention: according to this Wikipedia article, "The most common aeronautical convention defines the roll as acting about the longitudinal axis, positive with the starboard (right) wing down. The yaw is about the vertical body axis, positive with the nose to starboard. Pitch is about an axis perpendicular to the longitudinal plane of symmetry, positive nose up." (Though no source is cited, so I don't know if that's right or not.) Do you have a reason for picking the convention you did?

@tao-qian
Copy link
Author

Hello,
It has been a while since I wrote the code and now I cannot find the reference site I used. The convention stated in the Wiki article makes sense to me. And I believe it is probably the one that most people use. Thank you for pointing that out!

@smileage001
Copy link

Hi, I found an issue when using the function 'getDeviceType' , the result of determined device type was wrong. I was using LSM303DLH, but the result returned was DLHC. So the acc address was wrong.
Thank you for your code!

@mdobres
Copy link

mdobres commented Sep 3, 2017

Hi,
I want to use the pitch and roll functions you have added, but cannot seem to access them. I have re-downloaded the library zip file, and assumed you used them as mypitch = compass.pitch().
However that doesn't work.

I have a version of your compass heading working just fine on my arduino, how to I get to pitch and roll?
can you give me an example usage, or maybe the functions are not merged into my library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants