MPTP | MPTP commands 16
If data needed for a data field is unavailable, the field is commonly filled with hyphen characters (-,
Unicode 0x2D). This is the case for the Position, Time stamp, Speed and Heading fields.
3.2. Reading an MPTP command
This document lists each MPTP command as a table, as follows:
Command
Part number
Mode
Battery level
Position source
Position format
Position
Time stamp
Speed
Heading
4 1 5 1 4 1 4 1 3 1 1 1 24 1 19 1 7 1 6 1
!STA _ 01/01 _ norm _ 032% _ gps _ 1 _ N60.26.54,3_
E022.17.37,1
_ 11.07.2003
_09:57:46
_ 142km/h _ 275deg _
Status code
Status text
Additional text
Time of sending
3 1 0…15 1 0…30 1 19
009 _ Everything ok _ On spot _ 11.07.2003
_09:58:03
As stated above, the exact set of fields appearing in an MPTP message depends on the command in
question.
Fields, which are optional for a command and may be omitted, are listed in the table with dark grey. If the
field to be omitted is the last field of the command, it can be simply left out along with the field separator
character, which precedes it. However, omitting a field from the middle of a command requires retaining
both field characters around it. There will then be two field separators next to each other with nothing
between them.
The second row in the table lists the length of each field. In some cases, ranges such as 0…14 are given,
in which case the length of the field can vary between the given values. Also the field separator characters
can be found in the table.
An MPTP message should always be read from left to right, reading the value of a field (or its sub-fields)
until a field separator character (underscore) is encountered. This is important as the fields often do not
have a fixed length, and attempting to read a field in the message by relying on a certain offset may give
undesired results. It should also be noted that, even for a field with zero characters, both field separator
characters around it still need to be present.
TWIG instruments always stop reading a field when its maximum length is reached. Thus, care should be
taken not to write too long fields in an MPTP message as the instrument will expect the next field to start
directly after the assumed end of the previous field.
Komentarze do niniejszej Instrukcji