简体   繁体   English

是IPad加速度计归一化到重力

[英]is IPad accelerometer normalized to gravity

While porting my Android app to iOS I was confused with one thing, so I want to find out: am I right or mo code works wrong. 在将我的Android应用程序移植到iOS时,我对一件事情感到困惑,所以我想找出:我是对的还是mo代码工作错误。 At Android device accelerometer returns values in physical measure units: m/s2. 在Android设备上,加速度计以物理度量单位返回值:m / s2。 On ipad i get summary force approximately = 1.0 for still device(and i expect 9.8). 在ipad上,对于静止设备,我获得大约= 1.0的汇总力(我期望9.8)。 My first explanation is that returning value is normalized to 9.8, so I must multiply it with 9.8 to get real force. 我的第一个解释是返回值被标准化为9.8,所以我必须将其乘以9.8以获得真正的力量。 My second idea - my code is totally wrong, but it's hard to believe. 我的第二个想法 - 我的代码是完全错误的,但很难相信。

From the Docs on CMAcceleration: 来自CMAcceleration的文档:

CMAcceleration
The type of a structure containing 3-axis acceleration values.

typedef struct {
      double x;
      double y;
      double z;
} CMAcceleration;

X-axis acceleration in G's (gravitational force). G轴的X轴加速度(重力)。
Y-axis acceleration in G's (gravitational force). G轴的Y轴加速度(重力)。
Z-axis acceleration in G's (gravitational force). G轴的Z轴加速度(重力)。

AG is a unit of gravitation force equal to that exerted by the earth's gravitational field (9.81 ms−2). AG是引力的单位,等于地球引力场所施加的引力(9.81 ms-2)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM