找回密码
 注册
搜索
查看: 1344|回复: 2

[讨论] G—Sensor TitlAngle是什么概念

[复制链接]
发表于 2010-11-24 14:34:40 | 显示全部楼层 |阅读模式
最近在看G—sensor,只是看上层的API,有些地方不确定,请研究过的朋友释疑
/*The enum of angle related to G*/
typedef enum
{
    MDI_MOTION_ANGLE_GX0,   /*angle from G to X axis is 0*/
    MDI_MOTION_ANGLE_GY0,   /*angle from G to Y axis is 0*/
    MDI_MOTION_ANGLE_GZ0,   /*angle from G to Z axis is 0*/
    MDI_MOTION_ANGLE_GX180, /*angle from G to X axis is 180*/
    MDI_MOTION_ANGLE_GY180, /*angle from G to Y axis is 180*/
    MDI_MOTION_ANGLE_GZ180, /*not support yet*/
    MDI_MOTION_ANGLE_OTHER, /*other angle*/
    MDI_MOTION_ANGLE_TOTAL
} mdi_motion_angle_enum;
上面的是什么意思?
我的理解:G永远是垂直水平面向下的,XYZ是依手机变化的(相对手机是固定不变的),通过G和XYZ的夹角可以确定手机
静置时的唯一一种状态,上面的enum只是列举了几种典型的状态,非典型的都是MDI_MOTION_ANGLE_TOTAL。
上面的理解对吗?
另外夹角是G与各轴正方向的夹角,例外的是Z轴,只支持0-90°,说要硬件支持才可以0—180°,不明白XY都可以180°Z轴为何做不到?
 楼主| 发表于 2010-11-26 13:46:42 | 显示全部楼层
高手解答一下呗
点评回复

使用道具 举报

 楼主| 发表于 2010-11-24 15:54:32 | 显示全部楼层
下面的north和acc是什么概念?   
    S32 angle_nx;    x angle related to north, 0-180 and less then 0 means not support*/
    S32 angle_ny;   /* y angle related to north, 0-180 and less then 0 means not support*/
    S32 angle_nz;   /* z angle related to north, 0-180 and less then 0 means not support*/
    S16 acc_x; /*acc*10 at x axis*/
    S16 acc_y; /*acc*10 at y axis*/
    S16 acc_z; /*acc*10 at z axis*/
谢谢
点评回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-10-6 18:35 , Processed in 0.044496 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表