Can i know through Gyroscope, if I’ve moved some distance?
To elaborate my question, can I be able to detect the device’s motion if the user moves a couple of feet from the starting position?
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Linear motion is detected using the accelerometer. Rotation is detected using the gyroscope.
You can use the
CMDeviceMotionclass to detect both types of movement. You will have to integrate the value ofuserAccelerationover time to detect a change in position.Check out the What’s New in Core Motion video from WWDC 2011. You will probably find it helpful.