Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rjain

macrumors newbie
Original poster
Aug 4, 2014
5
0
I need to know how i can detect the direction among left, right, top, upward and downward of iphone movement using CoreMotion?

My ultimate goal is to calculate distance traveled by iPhone and in which direction.

Looking forward for reply.

thanks in advance.
 
My ultimate goal is to calculate distance traveled by iPhone and in which direction.

You can get direction. But not anywhere near accurately enough to calculate distance. (As an exercise, simulate distance results over time for various small numbers of digits in error bounds.)
 
Direction of iPhone movement using CoreMotion

Yes i have gone through Core Motion. And i just looking forward to know the direction of motion either it is left, right, upward or downward. Can you please tell how i can get it?

Thanks.
 
RE: Direction of iPhone movement using CoreMotion

Besides the direction, FYI I need to check only linear motion along the the axis. I want to ignore all device tilt. But the acceleration changes on tilt as well, so how can i differentiate between tilt and linear motion?
 
RE: Direction of iPhone movement using CoreMotion

Seems like a good approach. How i can exclude accelerometer reading which comes due to tilt in the device.Should i just ignore the reading when Gyro is giving some readings. What unit Gyro gives readings in? How it can be used for my purpose?

Any specific formula i need to apply or i just ignore accelerometer reading during gyro readings?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.