THREESPACE_HEADER_STATUS_BIT_POS = 0
THREESPACE_HEADER_TIMESTAMP_BIT_POS = 1
THREESPACE_HEADER_ECHO_BIT_POS = 2
THREESPACE_HEADER_CHECKSUM_BIT_POS = 3
THREESPACE_HEADER_SERIAL_BIT_POS = 4
THREESPACE_HEADER_LENGTH_BIT_POS = 5
THREESPACE_HEADER_NUM_BITS = 6

THREESPACE_HEADER_STATUS_BIT = (1 << THREESPACE_HEADER_STATUS_BIT_POS)
THREESPACE_HEADER_TIMESTAMP_BIT = (1 << THREESPACE_HEADER_TIMESTAMP_BIT_POS)
THREESPACE_HEADER_ECHO_BIT = (1 << THREESPACE_HEADER_ECHO_BIT_POS)
THREESPACE_HEADER_CHECKSUM_BIT = (1 << THREESPACE_HEADER_CHECKSUM_BIT_POS)
THREESPACE_HEADER_SERIAL_BIT = (1 << THREESPACE_HEADER_SERIAL_BIT_POS)
THREESPACE_HEADER_LENGTH_BIT = (1 << THREESPACE_HEADER_LENGTH_BIT_POS)

FIRMWARE_VALID_BIT = 0x01

PASSIVE_CALIBRATE_GYRO = (1 << 0)
PASSIVE_CALIBRATE_MAG_REF = (1 << 1)

STREAMING_MAX_HZ = 2000

THREESPACE_OUTPUT_MODE_ASCII = 1
THREESPACE_OUTPUT_MODE_BINARY = 2