我在x方向上旋转我的Android设备(从-180度到180度),见下图.
并且我假设只有旋转矢量x值被改变. Y和z可能有一些噪音,但值之间差别不大.
但是,我收到了这个.请注意
我怀疑我的传感器有一些问题.
任何想法?非常感谢你.
吉米
解决方法:
您的传感器很好.好吧,旋转矢量条目不能简单地与特定轴周围的旋转角度相关. SensorEvent结构由时间戳,传感器,精度和值组成.根据向量,浮点数[]的大小在1-5之间变化.旋转矢量值基于单位四元组,一起形成一个向量,表示此世界框架相对于您上面的智能手机固定框架的方向
它们是无单位的,逆时针正向.
The orientation of the phone is represented by the rotation necessary to align the East-North-Up coordinates with the phone’s coordinates. That is, applying the rotation to the world frame (X,Y,Z) would align them with the phone coordinates (x,y,z).
如果向量是旋转矩阵,则可以将其写为v_body = R_rot_vec * v_world(< - )将世界向量推入智能手机固定描述中.
关于矢量:
The three elements of the rotation vector are equal to the last three compon