shiftdsm / Galavanting-Gnome

0 stars 1 forks source link

Check distance before publishing location #57

Closed tegandbiscuits closed 5 years ago

tegandbiscuits commented 5 years ago

These changes should make it so when a location is added, the previous location isn't published until it's far enough away.

I decided that far enough away would be 100 meters. I don't imagine it'd unintentionally move more than that unless the warm up for the GPS is way too off (assuming it'll be starting cold).

My intention is going to be to make it so it does things on a timeline like this

  1. add location X1, Y1 at 12:00
  2. add location X2, Y2 at 12:30
  3. The distance between the first and second location is less than 100m, so the first location is not published
  4. add location X3, Y3 at 13:00
  5. The distance between the first and third location is greater than 100m, so the first location is published
  6. The distance between the second location and the third location is greater than 100m, so the second is published

Closes #4