So I'm using HIGH_ACCURACY
to retrieve location data from my phone using FusedLocation
solution. I'm already checking accuracy of this data and speed, but what I want to achieve is to understand if user is actually moving OR is it a location drift?
I have a location buffer of 20ish locations that I update all the time (when new location comes in, it replaces old one). My guess is that when there's a drift, GPS location points are scattered on the map in a circle like object, whereas if user is truly moving, it should look more like a line on a map (road).
How can I analyze my locations to understand if they are line-like or circle-like? I had an idea of snapping them to road, but that seems to be too expensive as API is a paid one. Other option would be to create a LatLng bound (rectangle) and then somehow see how many points are inside of it and how much are outside - if majority are inside, that might signal that it's a drift?
Any other ideas and pseudo-code? Thanks in advance.