gps time and drive a distance

Post your questions and help other users.

Moderator: Martin

Post Reply
etaon
Posts: 14
Joined: 11 Nov 2013 21:11

gps time and drive a distance

Post by etaon » 26 Jan 2016 16:05

1. How calculate time of parking?
2. How calculate time snd distance of driving?

get location each 1 minute and compare with last location gps?
IF speed 0 is parking
if car moving, calculate distance each 1 minute and save state.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: gps time and drive a distance

Post by Martin » 27 Jan 2016 20:58

Hi,

1. You could use the speed to determine this but you could get false positives when you have to wait in a traffic jam. If you use bluetooth, you could also check when you move the Android device away from the car. You could also use trigger User Activity to check if you are In vehicle. Last time I checked, the device used quite some time to determine the activity.

2. get location each minute or more often and use script function distance to calculate the distance in meters between two locations.

Regards,
Martin

Post Reply