Search code examples
iphoneobjective-caccelerometergyroscopecore-motion

How to use accelerometer, CMMotion data to locate a point in 3D space?


I am creating an application. In which iPhone will be placed (a separate cover is made for it) with golf club(racket). I want to get array of points which state the path of the racket movement.

For example, I start collecting the data when racket is on the ground. After then user prepares himself for shot. So, he will take the racket back side and then he will hit the shot by moving racket forward. I want to catch all these points in 3D and want to plot them on screen (2D projection). I saw many similar questions, accelerometer, CMMotion framework documents. But could not find a way to doing so.

I hope, I have explained the question properly. Can you suggest me some formula or how to process the data to achieve it?

Thanks in advance.


Solution

  • You cannot track these movements in the 3D space.

    But you can track the orientation of the racket and that should work well.

    I have implemented a sensor fusion algorithm for the Shimmer platform, not a trivial task. I would use Core Motion and I would not try to create my own sensor fusion algorithm.

    Hope this helps, good luck!