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

前端 未结 10 1978
耶瑟儿~
耶瑟儿~ 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:05

    From a standing start

    distance = 0.5 x acceleration x time2

    Gravitational acceleration = 9.81 m/s2

    I'm going to assume you're not dropping the phone far enough to reach terminal velocity. If you do, I doubt your app will be of much use when you recover the phone :)

    0 讨论(0)
  • 2021-02-02 03:07

    Ignoring air drag:

    float t; // time since drop
    float distance = 9.81f * 0.5f * t * t;
    

    For greater distance (drop from airplane) you also could use the location services. CLLocation contains an altitude.

    0 讨论(0)
  • 2021-02-02 03:08

    Do not trust Newton laws, they ignore air drag, Iphone rotation etc. Use empirical approach instead. Let the device fall from several heights like 1m, 2m, 5m, 10m, 30m... Repeat several times for each height. In each fall measure time. Approximate results by spline. Compute inverse function.

    0 讨论(0)
  • 2021-02-02 03:09

    If your accelerometers are reporting zero, then you have the problem of determining when your motion has completed.

    So determine the deceleration upon impact, then determine the maximum speed at the beginning of deceleration, then work backwards from this. Assuming linear movement, the absence of terminal velocity and air resistance, linear deceleration (perhaps), and that your phone still works!

    0 讨论(0)
  • 2021-02-02 03:17

    This is very simplistic, because you have to account for air friction. Air friction causes the device to reach "a" terminal velocity. Only at terminal velocity will the accellerometer indicate 0.

    The formulas given here assume a free fall in a void (no friction).

    In other words, it's pretty complicated to calculate the distance travelled (one problem is that terminal velocity depends on the orientation of the phone while falling).

    0 讨论(0)
  • 2021-02-02 03:17

    The accelerometer will read 0 (or g) on all 3 axis whether it is in freefall or sitting on a table. Therefore the question is moot, since there is no way to determine the distance without making the assumption of freefall.

    0 讨论(0)
提交回复
热议问题