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.
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