How to detect wether there is no movement by using GPS data?

Hi,

I developped running and hiking app with connect IQ SDK, I'm trying to find how to detect that the runner or the walker isn't moving.

How can we do?

Thanks for your support

Sylvain

  • I look at Activity::Info::currentSpeed and if it's less than 0.89408 metres per second (2 miles per hour), then I say that the user isn't moving. I think this is similar to what Strava and Garmin do to determine moving time/speed. Of course you can't compare speed to 0, due to GPS inaccuracies, slight movements, etc.

  • Actually depending on the walker, 2mph isn't a great cutoff.  Imagine if you are walking a dog or with a small child.  When hiking 2mph might also be a bit high based on terrain. If you want to use speed, make it configurable.

    GPS can have a bit of a "wobble" where you can be standing still and still get an increase in distance, but you cold do something like compar the distance between to points, and if it's more than "x", there's movement (compare the la/lon pairs)

  • I'd say this is not an easy problem, even the Garmin watches itself struggle with this (they accumulate miles while sitting still)

  • I don’t disagree with anything you said in the first paragraph, but having an arbitrary cutoff for distance delta doesn’t seem to be any better or worse, in principle, than having an arbitrary cutoff for instant speed. I can think of a couple of practical advantages for looking at speed:

    • the comparison for speed is simple, whereas you need to calculate the distance between two points yourself
    • current speed seems like it would be filtered by whatever algorithms Garmin uses to get rid of noise, whereas I’m not sure if not sure if the same can be said for GPS coordinates
    • current speed is available without gps (probably not an issue)

    Ultimately I’d agree with Peter that this isn’t an easy problem, which is maybe why Garmin only calculates moving time/speed after the activity is uploaded to Garmin Connect.

  • It is kind of a hard one, because of things like the GPS drift, and just what correct for different people.  As I said, <2mph may not be good for everyone. 

    A time can be involved, like <2mph for 30 seconds, but then you might detect a pause, but only after it really happened.