How to find time and speed using iPhone's accelorometer
Let me tell you my physics is very bad. I want to calculate time between two points. The situation here is - if an object is moved from say point x to point y with an acceleration which is not constant, can we calculate the time between those points?
For example, if I am playing golf and I need to hit the ball, first I will need to swing my club backwards. Then I swing the club forward and hit the ball. I need to find the time taken to reach the peak of backward swing and the time taken to contact the ball.
Any ideas how I can achieve this using the iPhone accelerometer? I know we can use the core motion framework for this开发者_运维问答 purpose, but am not sure how to find the time and speed. What kind of calculations do I need to do to achieve this?
I think it's not impossible to get the information you want. But it is not that easy and needs enhanced maths and a lot of research & development i.e. try and error. The more complex your motion to detect the less exact the result will be. Same for duration: a long running motion (>2 sec) will be very hard to detect correctly.
You should have a look at the following questions:
Getting displacement from accelerometer data with Core Motion
Promising because brutella said he got his approach working already: Measuring time the vehicle takes to accelerate in iPhone
精彩评论