VN-200 User Manual
UM004
www.vectornav.com
19/47
4
Communication Protocol
The following Sections describe the serial and SPI data protocol used by the VN-200.
4.1
Numeric Formats
Floating-point numbers displayed as ASCII text are presented in two formats: single/double precision
floating-point and single/double precision fixed point. In order to conserve bandwidth each variable in
the register has associated with it either a floating or fixed point representation. Any time this variable
is accessed using a read/write register command or as Async output, the variable will always use its
associated data format.
4.2
Single Precision Floating Points
Single-precision floating-point numbers are represented with seven significant digits and a two digit
exponent. Both the sign of the number and exponent are provided. The decimal point will always
follow the first significant digit. An ‘E’ will separate the significant digits from the exponential digits.
Below are some samples of correct single-precision floating-point numbers:
Single Precision Floating Point Number Examples
+9.99
-7.344409E-05
-1.01
+4.00
4.3
Fixed-Point Numbers
The fixed-point representation consists of a specified number of digits to the left and right of a fixed
decimal point. The registers that use fixed point representation and their associated formatting are
listed below. It is important to note that all numeric calculations onboard the VN-200 are performed
with 32-bit or 64-bit IEEE floating-point numbers. For the sake of simplifying the output stream, some of
these numbers are displayed in ASCII as fixed point as described below.
Table 13 – Floating Point Representation
Variable Type
Fixed/Floating
Variable Size
Printf/Scanf
Example
Yaw, Pitch, Roll
Fixed
32-bit float
%+08.3f
+082.763
Quaternion
Fixed
32-bit float
%+09.6f
+0.053362
Magnetic
Fixed
32-bit float
%+07.4f
-0.3647
Acceleration
Fixed
32-bit float
%+07.3f
-09.091
Angular Rate
Fixed
32-bit float
%+09.6f
+00.001786
Latitude
Fixed
64-bit double
%+012.8f
+32.95614564