Chapter 8. data packet structure, General settings, Number formats – Moog Crossbow GNAV540 User Manual

Page 61: Descriptor, Description, Size (bytes), Comment, Range, Apter 8, Data packet structure

Advertising
background image

 

 

 

 

GNAV540 User Manual 
7430‐0808‐01  Rev. B 

Page 61

 

Chapter 8.  Data Packet Structure  

NOTE: This section of the manual assumes the reader is familiar with ANSI C programming language and data type 

conventions.    

The unit supports a common packet structure that includes both command or input data packets, and measurement 

output or response packet formats.   This section of the manual explains these packet formats as well as the 

supported commands.  NAV‐VIEW 2.2 also features a number of tools that can help a user understand the packet 
types available and the information contained within the packets.   For an example of the code required to parse 

input data packets, please see refer to Appendix B. Sample Packet—Parser Code

General Settings   

The serial port settings are RS232 with 1 start bit, 8 data bits, no parity bit, 1 stop bit, and no flow control.  Standard 

0, 19200, 38400, and 57600.  

baud rates supported are: 960
Common definitions include: 

• A word is defined as 2 bytes, which are 16 bits.   
• All communications to and from the unit are packets that start with a single word alternating bit preamble 

0x5555.  This is the ASCII string “UU”.   

• All multiple byte values are transmitted Big Endian (Most Significant Byte First).  
• All communication packets end with a single word CRC (2 bytes).  CRC’s are calculated on all packet bytes 

excluding the preamble and CRC itself.  Input packets with incorrect CRC’s will be ignored.   

• Each complete communication packet must be transmitted to the GNAV540 inertial system within a four (4) 

second period.   

Number Formats 

Number Format Conventions include: 

• 0x as a prefix to hexadecimal values 
• Single quotes (‘’) to delimit ASCII characters 
• No prefix or delimiters to specify decimal values.   

 
The following table defines number formats: 

Table 12  Number Formats 

Descriptor 

Description 

Size (bytes) 

Comment 

Range 

U1 

Unsigned Char 

— 

0 to 255 

U2 

Unsigned Short 

— 

0 to 65535 

U4 

Unsigned Int 

— 

0 to 2^32‐1 

I2 

Signed Short 

2’s Complement 

‐2^15 to 2^15‐1 

I2* 

Signed Short 

Shifted 2’s Complement 

Shifted to specified range 

I4 

Signed Int 

2’s Complement 

‐2^31 to 2^31‐1 

Advertising