bg

Vehicle GPS tracker: Redirecting data from a GPS tracker to another server, changing the format of the GPS tracker

Task:

It is necessary to receive data packets from the vehicle GPS tracker, write them to the log file and send them to another server for further processing. The other server (other software) supports only one data format, and it is impossible to connect other trackers to it directly. It means that GPS Tracker Data Logger will run as a converter in this case. The tracker uses the plain ASCII format and does not require data receipt confirmation from the server. Sample source information packet:

&REPORT,000577,140909,092601,2018.6667,N,02425.4444,E,
0,0,181,17,513,00,00.03,00.03,3,04,04

Requirements:

  • GPS Tracker Data Logger Professional or the trial version;
  • ASCII data parser and query plugin for Data Logger;
  • Special "Data Redirecting" plugin for the logger;
  • DDE server plugin for the logger (optional, for testing purposes).

It is assumed that:

  1. You have configured the parameters of connecting to the device and the parser for the vehicle GPS tracker the way it is described in this article;
  2. You have configured the TCP/IP connection with the other server the way it is described in this article.

Solution:

After you configure and test the parser with the help of DDE, you can get down to configuration right away. All you have to do is configure the necessary data redirecting plugin (fig. 1) in the configuration where the parser runs and receives data from a GPS tracker.

Note: You should disable the "Data redirecting" plugin on the "Query Parse Filter" tab if you use it.

Vehicle GPS tracker. Enabling the "Data Redirecting" plug-in.
Fig.1. Vehicle GPS tracker. Enabling the "Data Redirecting" plugin.

To configure the "Data Redirecting" plugin (fig.2), select it in the list and click the "Setup" button under the list.

GPS tracker. Data redirecting configuration.
Fig.2. Vehicle GPS tracker. "Data Redirecting" plugin configuration.

  1. Select the communication protocol used by your target server (a tracker emulation).
  2. Specify the destination IP address and port how it is displayed in the list in fig.2 pos. 2;

GPS tracker. Parser items.
Fig.3. Parser items.

The target communication protocol may have many fields. Here you can assign parser variables to these fields using the drop-down list. By default, the redirection plugin is configured to send all data.

The table below contains the list of fields and data types the plugin receives from a parser. The plugin can also automatically convert some data types to the necessary format:

  • Real number into an integer by dropping the decimal part.
  • An integer number into a real number.
  • A number into a string.
  • A string into a number.
  • A number into a logical value (0 is false, any other value is true).
Data packet field Data type Description
IMEI String Device identifier (number, IMEI, etc.)
Date and time DateTime UTC
Longitude Float in the GPS format, e.g. 48.71514
Latitude Float in the GPS format, e.g. 48.71514
Altitude (m) Integer Meters above the mean sea level
Direction Float Angle in 0-360 degrees
Velocity Byte Kph
Distance DWORD Covered distanve, km
Relay 1-8 Boolean 1-8 Relay state
Sensor 1-8 Boolean 1-8 sensor state
ADC 1-4 Byte 1-4 ADC value
1-2 Voltage Float Voltage in volts from 0 to 25.5
GPS Byte Number of satellite (0 – 14)

For example, you can match the packet field in the following way:

Data packet field Parser variable name
IMEI DEVICE_ID
Date and time DATE_TIME
Longitude LONGITUDE
Latitude LATITUDE
Altitude ALTITUDE
Course COURSE
Number of satellites GLONASS_SAT_NO
Velocity SPEED
#1 analog input value AI1
#2 analog input value AI2
Distance ODOMETR

You should specify the default value for those fields in the data packet with no matching variables. This value will also be used if it is impossible to automatically convert the data type of the parser variable into one of the data packet fields.

You can set proportional scaling for those analog values that can exceed the limits of the possible range.

Now you have to save all the changes. To do it, close all dialog boxes by clicking the "OK" button.

After data is received from the vehicle GPS tracker, you will see information about the data being redirected in the message log of the program (fig. 4).

Vehicle GPS tracker. Data redirection message.
Fig.4. Vehicle GPS tracker. Data redirection message.

Related articles: Vehicle GPS tracker: Redirecting data from a GPS tracker to another server, changing the format of the GPS tracker

Installation

Configuration

GPS Tracker Data Logger - Read more about:

NMEA logger GPS tracker logger Data Logger Suite