Skip to main content

Build Your Own Web-Based GPS Tracking System


Map Image (C)Google Having your own web-based mobile GPS tracking system doesn't have to be a complicated and expensive ordeal. Now you can build your own simple mobile GPS tracking system from a laptop and have the data delivered, via Internet, right to your own computer. With the addition of a webserver, and Google Maps client-side JavaScript, you'll be able to see the data over the web on an interactive map!

OpenDMTP is a commercial quality Open Source protocol and framework designed for the transmission of location based information over high-latency/low-bandwidth networks. Using the OpenDMTP C client reference implementation, we'll describe how to build your own GPS tracking system, and explore the various options that are possible once you have the system up and running.



The Basic Components:

Building your own web-based GPS tracking system requires 3 basic components:

Mobile Client Hardware
The mobile client hardware performs the collection of GPS messages, analysis of various GPS-based rules, and the transmission of generated events back to a server. For our client, we will use a laptop running a current version of Linux (however Windows-XP with Cygwin works fine as well), with an attached GPS receiver and GPRS wireless modem.

Data Analysis and Transport Protocol
On the client side, this includes the analysis of the GPS events to determine motion state changes (StartMotion, InMotion, StoppedMotion), as well as transmitting this data to the server. The OpenDMTP C client reference implementation includes several GPS rule modules as well as full-featured support for client/server communications.

Backend Server
The server needs to accept incoming connections from our client (laptop) and store received GPS events for later viewing. This stored data can then be presented in a web interface, along with a map, to a user wishing to view the data in a browser. For our GPS tracking system, the backend server will be a Linux machine running over a broad-band Internet service (again Windows XP with Cygwin should work fine). The OpenDMTP C client project provides a simple socket server which we will configure to listen for client connections over Internet. And with the availability of Google Maps, we can also view this data on a map using client-side browser JavaScript.



Putting It All Together:

Download OpenDMTP:
First we need to download the latest version of the OpenDMTP C client zip file and place a copy of the unwrapped project files on both our client laptop, and our backend server. (Detailed instructions can be found in the project documentation).

Configure the server:
To configure our backend server, first we'll build the simple OpenDMTP 'sockserv' binary which acts as our backend service provider. Next we configure our webserver. No special features are necessary here, the webserver just needs to be able to serve our static page, "track.html" (derived from examples provided by Google Maps and included in the OpenDMTP C client project). Since we'll be using Google Maps to display a map we'll also need to apply for a "Google Maps API Key" which we place in our "track.html" webpage. After checking to see that our firewalls are routing the necessary ports, we're now ready to start the server to listen for our client connections. (Note: When using Google Maps, make sure you fully comply with their Terms of Use)

Configure the client:
To configure our client we'll Client Configuration build the OpenDMTP C client code with GPRS support enabled, and attach a GPS receiver and GPRS modem. The GPRS wireless service provider may require some special connection parameters which we will configure the client to provide when necessary. We will leave the default GPS rule configuration as-is, which includes event generation for start and stop motion, and every 2 minutes while moving. We are now ready to start the client to begin collecting GPS data and transmitting it to our server.

We start it up and monitor the client connections to the server to make sure everything is working as expected. The client generates events and sends them to the server. The server collects the data and stores it for the webserver. The webserver presents the data and a map to the users client web browser. We're up and running! After taking a short road trip, here is a sample view of the resulting data and map.



Other Options:

From here, the options are nearly endless for where changes and improvements can be made to our simple GPS tracking system.

The OpenDMTP C Client:
The client has a full-featured reference implementation of the protocol and has many configurable options, including the ability to generate/send events based on an arrival to, or departure from, a specific "GeoZone". It also supports straight socket connections, which means it should work with most PCMCIA wireless airtime cards. Instead of a laptop we could also use an embedded computer system like GumStix (http://www.gumstix.com) to perform the same tasks.

The OpenDMTP C Server:
The server we used has a simple minimal implementation of the protocol and could be improved to support multiple clients, additional protocol features, user login/logout, and an improved web-interface.

This is just the beginning of the possibilities available with OpenDMTP. Try out the OpenDMTP project yourself. You'll find the protocol documentation and reference implementation download at "http://www.opendmtp.org".


Earn money by inviting-1$ per referral link visit.

Comments

Popular posts from this blog

Five biggest technology trends in 2022

In 2022, the Covid-19 pandemic will continue to influence our lives in many ways. This means that the pace of digitalization and virtualization in businesses and society will continue to accelerate. With the arrival of the New Year, the need for sustainability, increased data volumes, and increased computer and network speeds will begin to regain its position as a major driver of digital transformation. For many people and organizations, the most important lesson of the last two years has been that implementing truly transformative change is not as difficult as it might have been at first. As a society, we certainly move from trying to survive in a changing world to prospering in it, this newly discovered openness to flexibility, agility, and innovative thinking. Continue to utilize sex. With that in mind, here are my predictions for the specific trends that are likely to have the greatest impact in 2022. There's no speculation about quantum computers, neural interfaces, or nanotec...

Difference between .LOG file and .TXT file

Files with ".log" and ".txt" extensions are both plain text files. This means they can both be viewed with a standard text editor like Notepad for Windows or TextEdit for Mac OS X. The difference between the two file types is that .LOG files are typically generated automatically, while .TXT files are created by the user. For example, when a software installer is run, it may create a log file that contains a log of files that were installed. Log files typically have one entry per line, which includes information such as the filename , the action (created, moved, deleted, etc.), and the location of the file. Standard text files, on the other hand, are typically created in a word processor by a user. For example, if you create a new file with Notepad, it saves the file with a ".txt" extension. Similarly if a Mac user creates a plain text file with TextEdit, the file is saved with a ".txt" extension. Since log files are a type of tex...

How to Convert MP4 to DVD and Burn MP4 to DVD

to watch MP4 videos on TV using your home DVD player, you’ll have to convert MP4 to DVD. For this job, we recommend Wondershare DVD Creator - an easy-to-use yet powerful MP4 to DVD Converter that lets you burn mp4/mpeg files to DVD disc. Easy Steps to Convert MP4 to DVD with MP4 to DVD Converter: Step 1. Import MP4 to DVD project After installing MP4 to DVD converter, launch it and click "Import" to import MP4 videos to collections. To create another chapter, click the "Add title" button and add more MP4 videos, no limit here. But do notice the size indicator at the bottom, if exceed the red line, you are suggested change to DVD-R 9.0G or remove some videos. Video editing is also available. These tools include: crop, trim, rotate, watermark, effects, etc. Details are given below. Step 2. Author DVD menu A menu is necessary to fully access your MP4 video on DVD disc. In "Menu" tab, there are different styles of built-in templates, frames and ...