User Manual Part 1

IS-900 User Guide Page 77 of 159
8.5. Records Returned from the Tracker to the Host
8.5.1. Format Considerations
Record Headers
The first byte of each record is used to identify its type.
0 Data record.
2 Fastrak™ status record.
3 InterSense manufacturer-specific status record.
Floating Point Numbers
Floating point numbers can be returned as IEEE 32 bit floats or as ASCII numbers in X.xf
notation, where:
X is the total number of characters used to represent the float.
x is the number of digits after the floating point.
f is a symbol indicating that number is a float.
For example, number -42.6 in 10.4f format would look as follows: “-42.6000”
8.5.2. Status Record Hexadecimal Character Decoding
System Status, Manufacturer Status, and Manufacturer Station records use Hexadecimal
Characters to encode status data. Each character can be 0 to F and can encode 4 bits. Logical
AND operator can be used to test specific bits. Please see following code example:
unsigned short byte1, byte2, byte3;
char hexChar[2];
hexChar[1] = 0x00;
hexChar[0] = statusRecordBuffer[3];
sscanf(hexChar,"%x", &byte1);
hexChar[0] = statusRecordBuffer[4];
sscanf(hexChar,"%x", &byte2);
hexChar[0] = statusRecordBuffer[5];
sscanf(hexChar,"%x", &byte3);