Reputation: 11401
Fact: iOS has a way to detect acceleration. But if a user opens my app while in movement and stays moving at the same speed, is there a way to "figure this out" without using the GPS?
I'm asking this because:
PS: by moving I mean walking down the hall or crossing a street... you know, considerable movements (30 ft or more)... I could very well disregard short movements (couch to bathroom sort of thing, less than 30 ft...)
Upvotes: 0
Views: 1760
Reputation: 11
What about using coords.speed instead? Considering the average person walks at around 2mph, If your result is < .5 you can pretty much assume they're standing still.
Upvotes: 1
Reputation: 607
The accelerometer works much like its name would suggest. It detects acceleration. So if you go from 0 mph to 5 mph it will notice that, but then if you continue at 5 mph for a while it won't detect anything (because there is no acceleration). You can try to combine this with the gyro which will detect rotational acceleration, but there is no technical way for the device to detect motion at a constant speed... so you will be able to detect any changes in motion, but if the user is going at a continuous pace you cannot detect that
Upvotes: 0