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

How To Create iPhone Application yourself

1. Have An Idea – A Good Idea How do you know if your idea is a good one? The first step is to even care if your idea is solid; and the second step is to answer the question does it have at least one of the indicators of success? Does your app solve a unique problem? Before the light bulb was invented, somebody had to shout out “Man, reading by candlelight sucks!” Figure out what sucks, and how your app can make the life of its user more comfortable. Does the app serve a specific niche? Though there aren’t any stats on the App Store search, the usage of applications is certainly growing with the explosion of App Store inventory. Find a niche with ardent fans (pet lovers, for example) and create an app that caters to a specific audience. Does it make people laugh? This is a no-brainer. If you can come up with something funny, you are definitely on the right track and your idea may be the golden one. Heck, I hit a red “do not press” button for 5 minutes yesterday. Are you building a

Upload Your DSi Photos Directly to Facebook

if you've got a European, Australian or Japanese DSi, you can now go to the settings menu or the DSi Shop to be presented with a system update - Once you've done this, the photo album will get a new feature. After taking a picture, there will be a new button when looking at it in your photo album. Marked with a white f in a blue square, it's quite obvious what this does - It lets you send your picture directly to Facebook, that is, if you've got a Facebook account! The first time you try this feature you'll be asked to enter your Facebook login e-mail and password, but after that you're free to upload as many pictures as you want. Once you've uploaded a picture, a new photo album will be created on your Facebook account, titled "Photos from Nintendo DSi," which will have every picture you upload in the future. Simple and quick to use! Earn money by inviting-1$ per referral link visit.