I am working on live location tracking software.The End users have a motorcycle which they will perform tasks they are assigned to.Based on the mobile coordinates they send to backend server, I am storing them in my database and enriching them in real time.Now,I want to calculate the stoppages if the user has stopped at certain place for more than 5 minutes.How do companies track the timeline i.e stoppages ?
I tried querying the database by grouping the address and finding timestamp difference of when it entered and exited.But what happens is when I revisit the address again,the exit time increases,which will return in increased time difference and the revisit to same place,creates a fake stoppage for that address.Is there a way to discard the fake stoppages ? The same scenario happens if the user is in motion along a path which has same address name for more than 3 minutes.How do I fix this? Are there any mathematical theories we can apply ,so that we can find user is in motion or not?
3