How to measure the distance covered by iphone during free fall?

前端 未结 10 1980
耶瑟儿~
耶瑟儿~ 2021-02-02 02:26

During the free fall the iphone is supposed to send acceleration values as 0 on all the three axis. So how to detect the distance covered by the iphone?

10条回答
  •  孤街浪徒
    2021-02-02 03:18

    One solution that would take into account the issue of wind resistance is you could use the difference between acceleration from gravity and your actual norm of acceleration you're reading,

    d2x / dt2 = g - |a|

    Where g = 9.8 and |a| = sqrt(a12 + a22 + a32) where an are the readings from the accellerometer on each axis.

    Then solve the differential equation numerically, with something like Euler's Method.

    You could even be clever and lookup local value of g using GPS.

提交回复
热议问题