1

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.

4
  • 1
    Maybe this can help. Commented Feb 19, 2023 at 7:38
  • 1
    What about checking the accelerometer data at the same time when the movement is negligible? Surely a user moving will register deviations in the accelerometer. Commented Feb 21, 2023 at 16:50
  • @FcoP. Accelerometer is not enough, as user can be using the phone in his hands and doing a shake-like movement, which would trigger accelerometer, but GPS drift might still happen. Maybe accelerometer can help in combination of other solution, but not on it's own, imho. Commented Feb 22, 2023 at 7:06
  • You can wait to get location points that exceed the accuracy of GPS locations with of course the higher the distance, the greater the probability of movement, but as you probably realize detecting accelerometer/gyroscope data for walking is different than if the device is in a vehicle. Commented Feb 26, 2023 at 3:21

0

Your Answer

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.