Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I have a doubt regarding the UIAccelerometer.
单位为1g = 9.81m/s^2,例如地球重力场的加速度。
加速度是速度的变化。只有知道 t0 时刻的速度,才能得到 t1 时刻的速度。然后
v(t1) = v(t0) + (a(t1) - g) * (t1-t0)
,假设 t1 和 t0 是两次连续测量的时间。这里 v 是速度矢量,a 是加速度矢量,g 是重力矢量。
然而,iOS 设备中的加速度计有很多噪音,并不特别适合跟踪速度(或位置)。对于大范围的距离,您有 GPS。对于小距离,没有可靠的方法。
最好的,彼得。