290
− the $ flag, followed by
− GPRMC, followed by the 1
st
separator ”,”
− Time (given in UTC), followed by the 2
nd
separa-
tor “,”
− Data validity, followed by the 3
rd
separator “,”
− Latitude, followed by the 4
th
separator “,”
− Half-world sign, followed by the 5
th
separator “,”
− Longitude, followed by the 6
th
separator “,”
− Half-word sign, followed by the 7
th
separator “,”
− Velocity in knots, followed by the 8
th
separator
“,”
− Movement course (azimuth), followed by the 9
th
separator “,”
− Data, followed by the 10
th
separator “,” .
Numbers of symbols of particular data is not giv-
en intentionally since they may be different accord-
ing to the type of GPS receiver.
Table 1. Conversion of ASCII symbols to the displayable data
set of the GPRMC sentence in the NMEA protocol.
___________________________________________________
$ G P R M C , 2
ASCII 24 47 50 52 4D 43 2C 32
___________________________________________________
1 2 1 2 9 2 9 ,
ASCII 31 32 31 32 39 32 39 2C
___________________________________________________
A , 4 9 1 5 . 6
ASCII 41 2C 34 39 31 35 2E 36
___________________________________________________
0 7 , N , 1 2 3
ASCII 30 37 2C 4E 2C 31 32 33
___________________________________________________
1 0 . 5 3 7 , W
ASCII 31 30 2E 35 33 37 2C 57
___________________________________________________
, 0 0 0 . 0 , 3
ASCII 2C 30 30 30 2E 30 2C 33
___________________________________________________
6 0 . 0 , 1 1 1
ASCII 36 30 2E 30 2C 31 31 31
___________________________________________________
1 9 8 , 0 2 0 .
ASCII 31 39 38 2C 30 32 30 2E
___________________________________________________
3 , E * 6 8
ASCII 33 2C 45 2A 36 38
___________________________________________________
The indicated procedure makes the technical so-
lution possible with minimum requirements to pro-
gramming environment of the automaton. In any
case the GPS receiver must be configured according
to GSM communication needs. For the GPS OEM
receivers by Garmin there is a cost-free programme
available that can be used to set individual parame-
ters of the GPS receiver. As an example the GPS18
module can be mentioned. Running the file
SNSRCFG.EXE the corresponding serial COM port
is being set, interconnected to the GPS receiver
(COMM preamble). The preamble contains two
items: SETUP and CONNECT. Once the communi-
cation has been activated the programme is search-
ing for the transfer rate of the GPS receiver which is
indicated at the monitor showing gradually all trans-
fer rates tested. When choosing the preamble CON-
FIG, two items are available: SENSOR CONFIGU-
RATION and NMEA SENTENCE SELECTION.
The items GET CONFIGURATION FROM GPS
and SEND CONFIGURATION TO GPS are acti-
vated as soon as the communication link has been
established using the command CONNECT. All sen-
tence preambles generated by the receiver and re-
peated periodically within adjustable intervals are
transferred to the computer using GET CONFIGU-
RATION command. If all received parameters are in
accordance with user requirements the programme
run may be terminated (EXIT in the FILE menu).
More frequent requirement concerns about chang-
ing some GPS receiver parameters. If some of them
are different from intended the preamble SENSOR
CONFIGURATION can be chosen and data pro-
posed according to the planned purpose. Number
and type of GPS receiver sentences may bet set
through the preamble SELECT SENTENSES. Data
prepared in this way can be sent to the GPS receiver
using the preamble SEND CONFIGURATION TO
GPS as the last step of the configuration process.
The chosen options can be re-called by the preamble
VIEW, item NMEA TRANSMITTED SENTENC-
ES when the GPS receiver generates data according
to new conditions. Newly established parameters are
kept in the GPS receiver even after disconnecting
the power supply.
If parameters of the GPS receiver cannot be mod-
ified or the GPS receiver is made by a different pro-
ducer (G symbol in the GPRMC preamble means
Garmin) the automation programme must be adapted
in the following way. The transfer rate is standardly
set to 4800 bps. The user must respect this fact and
adapt the communication transfer rate to new condi-
tions. If the receiver repeats sending more sentences
of the NEMA protocol the programme for receipt of
required data must be adapted. If we insist on check-
ing the sentence check-sum (always generated by the
GPS receiver) this is also possible at the expense of
receiving the whole sentence. If data is to be validat-
ed just at the first reception, analysis of data follow-
ing the second symbol “,” must be performed. The
indication “A” confirms validity of data, all other
combinations denote invalid data (most often “V”).
All data from the GPS receiver are provided in the
ASCII format. All newly defined parameters become
valid after the reset (switch-off and and-switch-on)
of the GPS receiver.
Software simulating the NMEA protocol seems to
be a very effective tool for laboratory tests (without
need to have the physically moving means with the
GPS receiver and GSM modem). The program
(GPSsimul) is licensed and its current version makes
generation of 50 sentences of the NMEA protocol
possible only. The simulator then continues genera-
tion of chosen protocol sentences but without send-
ing them to the serial port (number as an optional
parameter). Older versions of the programme