3

How would I go about the following: I want to capture the device's movement across space.

I mean, is there a way to know using iOS frameworks where exactly the device moved in the room's 3 dimensional space? and how fast it moved?

Kindly guide me to any good tutorials, because I struggled to find any good ones.

Patrick
  • 6,495
  • 6
  • 51
  • 78
Tom Shved
  • 43
  • 4
  • You will likely need to read the docs on [Capturing Device Movement with Core Motion](http://developer.apple.com/library/ios/#documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/motion_event_basics/motion_event_basics.html#//apple_ref/doc/uid/TP40009541-CH6-SW14). I am just looking into this now. – Patrick Mar 06 '13 at 12:52
  • Also, it seems a duplicate of this one: http://stackoverflow.com/questions/5550453/ios-movement-precision-in-3d-space – Ricardo Sanchez-Saez Mar 13 '13 at 14:57

1 Answers1

0

From the docs I have linked to in the comment, I think it could be possible to achieve what you are after, but it will take lots of work. I think the method would be something like this:

  1. Detect which axis has the greatest velocity.
  2. Calculate the average speed over which the device was moving for (along the axis found in point 1) - perhaps you could have a button to start/stop the movement which begins and ends recording the velocity?
  3. Then distance = speed * time

I think section 1 and 2 will entail a fair bit of research and development before the guys here at SO can help. But I will continue to look into it too. Good luck.

Patrick
  • 6,495
  • 6
  • 51
  • 78