How do I measure the distance traveled by an iPhone using the accelerometer?

后端 未结 5 1298
渐次进展
渐次进展 2020-12-13 11:33

While GPS works for long distance changes, I would like to measure a shorter distance by using the iPhone\'s accelerometer.

Say I want to measure a height of a box u

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-13 12:06

    Depending on the application, and how much accuracy you need, you may be able to use the new 6-axis gyro accelerometers in the iPhone 4 and iPod Touch 4th Gen. You could get the total displacement by integrating the acceleration vector.

    When integrating acceleration to get displacement, any errors will be cumulative, so this may not be appropriate, but may be worth considering.

提交回复
热议问题