2.1.3. GPS Location

The Active2Gether app uses the built-in GPS sensor for recording the GPS coordinates (latitude and longitude). As soon as a user logs in, he is asked to authorize the use of location tracking. It is possible for a user to turn off the location detection option, but this will disable certain features. In a separate experiment, we compared different time intervals for collecting GPS data [11]. It turned out that a frequency of five minutes provides a good balance between battery consumption and precision. Every 15 min, the data on the mobile phone are synchronized with the server. In the database, latitude, longitude, speed, accuracy and time stamp are stored for each observation.

A script runs every night to see whether a user has visited one of his important locations by comparing the GPS trace with the coordinates of the important locations. Since the user locations are provided in descriptive form, geocoding is used to transform them into latitude and longitude numbers. The system stores the number of minutes at each of the locations. If the duration at a location is larger than 0 min, we can conclude that the user visited that location.
