Your location — on your terms

Build your own location aware web app with realtime capability

GeekLocLog posts your phone's location data to your website using a simple HTML GET request.

Use standard .htaccess password protection to protect your location information.Python, Perl, PHP, Java, virtually any environment available on your webserver will be compatible with GeekLocLog. Even CGI scripts written in good ol' C or Shell will do.

The following variables are available to be passed to the web server:

  • $lat — latitude
  • $lng — longitude
  • $haccuracy — horizontal accuracy
  • $elevation — elevation
  • $vaccuracy — vertical accuracy
  • $timestamp — timestamp of the location update (seconds since 1970-1-1)
  • $update_frequency — number of minutes between updates
  • $clock — system clock at the time of sending (seconds since 1970-1-1)
  • plus user defined fields!

Tailor the app's behavior to your needs

Desired accuracy Configure how hard the app will try to determine its current location. The longer the phone's GPS receiver is active, the greater the chance it will yield an accurate position. But it will also use more battery power.

GPS Facility iOS essentially provides two ways in which it lets apps request location updates: on “significant change” and continuously.

Using “significant change” updates, iOS will turn off the GPS receiver until a change in location has become apparent by some other means, for example when the user has entered a new radio cell. This saves a considerable amount of battery power. When the location updates supplied by the “significant change” mechanism do not have the desired accuracy, the continuous facility is activated briefly to attempt acquisition of a more accurate result.

“Continuous” location updates reflect location changes, even small ones. If you do not move your iDevice, though, no updates will be generated. (The timer on GeekLocLog‘s display will show “wait…”). If updates arrive, they will be sent to the server no more often than the interval you select with the “Max. update frequency” slider. The most precise GPS location since the last update will be used (and among those of equal precision, the youngest).

Network settings allow you to choose which connections to use: Initiate a connection, use WiFi only, use only direct connections (to a server on your local WiFi for example). Location updates will be queued if the server can't be reached. The first option potentially uses a lot of battery power, because the cellphone network might be used for updates.

Expect “Ok” — Normally GeekLocLog would ignore all output from the logging scripts if they report successful execution through the appropriate HTTP response code (200 that is). PHP notoriously sends a 200 response despite that fact that there have been errors. To make these errors show up in the app’s error log, activate this switch (the default).

Battery power

iOS tries hard to conserve as much battery power as possible and GeekLocLog tries to stand in its way of doing so as little as it can. It must register as a background application to function properly, however, requesting full background status from the OS. In background and in foreground state the app will usually wait for the operating system to send updates and then quickly deal with them instead of actively querying.

  • Using the “significant change” facility will dramatically improve battery life.
  • Setting the “desired accuracy” to a large value will speed up the acquisition process and save energy.
  • Limiting connectivity to WiFi will prevent using the cellphone network for internet connectivity.

No matter how you put it, though, GPS operations are expensive in terms of battery power.

Get started using example code

GeekLocate The most simple example app will store the coordinates provided by GeekLocLog in a simple text file and present the location using the Google Maps JavaScript API. It is implemented in PHP and contains rich source code commentary to get you started.

GeekLog is a PHP application requiring a MySQL database, that will log location updates, present them on a Google Map and provide them as a QPX file (GPS eXchange Format).

Note

GeekLocLog does not magically turn your iPhone into a military grade GPS receiver. (Sorry, fresh out of fairy dust!) Its “DIY” approach to things does not imply that it is a toy, either. Do make sure though your particular requirements are met by the app’s and your iDevice’s GPS accuracy, reliability and its network capabilities.

You may not at any given time make a person’s life depend on this app for example by using it for automatic or autonomous control of vehicles, aircraft, or other devices, dispatch, fleet management, or emergency services. You may not want to make your next month’s salary depend on this app, either. Then again: That may actually hold up.