iSuiteTM MP SDK Protocols - NMEA
- Introduction
- Standard NMEA Messages
- Nonstandard NMEA Messages
- Generic NMEA Commands
- $PFST,ALTAID - Set altitude aiding mode
- $PFST,CONF - Configure parameters
- $PFST,FIXRATE - Set fixrate
- $PFST,INITAID - Initial position and time aiding
- $PFST,ITALK - Switch NMEA port to iTalk protocol
- $PFST,NMEA - Configure NMEA port speed and message mask
- $PFST,ODO - Read and set odometer value
- $PFST,REBOOT - Software reset
- $PFST,RESETDATA - Discard navigation data
- $PFST,RESTORE - Restore factory default settings
- $PFST,SLEEP - Go to sleep mode
- $PFST,START - Start navigation
- $PFST,STOP - Stop navigation
- $PFST,SW - Query software version
- NMEA Logging Commands
Introduction
iTrax03 receiver produces and interprets messages in accordance with the NMEA 0183 standard. The complete interface standard is copyrighted material and only available from National Marine Electronics association, see http://www.nmea.org/pub/0183/index.html .This document describes the subsets and extensions of the standard available for iTrax03 GPS receiver.
Message
format and order
All NMEA message and command data consist of ASCII characters (from 20
- 127 decimal or from HEX 14 to HEX 7E). For further information see
Section 6.1 (Table 3.) in NMEA 3.0 specification. NMEA messages consists of fields as follows:
$GP<message id>,<data field>,<data field>,,, ..*<checksum><CR><LF>
Message starts with field "$GP" followed by a message identifier field. Message data fields are separated by commas ( , ) and the message ends after checksum field and carriage return <CR> and line feed <LF> control characters. Delimiter '*' precedes the checksum field. Notice that data fields may be omitted (NULL). Such data fields contain no characters but are still separated by commas, for example:
$GPGGA,134158.48,6016.3072,N,02458.3788,E,1,08,1.2,,,,,,0000*1E
The above message contains 5 NULL data fields.
iTrax outputs enabled standard NMEA messages in this order: ZDA, RMC, GGA, GLL, VTG, GSA, GSVNote: The message order was changed to firmware version 3.11 in order to minimize navigation fix data output latency.
For further information, please see section 5.2 in NMEA 3.0 specification.
Command syntax
iTrax accepts a set of NMEA commands consisting of fields as follows:$PFST,<command>,<parameter>,<parameter> .. ,<parameter>The command line starts with a field "$PFST", followed by the command identifier and possible parameters separated by commas ( , ). Parameters may occasionally be omitted (NULL). In such case, these parameters are still separated with commas but contain no characters. No checksum is applied to commands. The command is acknowledged by iTrax by outputting the received command together with a checksum. All commands are described in more detail in section NMEA commands.
Notice that all commands are in capital letters.
Error message
If iTrax command parser does not recognize a command word given after
the $PFST keyword, if the command syntax is invalid or if the command
cannot be completed for some reason, an error message like the
following is output: $PFST,ERR,XXXX"XXXX" above means an error code that provides additional information about the reason of the error:
| Code |
Description |
ffff |
General error. |
fffe |
Invalid command syntax or invalid operation |
fffd |
Timeout error. |
Notice that also other error codes are possible with some NMEA commands.
Serial port settings
Default NMEA port settings are as follows: | iTrax module / evaluation kit port used for NMEA:
|
PORT 0 |
| Serial port setting: |
4800 baud, 1 stop bit, 8 data bits, no parity |
| Enabled messages: |
RMC, GGA, GSA, GSV |
The absolute character throughput of a serial port is limited by the serial speed. Temporary overload of sentences can be buffered but continuous overload eventually causes full NMEA sentences to be dropped. As most NMEA sentences are output once every fix, the X in following equation should not exceed value of 1.
where
L = combined length of all enabled messages (chars)
B = serial port baud rate
Please refer to the table below to decide which NMEA messages to output at given serial port speed.
| NMEA sentence |
maximum message length (chars incl. CR+LF) |
| ZDA | 34 |
| RMC | 75 |
| GGA |
82 |
| GLL |
51 |
| VTG |
40 |
| GSA | 67 |
| GSV | 60 (per single line!) |
NMEA Checksum
Checksum is calculated by taking a logical
exclusive-OR operation of the 8-bit message characters. Checksum
excludes the leading '$', checksum delimiter '*' and the checksum
itself. The following C-language routine calculates the checksum.
Parameters are:
char* sz pointer to the string containing the message (excluding
checksum).
int nCount number of characters in message (including leading
'$')
unsigned char Calc_checksum(char* sz, int
nCount)
{
unsigned char cs; // Checksum
//Omit the $-character
for (i=1; i<Count; i++)
{
cs = cs ^((unsigned char)sz[i]);
}
return cs;
}
Notice that leading "$" is not included when calculating the checksum.
Receiving application should calculate the checksum of the message and compare it to the received checksumin in the message.
NMEA parsing
Fastrax provides free NMEA parser implementation in full source code for our iTrax module customers. NMEA parser is available with our iTalkRIS package. To acquire iTalkRIS package, please contact our support and request for iTalkRIS package.You can find a lot of NMEA parsing example also from public domain.
Standard NMEA Messages
The following sections describe the supported standard NMEA output messages.GGA - Global Positioning System Fix Data
Time, position and fix related data for a GPS receiver.$GPGGA,hhmmss.dd,xxmm.dddd,<N|S>,yyymm.dddd,<E|W>,v,ss,d.d,h.h,M,g.g,M,a.a,xxxx*hh<CR><LF>
hhmmss.dd |
UTC time of the fix. hh = hours mm = minutes ss = seconds dd = decimal part of seconds |
xxmm.dddd |
Latitude coordinate. xx = degrees mm = minutes dddd = decimal part of minutes |
<N/S> |
Character denoting either N = North or S =South. |
yyymm.dddd |
Longitude coordinate. yyy = degrees mm = minutes dddd = decimal part of minutes |
<E/W> |
Character denoting either E = East or W = West. |
v |
Fix valid indicator 0 = Fix not valid 1 = Fix is valid |
ss |
Number of satellites used in position fix, 00-12. Notice: Fixed length field of two letters. |
d.d |
HDOP - Horizontal Dilution Of Precision. |
h.h |
Altitude (mean-sea-level, geoid) |
M |
Letter M. |
g.g |
Difference between the WGS-84 reference ellipsoid surface and the mean-sea-level altitude. |
M |
Letter M. |
a.a |
NULL (not implemented) |
xxxx |
NULL (not implemented) |
Example:
$GPGGA,084053.39,6016.3051,N,02458.3735,E,0,00,0.0,46.6,M,18.2,M,,*5D
GLL - Geographic Position - Latitude/Longitude
Latitude and Longitude, UTC time of fix and status.$GPGLL,xxmm.dddd,<N|S>,yyymm.dddd,<E|W>,hhmmss.dd,S,M*hh<CR><LF>
xxmm.dddd |
Latitude coordinate. xx = degrees mm = minutes dddd = decimal part of minutes |
<N|S> |
Character denoting either N = North or S =South. |
yyymm.dddd |
Longitude coordinate. yyy = degrees mm = minutes dddd = decimal part of minutes |
<E|W> |
Character denoting either E = East or W = West. |
hhmmss.dd |
UTC time of the fix. hh = hours mm = minutes ss = seconds dd = decimal part of seconds |
S |
Status indicator. A = valid V = invalid |
M |
Mode indicator. A = autonomous N = data not valid |
Example:
$GPGLL,6016.3073,N,02458.3817,E,090110.10,A,A*61
GSA - DOP and Active Satellites
GPS receiver operating mode, satellites used in the navigation solution reported by the GGA sentence, and DOP values.$GPGSA,a,b,xx,xx,xx,xx,xx,xx,xx,xx,xx,xx,xx,xx,p.p,h.h,v.v*hh<CR><LF>
a |
Mode: M = Manual, forced to operate in 2D or 3D mode. A = Automatic, allowed to automatically switch 2D/3D. |
b |
Mode: 1 = Fix not available, 2 = 2D, 3 = 3D |
xx |
ID (PRN) numbers of GPS satellites used in
solution |
p.p |
PDOP |
h.h |
HDOP |
v.v |
VDOP |
Example:
$GPGSA,A,3,06,10,15,16,21,25,30,,,,,,2.1,1.2,1.8*38
GSV - Satellites in view
Number of satellites in view, satellite ID (PRN) numbers, elevation, azimuth, and SNR value. The information for four satellites is a maximum per one message, additional messages up to maximum of eight are sent if needed. The satellites are in PRN number order.Before a position fix is acquired the information contains only the SNR (signal to noise ratio) value. After a fix is acquired, also the elevation and azimuth angles are added. Note that there can be also "theoretical" satellites in the GSV message. These are satellites of which the angles (elevation, azimuth) are known but for some reason, e.g. due to an obstruction, have not been found by iTrax03. The SNR value for these satellites is set to zero.
Please notice that as all the satellites that in the view are reported, the amount of satellites may occasionally be more than the number of receiver tracking channels, 12.
$GPGSV,n,m,ss,xx,ee,aaa,cn,…………. ,xx,ee,aaa,cn*hh<CR><LF>
n |
Total number of messages, 1 to 9 |
m |
Message number, 1 to 9 |
ss |
Total number of satellites in view |
xx |
Satellite ID (PRN) number |
ee |
Satellite elevation, degrees 90 max |
aaa |
Satellite azimuth, degrees True, 000 to 359 |
ch |
Signal-to-noise ration (C/No) 00-99 dB-Hz. Value of zero means that the satellite is predicted to be on the visible sky but it isn't being tracked. |
Example:
$GPGSV,4,1,14,03,66,207,50,08,09,322,44,11,01,266,42,14,00,155,00*79
$GPGSV,4,2,14,15,41,088,48,17,21,083,44,18,57,087,51,21,57,173,50*78
$GPGSV,4,3,14,22,05,203,00,23,52,074,49,26,17,028,44,27,00,300,00*79
$GPGSV,4,4,14,28,32,243,00,31,48,286,00*70
RMC - Recommended Minimum Specific GNSS Data. Time, date, position, course and speed data.
$GPRMC,hhmmss.dd,S,xxmm.dddd,<N|S>,yyymm.dddd,<E|W>,s.s,h.h,ddmmyy,d.d, <E|W>,M*hh<CR><LF>
hhmmss.dd |
UTC time of the fix. hh = hours mm = minutes ss = seconds dd = decimal part of seconds |
S |
Status indicator A = valid V = invalid |
xxmm.dddd |
Latitude coordinate. xx = degrees mm = minutes dddd = decimal part of minutes |
<N|S> |
Character denoting either N = North or S = South.
|
yyymm.dddd |
Longitude coordinate yyy = degrees mm = minutes dddd = decimal part of minutes |
<E|W> |
Character denoting either E = East or W = West. |
s.s |
Speed in knots. |
h.h |
Heading |
ddmmyy |
UTC Date of the fix. dd = day of month mm = month yy = year |
d.d |
Magnetic variation in degrees, i.e. difference
between geometrical and magnetic north direction. |
<E|W> |
Letter denoting direction of magnetic variation. Either E = East or W = West. |
M |
Mode indicator A=autonomous N=data not valid |
Example:
$GPRMC,095035.91,A,6016.3066,N,02458.3832,E,1.08,210.6,131204,6.1,E,A*0A
VTG - Course Over Ground and Ground Speed
Course and speed.$GPVTG,h.h,T,m.m,M,s.s,N,s.s,K,M*hh<CR><LF>
h.h |
Heading in degrees. |
T |
Letter 'T' denoting True heading in degrees. |
m.m |
Magnetic heading in degrees. |
M |
Letter 'M' denoting Magnetic heading in degrees. |
s.s |
Speed in knots. |
N |
Letter 'N' denoting speed in knots. |
s.s |
Speed, km/h. |
K |
Letter 'K' denoting speed in km/h. |
M |
Mode indicator. A=autonomous N=data not valid |
Example:
$GPVTG,202.6,T,208.7,M,0.38,N,0.7,K,A*0D
ZDA - Time and Date
Outputs the current UTC time and date. Unlike other messages, the time output by this message is bound to iTrax03's internal real-time clock (RTC) and thus it is updated even when navigation fix is unavailable. The RTC time is maintained also while the module is in sleep mode.NOTES:
- The time output in ZDA message slightly differs from the time output by other messages because the time reference of the ZDA message is set to the very instant of outputting the message, whereas the time output on other messages is the moment of the navigation fix.
- As the ZDA time is set to output time of the message, this time
is closer to the real time and may be used as a somewhat accurate time
reference if the latency of the system-specific serial port
transmission is compensated (usually about deterministic). Time
precision of approx. 1/100th of a second can be achieved by this
method.
- Because of the way ZDA time is generated, you may occasionally
see time increasing by two seconds. This may happen in cases when iTrax
CPU load is very high and thus one ZDA message may be dropped.
$GPZDA,hhmmss.dd,dd,mm,yyyy,xx,yy*hh
hhmmss.dd |
UTC time in hours, minutes, seconds and fractions
of a second. |
dd |
UTC day of month |
mm |
UTC month |
yyyy |
UTC year |
xx |
Local zone hours. Not implemented, output always
00. |
yy |
Local zone minutes. Not implemented, output always 00. |
Example: The following message corresponds to UTC time 06:17:24.46 on 17-Apr-2003.
$GPZDA,061724.46,17,04,2003,00,00*61
Nonstandard NMEA Messages
The following sections describe the supported nonstandard NMEA output messages.$PFST,FOM - Position Figure of Merit
Figure of merit (FOM) value for the position fix. Indicates the
accuracy of the position in meters. The FOM value cannot be calculated
before at least one fix has been made with more than four observations
(five satellites, or four satellites and an altitude aid); before that
a value "-1" is reported, indicating that FOM is not available yet.
After this the FOM value is always available the only exception being
the altitude aiding modes when a fix has been calculated using three
satellites. $PFST,FOM,n,cn*hh<CR><LF>
n |
Position FOM value, i.e., position accuracy in
meters |
Example:
$PFST,FOM,4*61
$PFST,NAVST - Navigation information
$PFST,NAVST,hhmmss.ss,velflag*hh<CR><LF>
hhmmss.ss |
UTC time |
velflag |
Quality indication of velocity in the fix. 3 = reliable 3D velocity with measurements from at least 4 satellites; 2 = velocity measurements from at least 3 satellites; 0 = not enough good quality measurements to provide an accurate velocity fix. |
Example:
$PFST,NAVST,073410.82,3,*45
$PFST,PPS - GPS time info
$PFST,PPS,wwww,ssssss.mmm,utcvalid,hhmmss.ss,ddmmyy,ppsnum*hh<CR><LF>
wwww |
week number |
ssssss |
number of seconds since start of week |
mmm |
milliseconds |
utcvalid |
validity of UTC time, 1 if valid, 0 if not |
hhmmss.ss |
UTC time |
ddmmyy |
UTC date |
ppsnum |
number of SV's used to calculate the PPS fix.
Empty field or 0 means that the PPS pulse will be predicted |
Example:
$PFST,PPS,1375,113664,493,1,073410.82,150506,10,*45
Generic NMEA Commands
Following sections specify NMEA commands supported by iSuite version 3 compatible iTrax receivers.$PFST,ALTAID - Set altitude
aiding mode
Sets or disables the altitude aiding mode, where the navigation is
assisted by using the given altitude value or an altitude value from a
previous fix. Altitude aiding enables getting a navigation fix with
fewer than four satellites, and as a matter of fact altitude aiding is
used only if there are four or less satellites visible. Note that the
aided altitude is used as an additional observation and the altitude is
still calculated, not fixed to the given or aided altitude. Altitude aiding commands can be given before starting the navigation or during navigation. By default, the altitude aiding mode is enabled.
A reply to this command contains the used mode and altitude, if given. Note that although the reply displays altitude always with one decimal, navigation uses the full precision given in the command.
Syntax:
$PFST,ALTAID,n,x.x
n |
A numeric value indicating the new altitude
aiding mode: 0 : No altitude aiding 1 : Altitude aiding mode: Use constant altitude given in the <altitude> parameter |
x.x |
Constant altitude in meters above the sea level, used in altitude aiding mode |
Examples:
$PFST,ALTAID,1,34.2
$PFST,ALTAID,0
$PFST,CONF - Configure parameters
This command can be used to read and set iSuite parameter values. Each
parameter has its unique ID number that is used to access that very
parameter. Please see the section Parameters for a list of
parameters and their ID numbers. If the new parameter value is omitted from the command parameters, the command will report the current value for the given parameter.
Notes:
- Configurable parameters are described in Parameters document.
- Changed parameter values are stored into non-volatile memory so that the parameter changes are not cancelled when resetting the module.
- Some parameter changes may require resetting the GPS module before they have effect.
- The factory default settings can be restored with command $PFST,RESTORE.
Syntax:
$PFST,CONF,NNNN,VVVV
NNNN |
Parameter key in hexadecimal format. |
VVVV |
(Optional) The new parameter value. Use a $
(dollar) in front of the parameter to give the value in hexadecimal
format, if $ is not given parameter value is interpreted as decimal
number (note that parameter key is always hexadecimal). If command
parameter is omitted, the response reports the current value of the
given parameter. |
Examples:
Query parameter 0021 value ("NMEA speed"):
Enter: $PFST,CONF,21
Reply: $PFST,CONF,0021,4800*36
Query parameter 0022 ("NMEA mask"):
Enter: $PFST,CONF,22
Reply: $PFST,CONF,0022,$A023*6D
Configure (permanently) NMEA mask (parameter key 0022) to hexadecimal value of 8010:
$PFST,CONF,22,$8010
Enable logging:
Enter: $PFST,CONF,0D87,1
Reply: $PFST,CONF,0D87,1*73
Note: This change to take effect
you need to reboot iTrax03 either manually or by entering:
$PFST,REBOOT
$PFST,FIXRATE - Set fixrate
Defines how often iTrax should acquire navigation fix and thus output
the NMEA messages. Syntax:
$PFST,FIXRATE,x.x
x.x |
Number of seconds between navigation fixes. Can
be also a decimal number to enable more than one fix/second fix rate. |
Notes:
- The requested fix rate is generated by modifying
PRM_TRACK_MEAS_INTERVAL and PRM_NAV_OUTPUT_INTERVAL parameters. The
modified parameters are saved to flash.
- For fix intervals smaller than 2 seconds, track measurement
interval is set to the requested fix rate. Because the track
measurement interval should be short, for intervals longer than two
seconds, the track measurement interval is set to 1000 ms and the
requested fix rate is generated by setting the output interval
parameter correspondingly. Therefore, fixrates longer than 2 seconds
and rounded downwards to the nearest integer.
- Maximum fix rate available with default parameter settings is 3
Hz. To achieve higher fix rates than this, you have to limit the number
of channels used for satellite tracking. This is controlled by
parameter TRACK_CHANNELS (see also command $PFST,CONF).
Try for example to limit TRACK_CHANNELS parameter to 8 to achieve fix
rate of 5Hz.
Examples:
$PFST,FIXRATE,4
$PFST,FIXRATE,0.5
$PFST,FIXRATE,2.5 (the actual fix rate will be two seconds, see the note above)
$PFST,INITAID - Initial position and
time aiding
Gives the iTrax module the current position and time information for
aiding the navigation startup. Setting this information before starting
navigation with the $PFST,START command reduces the time required for
finding the satellites and receiving the first valid navigation fix. If
the position is not known, the initial time may also be given alone by
omitting the position parameters, i.e. using the command with only the
two first parameters. The altitude information is not critical and can
be set to zero (i.e. mean sea level) if not known. To use time aiding, both time and date must be valid. The command parser verifies that there are enough digits in the parameters and checks that the values are valid (for example, month 14 is not accepted). Respectively, both latitude and longitude must be valid in order to use position aiding. The decimal part can be omitted in time, latitude and longitude parameters.
A reply to this message contains the aiding information that is passed to navigation. If, for example, there is a syntax error date parameter, also time is omitted in the reply, but position may still be used.
Notes:
- Even when INITAID is being used, the iTrax module reports navigation data of the previous actual navigation fix until a new fix is acquired, not the position and time data given in the INITAID command.
Syntax:
$PFST,INITAID,hhmmss.dd,ddmmyy,xxmm.dddd,<N/S>,yyymm.dddd,<E/W>,n
hhmmss.dd |
UTC time in "hhmmss.dd" format, hh = hours (2 digits), mm = minutes (2 digits), ss = seconds (2 digits), dd = decimal part of seconds. |
ddmmyy |
UTC date in "ddmmyy" format, dd = day (2 digits), mm = month (2 digits), yy = year (2 digits). |
xxmm.dddd |
Latitude in degrees and minutes in "xxmm.dddd"
format, xx = degrees (2 digits), mm = minutes, dddd = decimal part of
minutes. |
<N/S> |
Either a character N or S (N = north, S = south). |
yyymm.dddd |
Longitude in degrees and minutes in "yyymm.dddd" format, yyy = degrees (3 digits), mm = minutes, dddd = decimal part of minutes. |
<E/W> |
Either a character E or W (E = east, W = west). |
n |
Altitude from the sea level in meters. |
Examples:
$PFST,INITAID,131500.78,100102,6016.3075,N,02458.3817,E,40
$PFST,INITAID,,,6016.3075,N,02458.3817,E (position aiding only)
$PFST,ITALK
- Switch NMEA port to iTalk protocol
This command switches NMEA port to use iTalk protocol. iTrax replies to
this command by echoing the same command, then goes to iTalk mode. Notes:
- When a serial port is switched to iTalk mode, it does not accept NMEA commands any more.
- The port is restored to use NMEA protocol again at next reset. If
it is desirable to reconfigure protocols permanently, that can be done
by modifying the corresponding system parameters, see command $PFST,CONF.
$PFST,ITALK,SSSSS
SSSSS |
Serial port baud rate to use with iTalk protocol,
e.g. 115200. |
Example: The following command switches NMEA port to use iTalk at 115200 baud:
$PFST,ITALK,115200
$PFST,NMEA
- Configure NMEA port speed and message mask
Configures the NMEA serial port baud rate and message mask for the
current session. After receiving this command, iTrax replies by echoing
the command still at old baud rate, then switches to new baud rate if
appropriate. If command parameters are omitted, the command reports the current NMEA port settings.
NMEA message mask is a hexadecimal number formed by combining desired message identifiers with a logical OR operation according to the following table:
| NMEA Message |
Message Identifier (Hexadecimal) |
| GSV |
0001 |
| GSA |
0002 |
| ZDA |
0004 |
| PPS |
0010 |
| FOM |
0020 |
| ODO |
0080 |
| NAVST |
0100 |
| GLL |
1000 |
| GGA |
2000 |
| VTG |
4000 |
| RMC |
8000 |
| Reserved |
Other Values |
For example, to enable messages GSV, GSA, GGA and RMC, combine hexadecimal values 0001 + 0002 + 2000 + 8000 = a003.
Notes:
- The original NMEA port settings are restored at next reset. If it is desirable to reconfigure protocols permanently, that can be done by modifying the corresponding system parameters, see command $PFST,CONF.
- When enabling multiple messages at the same time, please verify
that the port speed is capable of outputting all the message data at
given baud rate, see section Serial port
settings.
$PFST,NMEA,MMMM,SSSSS
MMMM |
(Optional) New NMEA message mask, see discussion
above. This parameter can be omitted if it is desirable to change only
the port speed while keeping the current message mask. In such case
insert only a double comma ",," instead. |
SSSS |
(Optional) New NMEA serial port baud rate. This
parameter can be omitted if port speed is not to be changed. |
Examples:
The following command configures NMEA port to output RMC and ZDA messages:
$PFST,NMEA,8004The following command configures NMEA port to baud rate of 19200. The new baud rate comes to effect after iTrax has replied to this command still with old baud rate:
$PFST,NMEA,,19200
$PFST,ODO - Read and set odometer value
Odometer query and configuration message. A reply to this message contains always the current odometer reading when the command is received.
Note: The odometer is
designed in a way that when zeroing the odometer, it will start
incrementing only after the navigation fix is reliable enough.
Command Syntax:
$PFST,ODO,V,MReply syntax:
$PFST,ODO,V,M
V |
(Optional) Odometer reading in meters. This
parameter can be used to set the odometer to any value. If omitted,
odometer value is not changed when processing this command. In a reply message, this parameter contains the odometer reading before setting the new value. |
M |
(Optional) Reporting mode. 0 = On request. Report odometer reading only when requested by $PFST,ODO command (default) 1 = Automatic report. Send the odometer reading in $PFST,ODO message automatically at the specified fixrate |
Example:
Enter: $PFST,ODO,0,0
Reply: $PFST,ODO,14083*6B
$PFST,REBOOT
- Software reset
This command performs a software reset. The reset performed by this
command is quite identical to hardware reset, except that it is
initiated by software. Syntax:
$PFST,REBOOT,M
M |
(Optional) Reset mode. This parameter can be used
to specify alternative reset operations. If omitted, normal reset is
performed. 0 = Normal reset (default) 1 = Reset module to flashware mode. See Flashing section for more information. 2 = Reset module to LOD download mode, i.e. HW programming mode. 3 = Relocate alternative firmware at reset. See Flashing section for more information. |
Examples:
The following command performs a usual reset:
$PFST,REBOOTThe following command resets the module to HW programming mode:
$PFST,REBOOT,2
$PFST,RESETDATA - Discard navigation data
This command discards all or a chosen subset of navigation data that is kept in iTrax's memory.An optional command parameter can be used to define a subset of data that is preserved while other data are reset. The command parameter is formed as a logical OR combination of following hexadecimal values:
| Data to be kept |
Identifier (Hexadecimal) |
| Time |
0001 |
| Position |
0002 |
| Almanacs |
0004 |
| Ephemeris |
0008 |
| UTC & Iono models |
0010 |
For example, to keep both almanac and ephemeris data, combine the following hexadecimal values 0004 + 0008 = 000c.
Note: Navigation must be stopped when giving this command.
Syntax:
$PFST,RESETDATA,$MMMM
MMMM |
(Optional) Hexadecimal number that specifies a
subset of data that is kept while other data is erased. If omitted, all
navigation data will be erased. |
Examples:
The following command erases navigation data:
$PFST,RESETDATAThe following command erases all navigation data except almanacs:
$PFST,RESETDATA,$0004
$PFST,RESTORE - Restore
factory default settings
Restores "factory default" settings to all parameters. This command
effectively discards all changes to parameter values, have the changes
been made either with $PFST,CONF command or
by other means. Note: You have to use $PFST,STOP before using this command. Performing a reset after this command is recommended to make all restored parameters to take effect.
Syntax:
$PFST,RESTORE
$PFST,SLEEP - Go to sleep mode
This command puts iTrax to low-power sleep mode to conserve power. See section Sleep mode for more details of the sleep mode.If iTrax is navigating when a $PFST,SLEEP command is received, navigation will be resumed automatically after waking up. If iTrax is in idle mode (i.e. not navigating) before sleep, it will wake up into the idle mode.
In addition to a pre-defined sleeping duration, the sleeping mode can be terminated by any of the following external wake-up signals. To define distinct external wake-up sources as a command parameter, combine desired wake-up source IDs with a logical OR operation.
| Wake-up source |
Id(Hexadecimal) |
Description |
| Timer |
0001 |
Wake up after a speficied timeout |
| UART 0 |
0002 |
Wake upon receiving data in serial port UART 0. |
| UART 1 |
0004 |
Wake upon receiving data in serial port UART 1. |
| GPIO Sleep pin |
0008 |
Wake upon GPIO Sleep on/off pin mode changing. |
| GPIO Wakeup pin |
0010 |
Wake upon GPIO Wakeup pin mode changing. |
Notice that if waking the module up by sending data to either of serial ports UART0 or UART1, the signal should last at least 20 milliseconds. If using baud rate of 4800 or higher, this means that either using a break signal or sending multiple white space characters is recommended.
Note: For a robust behaviour, GPS Workbench makes periodic queries to iTrax if it does not receive any messages within a certain interval. If GPS workbench is connected to iTrax when entering the sleep mode, the query signals will wake up the receiver, if the corresponding UART has been defined as a wake-up source. If waking from GPSWB queries is not desired, disconnect to the GPSWB from iTrax or omit the corresponding UART flag from the wake-up mask.
Syntax:
$PFST,SLEEP,SSSS,MMMM
SSSS |
(Optional) Time to sleep in seconds. Maximum time
is 4294967 seconds, i.e. approx. 49 days 17 hours. This parameter can be omitted by using a double comma (",,") in place of this parameter. In such case, iTrax will sleep until an external wake-up condition is received. |
MMMM |
(Optional) Defines external sources that can
trigger wake-up. If omitted, iTrax will wake up for all wakeup sources.
|
Examples:
The following command puts iTrax to sleep for 15 minutes.
$PFST,SLEEP,900,1The following command puts iTrax to sleep for 1 hour, or until external wake-up signal to GPIO wake-up pin is received.
$PFST,SLEEP,3600,11The following command puts iTrax to sleep until an external signal is received from UART 0 or UART 1.
$PFST,SLEEP,,6
$PFST,START
- Start navigation
Starts navigation. If starting fails, e.g. for the reason that navigation has already been started, iTrax will reply with a $PFST,ERR error message.
Syntax:
$PFST,START,MMMM
MMMM |
(Optional) Start mode. This parameter defines
what aiding information to use and what to discard at start. If this
parameter is omitted, all useful aiding information is kept and used
(recommended). The start mode can be used to two ways. Either by specifying one of the pre-defined start modes or by explicitly specifying the aiding information to use at start. The pre-defined start modes are as follows.
If the user needs to preserve only some of the aiding information, the type of information to be used at start can be specified by forming the start mode parameter as a logical OR combination of any of the following identifiers in hexadecimal notation:
Warning: Discarding aiding information results into degraded navigation starting performance. It may be useful for testing purposes, but it is suggested not to use START command with aiding data discarding modifiers in final applications. For example, to discard everything else but almanacs and ephemeris data at start, use a mode value of (hexadecimal numbers) 0004 + 0008 = 000C. As another example, to simulate a warm start by discarding ephemerides, use a mode value of FFFF - 0010 - 0008 = FFD7. In this example we keep all other bits set except we reset the ephemeris bit (0008) and subframe bit (0010). We recommend keeping the unused bits set because that will reduce the possibility of conflict between new and older firmware versions. Note: Discarded data will be lost permanently, i.e. they won't be available for subsequent starts until received again from the GPS satellites. |
Examples:
To start navigation:
$PFST,STARTTo perform a cold start that discards all aiding information (Warning: Cold start will result in degraded starting performance, do not use this command in final applications):
$PFST,START,8000
$PFST,STOP
- Stop navigation
Stops navigation. A reply to this command is sent after navigation has really been stopped, so the reply can be used as an indication that all stop operations have been completed succesfully.
If stopping fails, e.g. for the reason that navigation is already stopped, iTrax will reply with a $PFST,ERR error message.
Syntax:
$PFST,STOP
$PFST,SW
- Query software version
Query for software version. iTrax replies with software version number.
Command Syntax:
$PFST,SWReply syntax:
$PFST,SW,MAJOR,MINOR,BUILD
MAJOR |
Software Major version |
MINOR |
Software Minorversion |
BUILD |
Build Number |
Example:
Enter: $PFST,SW
Reply: $PFST,SW,3,1,4184*1E
NMEA Logging Commands
The following NMEA commands are available for managing the iSuite logging system. Please see the Logging System document for general information about the logging system.$PFST,LOGCLEAR
- Clear logs
Clears the logs. Syntax:
$PFST,LOGCLEAR
$PFST,LOGFREE
- Get amount of free space for log items
Returns the amount of free space that is available for logs. Command Syntax:
$PFST,LOGFREEReply syntax:
$PFST,LOGFREE,WORDS,ITEMS
WORDS |
Number of WORDs available in the flash file
system |
ITEMS |
Number of log entries that fit in the flash file
system with the current settings. |
NOTE: Amount of log points that fit into memory depend on logging settings. See LOGSETTING command for more information.
Example:
Enter: $PFST,LOGFREE
Reply: $PFST,LOGFREE,671060,67106*5D
$PFST,LOGGET - Get log items
Gets items from the log.LOGGET command will output the NMEA messages defined by current NMEA message mask (see $PFST,NMEA). Navigation must be stopped ($PFST,STOP) before you can use this command.
Command Syntax:
$PFST,LOGGET,LOGNUM,FIRST,COUNT,OUTPUT
LOGNUM |
Identifier of the log whose items to output. |
FIRST |
(optional) Get subset of log points inside a log
starting from this index. Default is to start from the first point of a
log. |
COUNT |
(optional) Get at most this many log items.
Default is to output all points until end of the log. |
OUTPUT |
(optional) Output selection: 0: output log items as NMEA sentences according to current NMEA settings (default) 1: output log items as iTalk NAV_FIX messages to the iTalk port. |
Reply syntax:
$PFST,LOGGET,LOGNUM,FIRST,COUNT
LOGNUM |
Identifier of the log where to get the items |
FIRST |
First entry that was output |
COUNT |
The number of entries |
Example:
Enter: $PFST,LOGGET,2
Reply:
$PFST,LOGGET,2,1,1,*33
$GPGGA,112403.03,0000.0000,N,00000.0000,E,1,00,1.2,,,,,,*59
$GPRMC,112403.03,A,0000.0000,N,00000.0000,E,0.35,0.00,160904,,,A*54
$GPGSA,A,2,00,00,00,00,00,00,,,,,,,0.0,1.2,0.0*30
$PFST,LOGINFO - Get log info
Show log information for the given log(s).Command Syntax:
$PFST,LOGINFO,LOGNUM
LOGNUM |
(optional) Identifier of the log whose
information is shown. If this parameter is omitted, a list of log infos
for all logs is shown. |
Reply syntax:
$PFST,LOGINFO,LOGNUM,COUNT,DATAMASK
LOGNUM |
Log number whose information is shown. |
COUNT |
Number of log points in the log |
DATAMASK |
Logging data level mask identifying what data is stored with each point of this log. The mask is a hexadecimal number. See the LOGSETTING command for detailed encoding of the data mask. |
Example:
Enter: $PFST,LOGINFO,2
Reply: $PFST,LOGINFO,2,148,0FE*57
$PFST,LOGMODE - Logging mode
Defines logging mode defining if and when to start a new log.Command Syntax:
$PFST,LOGMODE,MODE,RESTART
MODE |
Logging start mode that controls when to start a
new log. The start mode can be one of the values specified in the Logging start modes table below. |
RESTART |
(optional) Close current log and start a new log
after this many log points have been stored to current log. A new log
is started according to the current logging mode. If zero, doesn't
automatically restart a new log. |
Logging start modes:
| Mode |
Description |
0 |
Logging is disabled. Don't start new logs, but
old data can be read and managed by other logging commands. |
1 |
Start a new log when navigation starts if no
other logs exist. If other logs exist, don't start logging. |
2 |
Append to last log if possible when navigation
starts, otherwise create a new log. Appending to the previous log may not be possible if previous log has different logging settings, or in some cases if previous log has been abruptly terminated e.g. by a loss of power. |
3 |
Start a new log each time when navigation is
started. |
4 |
Append to last log if possible. This is same as
mode 2 and is supported to emulate similar starting modes than in
iTrax02. |
5 |
Erase all old logs and start a new log when
navigation starts. |
6 |
Erase all old logs except the previous one, and
start new log each time when navigation starts. Together with RESTART
parameter this mode allows keeping a limited record of previous log
points always available during continuous data logging. |
Reply syntax:
$PFST,LOGMODE,MODE,RESTARTReply parameters are same as for the command.
Example:
Enter: $PFST,LOGMODE,3
Reply: $PFST,LOGMODE,3,0*79
$PFST,LOGNUM - Get number of logs
Returns the number of logs in the flasg file system.Command Syntax:
$PFST,LOGNUMReply syntax:
$PFST,LOGNUM,NUM
NUM |
Number of logs. |
Example:
Enter: $PFST,LOGNUM
Reply: $PFST,LOGNUM,3*34
$PFST,LOGSETTING - Logging settings
Define logging settings.Command Syntax:
$PFST,LOGSETTING,MASK,MIN_TIME,MIN_MOVE,MAX_TIME,MAX_MOVE,MIN_VEL,MAX_VEL
MASK |
Logging data level mask. This is a hexadecimal
number that specifies what information is stored with each log point.
The mask value is formed as a logical OR combination of values shown in
"Data level mask bits" table below. The log point size in words can be calculated by adding the corresponding "Data Size" column values together. |
MIN_TIME |
(optional) Min. interval condition for adding a
new point to the log (seconds). |
MIN_MOVE |
(optional) Min. movement condition for adding a new point to the log (meters). |
MAX_TIME |
(optional) Max. logging interval condition for adding a new point to the log (seconds). If set to zero, the maximum condition isn't used. |
MAX_MOVE |
(optional) Max. movement condition for adding a new point to the log (meters). If set to zero, the maximum condition isn't used. |
MIN_VEL |
(optional) Min. velocity condition for adding a new point to the log (m/s). |
MAX_VEL |
(optional) Max. velocity condition for adding a new point to the log (m/s). If set to zero, the maximum condition isn't used. |
Old setting values are used for omitted parameters.
NOTE: Time/Move/Velocity conditions are evaluated in such way that a new point is added to log only if either:
- ALL minimum filter conditions are met at the same time, or
- ANY of the maximum filter conditions are met at any time
Data level mask bits:
| Data mask (hexadecimal) | Data size (16-bit words) |
Description |
0001 |
4 |
Latitude & Longitude coordinates |
0002 |
1 |
Altitude with regular precision: 0.4 meter
precision up to 13 kilometers |
0004 |
2 |
Altitude with full precision: millimeter
precision up to 2147 kilometers. Notice. If this bit is defined, the above "altitude" bit is ignored. |
0008 |
2 |
GPS Time with 1 second precision |
0010 |
3 |
GPS Time with millisecond precision. Notice. If this bit is defined, the above "GPS Time" bit is ignored. |
0020 |
1 |
Heading |
0040 |
1 |
Horizontal velocity |
0080 |
1 |
Vertical velocity |
0100 |
1 |
Fix information: Number of satellites, 2D/3D fix indication, HDOP |
Reply syntax:
$PFST,LOGSETTING,MASK,MIN_MOVE,MIN_TIME,MAX_MOVE,MAX_TIME,MIN_VEL,MAX_VELReply parameters are same as for the command.
Example:
Configure system to store Lat+Lon coordinates and GPS Time each time when the user has moved at least 50 meters from the previous location:
Enter: $PFST,LOGSETTING,9,0,50,0,0,0,0
Reply: $PFST,LOGSETTING,0009,0.000,50,0.000,0,0.00,0.00*3F
$PFST,LOGSTOP
- Stop logging
Stops current log without stopping navigation. Logging is started again
according to current logging mode when navigation is started for the
next time. To disable logging, use LOGMODE
command to set logging mode to zero. Command Syntax:
$PFST,LOGSTOPReply Syntax:
$PFST,LOGSTOP