beautypg.com

Binary output message organization, Table 5: data type abbreviations – NavCom Sapphire Rev.J User Manual

Page 39

background image

Sapphire Technical Reference Manual Rev. J

39

Sapphire output messages are ASCII or binary. Not all binary output messages have an ASCII
equivalent and vice versa.

Both ASCII and binary Sapphire output messages share these format elements in common:

Both begin with a unique, identifying ASCII mnemonic enclosed in square brackets.

The last letter of the mnemonic is the character ‘A’ for ASCII records or ‘B’ for binary
records.

Both are terminated with a CRC and a new line sequence ( = carriage return +
line feed). The CRC has a format identical to the optional CRC used for ASCII input
messages, i.e., four hex-ASCII characters preceded by an asterisk (*CRC).

Binary Output Message Organization

Sapphire binary output messages use C-language structure definitions to describe the details of
their formats. Table 5 lists the data type abbreviations used.

Table 5: Data Type Abbreviations

Data Type

# of bytes

C-Language Definition

U08

1

unsigned char

S08

1

signed char

Bool

1

unsigned char

U16

2

unsigned short

S16

2

signed short

U32

4

unsigned long

S32

4

signed long

R32

4

float

R64

8

double


Table 6 shows the general format of Sapphire binary output messages.

Table 6: General Format of Sapphire Binary Output Messages

[mnemonic]

…… binary header …… binary message body …… *CRC

Unique record identifier.
ASCII ending in ‘B’
enclosed in brackets

Standard binary header
described in Table 7, or
simplified binary header
described in Table 9.

Binary message body
unique for each record
identifier.

CRC followed by
carriage return + line
feed

The majority of the Sapphire binary messages use the standard binary message header. The
simplified binary header is used only in some special cases; e.g., bootloading. The Sapphire
binary messages described in this manual use the standard binary header unless otherwise
indicated.