Introduction
48 hours on the road, and even more, many do not even know how you can spend so much time behind the wheel. Of course, they realize that there are such professions as a truck driver - a trucker, but, I dare to suggest, they didn’t even think about what a long road is and how to spend time behind the wheel.
I love to travel and I love my bike. There was a time when I could travel up to 1000 km per day. This is a lot, even for a country like Russia.
The first thing to think about is a person who travels very far on their own transport - this is safety. On the long journey, anything can happen: accidents, breakdowns, sudden health problems, and gasoline can just end. Know, even if you are ala lonely wolf, there are people to whom you are dear, who thinks and cares about you.
It is about a solution that allows you to track vehicles in real time and we'll talk today.
Decision
OpenGTS ("Open GPS Tracking System") is the first open-source solution developed specifically for monitoring vehicles in web browsers using data from GPS receivers.
It looks something like this:

Solution architecture

The image above is a schematic of the OpenGTS architecture. Different device communication servers (modules that receive GPS data from various devices) are launched as independent Java processes. Track the servlet responsible for the web interface, as well as other servlets (including the http-based device communication server), run on an application server known as Apache Tomcat.
Http-based communication server
We will consider the simplest transfer of data from the client to the server, based on HTTP-GET requests (http-based devices). For these purposes, the servlet “gprmc” is connected to the server. Installing and running it on Tomcat opens access to the following URL:
http://opengts.mechsoft.ru:8080/gprmc/DataAll the arguments for the URL are listed in the documentation, but we consider the simplest test request to the server:
http: //opengts.mechsoft.ru: 8080 / gprmc / Data? acct = ... & dev = ... & gprmc = ...The server response below tells us that the data was successfully transferred:
<html> <head> </head> <body> <pre>OK </pre> </body> </html>
Let's sort the query arguments:
acct - identifier of the account for which data transfer is performed;
dev - the vehicle identifier that is registered for the account;
gprmc is a
NMEA-0183 format string that contains data from a GPS receiver.
')
Mobile client
For the http-based servlet, a simple client for the Android mobile platform has been created. As shown above, the client’s task is to poll the server using well-formed HTTP -GET requests.
A program that can do this is GPS2OpenGTS. The appearance of the application is spartan. The main screen displays information about the coordinates, number of satellites, speed and direction of motion, the name of the server to which HTTP-GET requests are sent and their intensity.

What it looks like
The included GPS receiver is very “gluttonous”, so the battery of the mobile device can quickly sit down. Before leaving, it is recommended to think about charging your mobile device on the go. In my case, I used a regular wire for a car cigarette lighter. I brought the cigarette lighter by myself on a motorcycle. It turned out very functional:

I used OpenGTS on my server when traveling from Moscow (Russia) to Nord Kap (Norway) through Finland.
I wonder how I was driving? This data is available. You can connect to the server
http://opengts.mechsoft.ru:8080/track/Track using an account:
Account: | public |
User: | guest |
Password: | guest |
then, in the right - upper corner of the window, you must select the dates:
From: | August 12, 2011 |
To: | August 18, 2011 |
And click on the “Update” button.
Instead of conclusion
Moving along the roads, I can say for sure that now there are a lot of people who travel. It is nice to see cars with numbers from other regions of the country that are different about the one you are driving, and if it is a motorcyclist, you should certainly get to know this at the next gas station. Travel ...
Minuses:
- You must have your own server, accessible via the Internet, to install OpenGTS;
- You need an internet connection on mobile devices (in terms of roaming this can be expensive).
Pros:
- Free software;
- You can track multiple vehicles at once by grouping them;
- Reports on the movement of registered vehicles;
- A huge range of GPS devices that can be used to collect data.