top of page

Pitch And Roll

Pitch angle is an angular rotation around the front to back axis (x-axis). Roll angle is an angular rotation around the side to side axis (y-axis). Yaw (heading) angle is an angular rotation around the vertical axis (z-axis). The accelerometer measures linear acceleration based gravitational velocity. With the help of accelerometer output pitch and roll can be calculated. Equations below show the calculation of pitch and roll angle.


Pitch = arctan(acc_x/((acc_x) ^2 + (acc_z) ^2)

Roll = arctan(acc_y/(acc_y) ^2 + (acc_z) ^2)


Where pitch and roll output are in radians, after converting it into degrees the range of -90 to 90 degrees.

Comments


Drop Me a Line, Let Me Know What You Think

Thanks for submitting!

© 2023 by Train of Thoughts. Proudly created with Wix.com

bottom of page