1

can someone please point me at some code snippets to detect when the GPS is stationary. I am currently using tinyGPS library and it is working fine, but my data-logger has thousands of stationary details I'd like to not bother logging. Currently I am using this,

uint8_t speedZero() {
uint8_t spd = gps.speed.mph();
 if (spd < 5) {
 return 0;
 } else {
 return spd;
 }
}

But it is too granular at slow speeds, but the NEO-6M drifts a lot and 5mph standing still is not uncommon.

I have tried comparing Last Lat/Lon but not having any success as this Math is waaaay out of my skill-zone.

asked Feb 26, 2019 at 21:50
4
  • 2
    Just add accelerometer sensor to your device. It's just around 1USD and it will easily detect lack of movement. Commented Feb 26, 2019 at 22:07
  • I have tried comparing Last Lat/Lon but not having any success as this Math is waaaay out of my skill-zone. - find a function that gives you a distance between two lat/long points, the remaining math is trivial Commented Feb 26, 2019 at 22:11
  • 1
    I gave an answer in PHP a few month ago, maybe it can help: stackoverflow.com/questions/7222382/… Commented Feb 26, 2019 at 22:44
  • Only log the values when they've significantly changed? Commented Mar 29, 2019 at 20:34

1 Answer 1

1
answered Feb 27, 2019 at 20:00

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.