Real-time GPS position tracker

The GPS tracker is a box of electronics that continuously reports its position to a webserver, so the webserver can update an interactive web page to display a map showing the current location. The location is also provided on a WAP web page accessible by mobile phones, so anyone with a mobile phone can also see the current position.

The map below demonstrates the tracker display (assuming a compatible browser), and you can use the controls to zoom in and out and move around (you can also drag the map with the mouse, or use the keyboard). In this simulation, each time a position update occurs the map re-centres on the current position.

The GPS side of things is taken care off by a standard Garmin eTrex summit on the handlebars. This unit comes with a built-in RS232/external power port, and this is used to obtain the current position about once a minute. Also external power is provided to the GPS via this port, allowing the backlight to be left on continuously at night and to ensure enough power is available for at least 24 hours continuous operation


Above: Garmin eTrex unit on handlebars

The tracker box itself contains a Lithium-Ion battery to power the GPS and the extra electronics, an embedded microcomputer and a GSM cellphone module (inc. support for GPRS). Basically, once a minute the micro queries the GPS unit via the RS232 port to get the current location and then sends it via the GSM modem to the webserver (using GPRS, though a text message would have worked as well).

At the webserver end, the position report was received over TCP/IP and written into an XML file. A quick mash-up using Google Maps and AJAX displays the map centred on the current position, with a marker showing the exact spot. The same information was also exported as a WAP page, for viewing on mobile phones. Each time a new position update is received, the map automatically scrolls to keep the marker centred.

The tracker unit is built into a standard plastic box and mounted under the bikes saddle with the aerial poking out the bottom (the aerial works just as well upside down, and being much larger than the average cell phone aerial performance is actually very good).


Above: GPS tracker mounted under saddle - the aerial can be seen underneath


Above: GPS tracker removed from bag

The circuitry and the code is somewhat of a lash-up; for those who want more of the gory technical details, please check the resources page for this project.

Comments or questions? Use the Feedback page!

Links

hazeii.net (c) 2007 All Rights Reserved.