Publisher Website! GPS Information, GPS & Navigation Technology and GPS Product review: NMEA CONFIG command

Tuesday, March 3, 2009

NMEA CONFIG command

4 NMEA Input Commands
Orion may not recognize commands if they are input at a rate greater than one per second.
All commands are in upper case unless stated otherwise.
If valid, the CONFIG, STOP, SLEEP, and START commands will be echoed back to the sender and
GETCONFIG will generate a CFG_R response. Otherwise, an error message will be sent.

4.1 GETCONFIG Command
The GETCONFIG command allows the user to read the current system configuration.
For details of each field, please refer to the CONFIG command in section 4.2 .
The format of the GETCONFIG command is:
$PUNV,GETCONFIG,
*cc
4.1.1 Output Configuration
Read the current output configuration:
$PUNV,GETCONFIG,00*41
The response message is:
$PUNV,CFG_R,00,00,0,1000,UART,MASK,*cc
UART = serial bit rate
MASK = NMEA message mask
4.1.2 Time Zone Configuration
Read the current time zone configuration:
$PUNV,GETCONFIG,03*42
The response message is:
$PUNV,CFG_R,03,TZH,TZM*cc
TZH = Time zone offset hours
TZM = Time zone offset minutes
Command Description
GETCONFIG Read configuration information
CONFIG Set configuration
STOP Stop navigation
SLEEP Stop navigation and enter sleep mode
START Immediate restart

4.1.3 Datum Configuration
Read the current datum configuration:
$PUNV,GETCONFIG,13*43
The response message is:
$PUNV,CFG_R,13,Dx,Dy,Dz,Da,Df,Name,ID*cc
Dx, Dy, Dz = Datum Offset values for X, Y, and Z coordinates (in meters).
Da = Datum value for the semi-major axis (in meters).
Df = Datum value for flattening.
Name = Name of the configured datum (see Section 6 for Datum names & IDs)
ID = ID of the configured datum (see Section 6 for Datum names & IDs).
4.1.4 Position Pinning & 2D/3D Startup Configuration
Read the current Position Pinning and 2D/3D start mode configuration:
$PUNV,GETCONFIG,17*47
The response message is:
$PUNV,CFG_R,17,PosThreshold,VelThreshold,2DStartMode*cc
. PosThreshold = Threshold value (meters) for position jump. Position will not be pinned if
this value is reached.
. VelThreshold = Threshold value (meters/second) for position jump. Position will not be
pinned if this value is reached.
. 2DStartMode = indicates whether the receiver will initially enter 2D fix mode (using last
navigated altitude) during a restart.
o 0: only 3D start is allowed
o 3: enable 2D cold start (if no last known good fix) & auto start (with last known good
fix),
4.1.5 Version Number
Read the software version number:
$PUNV,GETCONFIG,09*48
The response message is:
$PUNV,CFG_R,09,OrionVersion,*cc
OrionVersion is the Orion version string
The remaining values are hardware configuration values.
Note - This message is also sent at power up and reset.
Example-$PUNV,CFG_R,09,1.2.0-432,UBP_1.0,8130,2,1008,1,3,3000,16367600*58
Example-$PUNV,CFG_R,09,1.2.2-499-U121,UBP_1.0,8130,5,1008,1,3,0,16367600*25

4.2 CONFIG Command
The CONFIG command allows the user to change the configuration of the system. This configuration
takes effect immediately. It is also stored in non-volatile media and will therefore persist across
power cycles.
The format of the CONFIG command is:
$PUNV,CONFIG,
,*cc
4.2.1 Section 00 - Output Configuration
Set the output configuration:
$PUNV,CONFIG,00,00,0,1000,UART,MASK*cc
Table 11 – Output Configuration Parameters
UART is the UART communication speed in bits per second. All communications use 8 data
bits, no parity, and one stop bit.
MASK is a two-digit hexadecimal number which enables selected output NMEA sentences.
Each NMEA output sentence is assigned a bit in the mask.
Examples:
Only transmit the GSA, GSV, VTG, ZDA, and DTM sentences:
$EC = GSA ($4) + GSV ($8) + VTG ($20) + ZDA ( $40) + DTM(80)
Transmit the default sentences:
$1D = GGA ($1) + GSA ($4) + GSV ($8) + RMC ($10)
. Orion will check the maximum length of NMEA sentences when changing the output
configuration. If the speed is set to 4800 bps and the selected sentences total more than 450
characters, the command will be rejected and an error message issued. If all the specified
sentences are desired, a speed greater than 4800 bps must be selected.
UART communication speed NMEA mask
(UART) (MASK)
4800 = 4800 bps 01 = GGA
9600 = 9600 bps 02 = GLL
14400 = 14400 bps 04 = GSA
19200 = 19200 bps 08 = GSV
38400 = 38400 bps
57600 = 57600 bps 10 = RMC
115200 = 115200 bps 20 = VTG
40 = ZDA
80 = DTM
Default : 4800 Default : 1D

Examples:
Send all sentences except DTM at 115200 bps:
$PUNV,CONFIG,00,00,0,1000,115200,7F*cc
Change speed to 9600 bps with default output sentences:
$PUNV,CONFIG,00,00,0,1000,9600,1D*70
Disable sending of all NMEA sentences:
$PUNV,CONFIG,00,00,0,1000,4800,0*36
Send the default sentences:
$PUNV,CONFIG,00,00,0,1000,4800,1D*73
4.2.2 Section 03 - Time Zone Offset Configuration
Set the time zone offset:
$PUNV,CONFIG,03,TZH,TZM*cc
Table 12 – Time Zone Offset Configuration Parameters
TZH is the UTC offset in whole hours.
It may be negative, zero, or positive and is generally negative for West longitudes.
TZM is the additional minutes of UTC offset.
It must be zero or positive.
Note that this time zone offset has no effect on the timestamps in NMEA sentences which are always
in UTC.
Examples:
Set the -8 hour time zone (U. S. Pacific Standard Time):
$PUNV,CONFIG,03,-8,0*31
Set the UTC time zone (no offset):
$PUNV,CONFIG,03,0,0*14
Time Zone Offset Hours Time Zone Offset Minutes
(TZH) (TZM)
-11, -10, … , -1, 0, 1, … , 12 0, 15, 30, 45
Default : not set (0) Default : not set (0)

4.2.3 Datum Configuration
a. Set a built-in datum:
$PUNV,CONFIG,16,ID*cc
ID is the ID of the desired datum.
Default is 1 (WGS-84).
b. Set a custom datum configuration:
$PUNV,CONFIG,13,Dx,Dy,Dz,Da,Df,Name,0*cc
Dx, Dy, and Dz are the X, Y, and Z coordinate offsets in meters.
The defaults are 0.0, 0.0, 0.0 .
Da is the semi-major axis in meters. The default is 6378137.
Df is the flattening coefficient. The default is 0.003352810664 .
Name is the name of the datum. Maximum is 8 characters.
Examples:
Select the “TOY-B” (South Korean) datum:
$PUNV,CONFIG,16,211*0E
Select the default datum (WGS-84):
$PUNV,CONFIG,16,1*0D
4.2.4 Position Pinning & 2D/3D Startup
Set position pinning and 2D/3D startup parameters:
$PUNV,CONFIG,17,PosThreshold,VelThreshold,2D/3DStartMode*cc
PosThreshold is the threshold value for position jump. Position pinning will be disabled if
this value is reached.
VelThreshold is the threshold value for velocity calculation. Position pinning will be disabled
if this value is reached.
2DStartMode indicates whether the receiver will enter 2D startup initially during a cold start
based upon last navigated altitude.

Example:
Set the default settings:
$PUNV,CONFIG,17,50.0,1.0,3*3A
2D/3D Start Mode
0 = only 3D startup allowed
1 = Reserved. Do not use
2 = Reserved. Do not use
3 = 2D startup is allowed
Default: 3

4.3 STOP Command
Stop navigation:
$PUNV,STOP*29
4.4 SLEEP Command
Enter the sleep mode:
$PUNV,SLEEP*7E
To wake up from sleep, send a command to the serial port. Since the command will not be executed,
its content is arbitrary. Orion always wakes in the AUTO mode.
If the board design includes an external RTC (please refer to the module Data Sheet), the
SLEEP command can specify a sleep duration. Note that the receiver will wake up on
UART activity or when the duration expires, whichever occurs first.
$PUNV,SLEEP,HH,MM,SS*CC
HH is hours [0 to 24]
MM is minutes [0 to 59]
DD is seconds [0 to 59]
Maximum sleep time is 24,59,59 and minimum is 00,00,05.
Example (sleep for 30 seconds):
$PUNV,SLEEP,00,00,30*cc
4.5 START Commands
Cause an immediate restart:
$PUNV,START,AUTO*52
$PUNV,START,COLD*59
$PUNV,START,WARM*59
$PUNV,START,HOT*0E
$PUNV,START,FAST*5D
The START command will be echoed only after the system has stopped (which takes approximately
one second). Until then Orion will produce navigation data.

5 ERR Message
The ERR message is sent as a response to an invalid command. Its format is:
$PUNV,ERR,ID,ERROR,DATA*cc
ID is the section ID which causes the error (05 = NMEA command processor).
ERROR is the error number defined in the section.
DATA is error specific optional data.
ID ERROR Description
5 (NMEA) 1 Illegal command form
5 (NMEA) 2 Illegal command prefix
5 (NMEA) 3 Illegal command
5 (NMEA) 4 Illegal section ID
5 (NMEA) 5 Illegal parameter.
5 (NMEA) 6 Illegal checksum.
5 (NMEA) 7 Illegal message.
Table 15 – Error Codes
Examples of error messages:
Illegal checksum:
$PUNV,ERR,05,00006,00000*5B
Illegal command:
$PUNV,ERR,05,00003,00000*5E
Fast Hot Warm Cold
Almanac + + + -
Ephemeris + + - -
Time accuracy ~10 ms ~300s ~300s -
Last known good fix + + + -

credit:http://www.micro-modular.com/

No comments:

Post a Comment