Scalar Definitions

The file ${IRIS_ROOT}/include/sigtypes.h defines some scalar data typedefs that can be used across platforms. The data types are used by the IRIS library routines for defining return values and routine arguments.

IRIS Data Types
Type Mapped-to Description
SINT1 int8_t Signed 8-bit integer
UINT1 uint8_t Unsigned 8-bit integer
SINT2 int16_t Signed 16-bit integer
UINT2 uint16_t Unsigned 16-bit integer
SINT4 int32_t Signed 32-bit integer
UINT4 uint32_t Unsigned 32-bit integer
FLT4 float Floating-point number
FLT8 double Double-precision floating-point number
BIN2 uint16_t 16-bit binary angle
BIN4 uint32_t 32-bit binary angle
MESSAGE uint32_t Encoded error value

A binary angle is an efficient way to store an angle into an integer. In this format the MSB has weight 180°, the next bit means 90°, the next 45°, and so on.

You can convert an N-bit binary angle to degrees with:

Degrees = 360 * (Binary Angle) / 2N

To see C language examples of how to do these conversions, see src/libs/user/angle.c.