Nic Hubbard
Nic Hubbard

Reputation: 42139

iOS: Core Motion used to detect larger movements over distance?

I have a GPS app that I would like to detect if the user is standing still and not moving. Using Core Location works for this, but is sometimes not accurate because new updates move and gives the illusion of speed and motion.

So, I am wondering if in addition to that, I can also use Core Motion. Is this a good idea to detect motion such as someone walking, running, driving, etc, and know when they are no longer doing that motion? Or, is Core Motion only for small movements such as tilting the device or lifting it to your ear?

Upvotes: 2

Views: 3471

Answers (3)

Sap
Sap

Reputation: 168

I wanted to tell others who visit this question what I've learned and what I think about this approach.

I have been doing some research of my own to know whether this is possible, and more importantly, even if it is what is the battery consumption and accuracy of the location change detected. For Android though, this question was asked quite sometime back. The answer provides links to this Google Tech Talk. At 23:20, the speaker talks about how difficult it is to achieve this and the accuracy you will achieve in the results.

Even though I have to come to realize the battery consumption from sensors on the iPhone is a little lesser than in most Android phones, I still think this is a costly affair in terms of accuracy and battery consumption.

Upvotes: 1

Srikar Appalaraju
Srikar Appalaraju

Reputation: 73588

You are talking about 4 different measurements from 4 different sensors (technically more than 4 but..) -

  1. Latitude & Longitude - from CoreLocation. It uses a mix of GPS + cell tower triangulation.
  2. Accelerometer - the current orientation of the device in 3D space.
  3. Gyroscope - orientation of the device on its own axis.
  4. Magnetometer - which tells you which direction a device is point w.r.t south,north,east,west

Of all these I think only Latitude & Longitude are of use to you. Basically what you do is to make the sensitivity (i.e. the update rate from the sensor) a bit more relaxed. With some tweaking around with this you should be able to tell with good accuracy if a person is standing or moving.

Upvotes: 0

TommyG
TommyG

Reputation: 4155

you can use the GPS with the sensor readings to distinguish between walking, running, etc. if you combine the tilt angle frequency change and the GPS speed information (you need to do some work to get some of this info of course, but thats the way to do it).

Upvotes: 0

Related Questions