Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

...

Supported device types and versions 
Communication line configuration
Communication station configuration
I/O tag configuration
Errors and problems
Geofencing - localization of the position
Literature
Changes and modifications
Document revision

...

This protocol supports the communication with GPS receivers that send data according to NMEA-0183 standard. It supports only data receive.

...

...

File I/O communication line

The implementation of the NMEA-0183 protocol supports the reading of files which contains that contain NMEA packets/records. As NMEA-0183 records are text strings with CR-LF at in the end, in one row of the file must contain one a single NMEA-0183 record.

The files are searched in the directory according to the setting of parameter the "Input file" parameter on the tab "File I/O" tab in the configuration of line. The file must correspond to a mask according to the parameter "Filename Mask" in  station protocol of stationparameter. The file is analyzed (read) from top to bottom, after processing it is moved to the archive directory according to the setting of parameter "Archive directory" on tab "File I/O" in configuration of line. In this directory, the subdirectories with the time of creation or data analysis are created (see the parameter "Archive subdirectory time mask" parameter).


Protocol line parameters

Dialog window of Line configuration - tab "Protocol parameters", choose the protocol NMEA-0183.
They influence some optional parameters of the protocol. You may set the following parameters for the line:

Table 1

Full nameMeaningUnit / sizeDefault value
Kotva
adm
adm
Archive Subdirectory Time Mask
A mask which is used to create the archive subdirectories for storing of the processed files (important only for File I/O lines). Use the following text string to set mask::
"yy" or "rr" - year (short format),
"yyyy" or "rrrr" - year (long format),
"mm" - month,
"dd" - day.
-yyyymm
Kotva
brdf
brdf
Geofencing Polygons Definition File
Full path to a file
which contain
that contains a definition of polygons (a localization of position in polygon - geofencing). Blank text
switches of
disables the localization feature. See the chapter Geofencing - localization of position.--
Kotva
fcp
fcp
Files Checking Period
Time
The time period of
loading
reading of the source directory.mi:ss01:00
Kotva
ufdir
ufdir
Unknown Files Backup Directory
Backup directory for storing
the
unknown files.--
Kotva
apt
apt
After Processing Timeout
Delay after processing of a file.ss.mss00.100
Kotva
fdf
fdf
Future Data Filter
Time filter of data. If the
time stamp
timestamp of received data deviates from the current time by more than defined hours in the future, they are ignored. Set 0 (zero) to ignore the time filter.hours0
Kotva
hdf
hdf
History Data Filter
Time filter of data. If the
time stamp
timestamp of received data deviates from the current time by more than defined days in the past, they are ignored. Set 0 (zero) to ignore the time filter.days0
Kotva
addef
addef
Additional Error Logfile
Additional error log file for tracing communication errors--

Kotva
komunikacna_stanica
komunikacna_stanica
Communication station configuration

...

  • Communication protocol "NMEA-0183".
  • As for Serial and SerialOverUDP Device Redundant lines (i.e. asynchronous serial communication), the address parameter is not required (blank text). The protocol NMEA-0183 does not support the addressing of devices. Data are sent spontaneously. Only one device may be connected to one serial asynchronous communication line.
  • As regards the File I/O line, the address may be any text string. It can be used for searching of the file with NMEA data for the given station (see the parameter "Filename Mask" on  station protocol of stationparameter).


Station protocol parameters

Dialog window for configuration of station - tab "Protocol parameters".
They influence some optional parameters of the protocol. You can set the following parameters:

Table 2

Full nameDescriptionUnit /
size
SizeDefault value
Kotva
mwr
mwr
Maximum Wait Retry
Retry
A retry count of reading response
till
until its completion.
Maximum retries of reading of line so that the NMEA packet/record is complete (it is relevant only for Serial and SerialOverUDP Device Redundant lines).
-40
Kotva
wt
wt
Wait Timeout
Delay between the readings of line until NMEA packet/record is complete (it is relevant only for Serial and SerialOverUDP Device Redundant lines).ms50 ms
Kotva
pdf
pdf
Position Data Format
Conversion of data of geographical position from NMEA records GPRMC.3, GPRMI.1, GPGGA.2, GPGLL.1, PGRMF.6 for latitude and GPRMC.5, GPRMI.3, GPGGA.4, GPGLL.2, PGRMF.8 for longitude. You can choose "deg/min" (
initial form
a native format of NMEA, the same value as it has been read) or "deg" (conversion to degrees).deg/min
deg
deg
Kotva
su
su
Speed Units
Conversion of data about the speed to a required technical unit (GPRMC.7 and GPVTG.3 in knots, GPVTG.4 and PGRMF.12 in km/hour).knots
km/hour
knots
Kotva
trid
trid
Trace Received Data
Show information about received raw data.YES/NOYES
Kotva
trv
trv
Trace Received Values
Show details about analyzed values of I/O tags.YES/NOYES
Kotva
fnm
fnm
Filename Mask
Mask for searching of files with NMEA information (it is important only for File I/O). Mask must be a text string with support of special items in braces {}:
{N...N} - address of station, 'N' character count must be equal to the length of station address,
{yyyy} or {yy} - year (short/long format),
{mm} - month (1 to 12),
{dd} - day (1 to 31),
{hh} - hour (0 to 23),
{mi} - minute (0 to 59),
{ss} - second (0 to 59).
Digit placeholder '*' may be used also at any position in a mask.
Examples:
nmea_data.*
nmea_data*.txt
nmea_data{NNN}.txt
nmea_data{yyyy}{mm}{dd}_{hh}.txt
station_{NNNNNN}*


-
 

Kotva
tsyn
tsyn
Synchronize Time Delta
Positive value activates the correction of system time from GPS data. If the difference between the system time and time received from GPS is greater than the value of this parameter (in
miliseconds
milliseconds), a task that adjusts system time will be started. Time will be adjusted in small steps to avoid a sudden time-jump which is usually undesirable.
Default
The default value of this parameter is 0 and it means that time
synchronisation
synchronization is disabled.ms0
Kotva
ldt
ldt
Long Difference Time
If the absolute value of a computed time difference between GPS time and system time is greater than the value of the parameter Long Difference Time, then the
correcton
correction of system time will not be started immediately. Instead, the D2000 KOM process detects whether this difference is repeated at least Long Difference Count times consecutively. If it does and if absolute value of difference of consecutive time differences is not greater than Long Difference Time then the correcton of system time will be started.
Parameters are meant as a protection of random
occurence
occurrence of "out of range" time. Value 0 of parameter Long Difference Time disables this protection.sec0
Kotva
ldc
ldc
Long Difference Count
-0
Kotva
atm
atm
Align To Minutes
KOM process publishes only the values received on the edge of a new minute (sec = 0). For proper functionality, the polling period must be less than one minute.YES/NONO
Kotva
csec
csec
External Command File
Full path to the external command file which is called with the defined period. Empty text string means that the external command file is not used.-
 

Kotva
csep
csep
External Command Period
The period for calling external command file. If the value is 0 seconds, the command file is called always before data reading from the particular station.min:sec60 sec
Kotva
cses
cses
Call External Command Synchronously
Call external command file synchronously (YES) or asynchronously (NO).YES/NOYES

Kotva
merany_bod
merany_bod
I/O tag configuration

...

Allowed types of I/O tags: Ai, Ci, Di, TiA, TiR, TxtI.

The address of I/O tag is in the format:

SSSSS.I

SSSSS - the identification of NMEA record (e.g. "GPRMC")
I - an index of the order of data in the NMEA record. The index is a positive integral integer number. 0 = the index of identifier of NMEA record, 1 = index of the first value.

You can configure a special I/O tag Ci or Ai with address $POLY, which acquires the value of a polygon code, in which was localized the current position was localized. See the chapter Geofencing - localization of position.

You can fined find the examples in the table 3.

Table 3

AddressValue typeDescription
GPGGA.7Ci
Number
The number of located satellites.
GPRMC.3AiLatitude.
GPRMC.4CiLatitude hemisphere, it takes the values 78 (N) or 83 (S).
GPRMC.4TxtILatitude hemisphere, it takes the values "N" or "S".
GPRMC.5AiLongitude.
GPRMC.6CiLongitude hemisphere, it takes the values 69 (E) or 87 (W).
GPRMC.6TxtILongitude hemisphere, it takes the values  "E" or "W".
GPRMC.1TiRTime.
GPRMC.9TiADate.

The implementation of the protocol requires the receive reception of NMEA packet/record "GPRMC" (Recommended Minimum Specific GPS/TRANSIT Data). From time data UTC date/time is created a time stamp in this packet, a timestamp is created. This time stamp timestamp is changed from UTC to the local time and then is used to assign the time stamp timestamp (value time) in all values of I/O tags.

...

If the file with the definition of polygons is loaded read successfully, the localization of position in polygon is activated. The file format is following:

[

...

polygon_

...

name1,

...

polygon_

...

code1] latitude1 <tab> longitude1 latitude2 <tab> longitude2 latitude3 <tab> longitude3 .... latitudeN <tab> longitudeN   [

...

polygon_

...

name2,

...

polygon_

...

code2] latitude1 <tab> longitude1 latitude2 <tab> longitude2 latitude3 <tab> longitude3 .... latitudeN <tab> longitudeN

The definition of polygon starts with a name and an a unique integer code of polygon in the first row. It is followed by all the known border positions of the polygon. The border positions of the polygon are the numerical data of of latitude and longitude separated by a tab. You can define 100 polygons at the most in this file.

A simplified example of the file with the definition of polygons:

[SVK,1]
49.510531 18.597243
49.508383 18.56925
49.500642 18.544688
49.490084 18.53395
[CZ,2]
49.517426 18.85232
49.516242 18.812956
49.504529 18.778742
49.502553 18.710839
49.507645 18.675815
[PL,3]
50.870486 14.82294
50.869251 14.839542
50.876814 14.867844
50.867136 14.896914

If In the case of successful localization of the current position, which was gain gained from the communication, in some of the polygons, the I/O tag with the address $POLY acquires the value of proper the respective polygon code. The position is searched from the top and from the first definition in the file and ends with the first successful finding match of the position. If the localization fails, the polygon code 0 is set. Therefore the value (0) is not permitted in the definition of polygon codes.

...

The error messages, mentioned below, may occur during the start or communication. It is recommended to activate the monitoring of communication in the configuration of the line for easier identification of problem. You can choose it from these levels:

...

When you set "Monitor & Disk" or "Disk", the file "line_name.LOG" occurs in the Trace subdirectory "\TRACE" in the application directory on the computer with the running communication process. This file contains all the debug and error messages.

Error:Unsupported mask item 'maskitem' !
Description:Unsupported item in the mask file that searches the files for loading.
Error:Cannot open file 'FileName' !
Description:The opening of the file for reading failed.
Error:Unconvertible value: 'ValueString' for I/O tag 'I/O tag_name'!
Description:The value, received from the NMEA packet/record, cannot be converted on the value of I/O tag.
Error:Unconvertible value: 'ValueString' for I/O tag 'I/O tag_name', unsupported type value_type!
Description:
Value
The value type of the I/O tag is not supported.
Error:Error in address, I/O tag: 'I/O tag_name', Address: 'PointAddress' !
Description:
Address
The address of the I/O tag does not correspond to the required format.
Error:Checksum ERR! Received=XX, Expected=YY
Description:Invalid checksum in the received packet.
Error:Cannot open geofencing polygons definition file 'filename'!
Description:The file with polygon definition, the value of line parameter "Polygons definition file", has not been found.
Error:Problems detected in geofencing polygons definition file 'filename'!
Description:The file with polygon definition, the value of line parameter "Polygons definition file", does not correspond to the required specification and was ignored.
Error:Error during geofencing position detection for I/O tag 'I/O tag_name'!
Description:Upon detection of position in polygon occurred unexpected error. The polygon code is invalid.

Kotva
literatura
literatura
Literature

...

  • August 21, 2009 - localization of position in the polygon.
  • February 19, 2015 - added a new parameter to station parameters.

...

  • Ver. 1.0 - February 8, 2008 - document creating.
  • Ver. 1.1 - March 13, 2008 - modification of protocol parameters.
  • Ver. 1.2 - August 21, 2009 - updating of the document.
  • ver. 1.3 - February 19, 2015 - added new parameter to station parameters.

Info
titleRelated pages:

Communication protocols

...