Garmin 15H-W - GPS 기술 사양 - 페이지 31
{카테고리_이름} Garmin 15H-W - GPS에 대한 기술 사양을 온라인으로 검색하거나 PDF를 다운로드하세요. Garmin 15H-W - GPS 38 페이지. Garmin gps 15l: technical spec
svid
Satellite number (0-31 and 119-138 for WAAS) Note: Add 1 to offset to current svid
numbers.
valid
0 = information not valid; non-zero = information valid
Sample C Code
DLE and ETX bytes:
Sample C code to receive the two records should filter DLE and ETX bytes as described below:
typedef enum
{
DAT,
DLE,
ETX
} rx_state_type;
/* Declare and initialize static variables */
static char
static int
static rx_state_type rx_state = DAT;
.
.
.
void add_to_que( char data )
{
#define DLE_BYTE 0x10
#define ETX_BYTE 0x03
if ( rx_state == DAT )
{
if ( data == DLE_BYTE )
{
rx_state = DLE;
}
else
{
in_que[ in_que_ptr++ ] = data;
}
}
else if ( rx_state == DLE )
{
if ( data == ETX_BYTE )
{
rx_state = ETX;
}
else
{
rx_state = DAT;
in_que[ in_que_ptr++ ] = data;
}
}
else if ( rx_state == ETX )
{
if ( data == DLE_BYTE )
{
rx_state = DLE;
}
}
if ( in_que_ptr > 255 )
{
in_que_ptr = 0;
}
}
190-00266-01
in_que[ 256 ];
in_que_ptr = 0;
GPS 15H & 15L Technical Specifications
Page 27
Rev. D