关于roll pitch raw可参考
http://blog.sina.com.cn/s/blog_602c72c50100p7fn.html
以MMA8452Q为例X,Y,Z轴的定义如下
Y,X,Z轴均是相对机身位置的。Y指向机身向前,X向机身向右,Z垂直机身正面。对下图而言,Z轴与地心引力同向。
X,Y,Z轴的数据一般是一个单位的地心引力(大小1g(m*m/s),方向垂直地面向下),在各轴上的投影。
Pitch (ρ) is defined as the angle
of the X-axis relative to ground. Roll (ϕ) is defined as the angle
of the Y-axis relative to the ground. Theta (θ) is the angle of
the Z axis relative to gravity.
线与面的夹角范围是0-90度。
地平面是与g向量垂直的。夹角的计算方法原理,可以去回忆下高中(大学也学了吧)立体几何的知识。