android 方向euler,android – 如何从旋转矢量获取欧拉角(Sensor.TYPE_ROTATION_VECTOR)

我在x方向上旋转我的Android设备(从-180度到180度),见下图.

并且我假设只有旋转矢量x值被改变. Y和z可能有一些噪音,但值之间差别不大.

但是,我收到了这个.请注意

我怀疑我的传感器有一些问题.

任何想法?非常感谢你.

吉米

解决方法:

您的传感器很好.好吧,旋转矢量条目不能简单地与特定轴周围的旋转角度相关. SensorEvent结构由时间戳,传感器,精度和值组成.根据向量,浮点数[]的大小在1-5之间变化.旋转矢量值基于单位四元组,一起形成一个向量,表示此世界框架相对于您上面的智能手机固定框架的方向

3de15488644e5a178bc437f7426192fe.png

它们是无单位的,逆时针正向.

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值