Page 1 of 1

gps time and drive a distance

Posted: 26 Jan 2016 16:05
by etaon
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.

Re: gps time and drive a distance

Posted: 27 Jan 2016 20:58
by Martin
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