User's Manual

Table Of Contents
InterSense Doc. No. 072-00105-0I07 Rev. 4.2
IS-900 User Guide Page 69 of 177
Data Items 18, 19, 20 16 bit binary format.
16 bit binary format can be used in applications requiring
fastest possible serial I/O. Each floating point number is
stored in 2 bytes with only 14 bits containing actual data.
This results in lower accuracy than the standard IEEE
floating point format.
Data is 2’s-complement. The first byte of the data set has
its high-order bit set to 1; all others have them set to zero.
This can be used for data synchronization. Data is
returned low-order byte, then high-order byte. Use
following code sample as an example on how to decode
this format:
To decode position:
lo = (dataRecord[3] & 0x007F);
hi = (dataRecord[4] & 0x007F);
int14bit = (lo « 2) | (hi « 9);
result = (float) int14bit * 3.0 / 32768.0;
Result is a number representing position (in meters) and has a
full range of ± 3.0 meters (300.0 to+299.963 centimeters or
118.110 to 118.096 inches).
To decode Euler angles:
lo = (dataRecord[3] & 0x007F);
hi = (dataRecord[4] & 0x007F);
int14bit = (lo « 2) | (hi « 9);
result = (float) int14bit * 180.0 / 32768.0;
Resulting number represents orientation and has a full range of
± 180.0 (180.0 to +179.978) degrees.
To decode Orientation Quaternion:
lo = (dataRecord[3] & 0x007F);
hi = (dataRecord[4] & 0x007F);
int14bit = (lo « 2) | (hi « 9);
result = (float) int14bit * 1.0 / 32768.0;
Resulting quaternion value has range of ± 1.0.