Package com.kauailabs.navx
Class AHRSProtocol
java.lang.Object
com.kauailabs.navx.IMUProtocol
com.kauailabs.navx.AHRSProtocol
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclassclassstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classNested classes/interfaces inherited from class com.kauailabs.navx.IMUProtocol
IMUProtocol.GyroUpdate, IMUProtocol.QuaternionUpdate, IMUProtocol.StreamCommand, IMUProtocol.StreamResponse, IMUProtocol.YPRUpdate -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final charstatic final intstatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final byteFields inherited from class com.kauailabs.navx.IMUProtocol
hexArray, IMU_PROTOCOL_MAX_MESSAGE_LENGTH, MSG_ID_STREAM_RESPONSE, MSGID_GYRO_UPDATE, MSGID_QUATERNION_UPDATE, MSGID_STREAM_CMD, MSGID_YPR_UPDATE, NAV6_CALIBRATION_STATE_ACCUMULATE, NAV6_CALIBRATION_STATE_COMPLETE, NAV6_CALIBRATION_STATE_WAIT, NAV6_FLAG_MASK_CALIBRATION_STATE, PACKET_START_CHAR, STREAM_CMD_STREAM_TYPE_GYRO, STREAM_CMD_STREAM_TYPE_QUATERNION, STREAM_CMD_STREAM_TYPE_YPR, STREAM_MSG_TERMINATION_CHAR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intdecodeAHRSPosTSRawUpdate(byte[] buffer, int offset, int length, AHRSProtocol.AHRSPosTSRawUpdate u) static intdecodeAHRSPosTSUpdate(byte[] buffer, int offset, int length, AHRSProtocol.AHRSPosTSUpdate u) static intdecodeAHRSPosUpdate(byte[] buffer, int offset, int length, AHRSProtocol.AHRSPosUpdate u) static intdecodeAHRSUpdate(byte[] buffer, int offset, int length, AHRSProtocol.AHRSUpdate u) static shortdecodeBinaryInt16(byte[] buffer, int offset) static shortdecodeBinaryUint16(byte[] buffer, int offset) static intdecodeBinaryUint32(byte[] buffer, int offset) static intdecodeBoardIDGetResponse(byte[] buffer, int offset, int length, AHRSProtocol.BoardID id) static intdecodeDataSetResponse(byte[] buffer, int offset, int length, AHRSProtocol.DataSetResponse d) static intdecodeIntegrationControlResponse(byte[] buffer, int offset, int length, AHRSProtocol.IntegrationControl u) static intdecodeMagCalDataGetResponse(byte[] buffer, int offset, int length, AHRSProtocol.MagCalData d) static floatdecodeProtocol1616Float(byte[] buffer, int offset) static floatdecodeProtocolRatio(byte[] buffer, int offset) static floatdecodeProtocolSignedHundredthsFloat(byte[] buffer, int offset) static floatdecodeProtocolSignedThousandthsFloat(byte[] buffer, int offset) static floatdecodeProtocolUnsignedHundredthsFloat(byte[] buffer, int offset) static intdecodeTuningVarGetResponse(byte[] buffer, int offset, int length, AHRSProtocol.TuningVar r) static voidencodeBinaryInt16(short val, byte[] buffer, int offset) static voidencodeBinaryUint16(short val, byte[] buffer, int offset) static voidencodeBinaryUint32(int val, byte[] buffer, int offset) static intencodeDataGetRequest(byte[] buffer, byte type, byte var_id) static intencodeIntegrationControlCmd(byte[] buffer, AHRSProtocol.IntegrationControl u) static intencodeMagCalDataSetRequest(byte[] buffer, AHRSProtocol.MagCalData d) static voidencodeProtocol1616Float(float val, byte[] buffer, int offset) static voidencodeProtocolRatio(float ratio, byte[] buffer, int offset) static voidencodeProtocolSignedHundredthsFloat(float input, byte[] buffer, int offset) static voidencodeProtocolSignedThousandthsFloat(float input, byte[] buffer, int offset) static voidencodeProtocolUnsignedHundredthsFloat(float input, byte[] buffer, int offset) static floatencodeRatioFloat(float input_ratio) static shortencodeSignedHundredthsFloat(float input) static floatencodeSignedThousandthsFloat(float input) static intencodeTuningVarSetRequest(byte[] buffer, AHRSProtocol.TuningVar r) static shortencodeUnsignedHundredthsFloat(float input) static bytegetCRC(byte[] buffer, int length) Methods inherited from class com.kauailabs.navx.IMUProtocol
byteToHex, decodeGyroUpdate, decodeProtocolFloat, decodeProtocolUint16, decodeQuaternionUpdate, decodeStreamCommand, decodeStreamResponse, decodeUint8, decodeYPRUpdate, encodeStreamCommand, encodeTermination, verifyChecksum
-
Field Details
-
NAVX_CAL_STATUS_IMU_CAL_STATE_MASK
public static final byte NAVX_CAL_STATUS_IMU_CAL_STATE_MASK- See Also:
-
NAVX_CAL_STATUS_IMU_CAL_INPROGRESS
public static final byte NAVX_CAL_STATUS_IMU_CAL_INPROGRESS- See Also:
-
NAVX_CAL_STATUS_IMU_CAL_ACCUMULATE
public static final byte NAVX_CAL_STATUS_IMU_CAL_ACCUMULATE- See Also:
-
NAVX_CAL_STATUS_IMU_CAL_COMPLETE
public static final byte NAVX_CAL_STATUS_IMU_CAL_COMPLETE- See Also:
-
NAVX_CAL_STATUS_MAG_CAL_COMPLETE
public static final byte NAVX_CAL_STATUS_MAG_CAL_COMPLETE- See Also:
-
NAVX_CAL_STATUS_BARO_CAL_COMPLETE
public static final byte NAVX_CAL_STATUS_BARO_CAL_COMPLETE- See Also:
-
NAVX_SELFTEST_STATUS_COMPLETE
public static final byte NAVX_SELFTEST_STATUS_COMPLETE- See Also:
-
NAVX_SELFTEST_RESULT_GYRO_PASSED
public static final byte NAVX_SELFTEST_RESULT_GYRO_PASSED- See Also:
-
NAVX_SELFTEST_RESULT_ACCEL_PASSED
public static final byte NAVX_SELFTEST_RESULT_ACCEL_PASSED- See Also:
-
NAVX_SELFTEST_RESULT_MAG_PASSED
public static final byte NAVX_SELFTEST_RESULT_MAG_PASSED- See Also:
-
NAVX_SELFTEST_RESULT_BARO_PASSED
public static final byte NAVX_SELFTEST_RESULT_BARO_PASSED- See Also:
-
NAVX_OP_STATUS_INITIALIZING
public static final byte NAVX_OP_STATUS_INITIALIZING- See Also:
-
NAVX_OP_STATUS_SELFTEST_IN_PROGRESS
public static final byte NAVX_OP_STATUS_SELFTEST_IN_PROGRESS- See Also:
-
NAVX_OP_STATUS_ERROR
public static final byte NAVX_OP_STATUS_ERROR- See Also:
-
NAVX_OP_STATUS_IMU_AUTOCAL_IN_PROGRESS
public static final byte NAVX_OP_STATUS_IMU_AUTOCAL_IN_PROGRESS- See Also:
-
NAVX_OP_STATUS_NORMAL
public static final byte NAVX_OP_STATUS_NORMAL- See Also:
-
NAVX_SENSOR_STATUS_MOVING
public static final byte NAVX_SENSOR_STATUS_MOVING- See Also:
-
NAVX_SENSOR_STATUS_YAW_STABLE
public static final byte NAVX_SENSOR_STATUS_YAW_STABLE- See Also:
-
NAVX_SENSOR_STATUS_MAG_DISTURBANCE
public static final byte NAVX_SENSOR_STATUS_MAG_DISTURBANCE- See Also:
-
NAVX_SENSOR_STATUS_ALTITUDE_VALID
public static final byte NAVX_SENSOR_STATUS_ALTITUDE_VALID- See Also:
-
NAVX_SENSOR_STATUS_SEALEVEL_PRESS_SET
public static final byte NAVX_SENSOR_STATUS_SEALEVEL_PRESS_SET- See Also:
-
NAVX_SENSOR_STATUS_FUSED_HEADING_VALID
public static final byte NAVX_SENSOR_STATUS_FUSED_HEADING_VALID- See Also:
-
NAVX_CAPABILITY_FLAG_OMNIMOUNT
public static final short NAVX_CAPABILITY_FLAG_OMNIMOUNT- See Also:
-
NAVX_CAPABILITY_FLAG_OMNIMOUNT_CONFIG_MASK
public static final short NAVX_CAPABILITY_FLAG_OMNIMOUNT_CONFIG_MASK- See Also:
-
NAVX_CAPABILITY_FLAG_VEL_AND_DISP
public static final short NAVX_CAPABILITY_FLAG_VEL_AND_DISP- See Also:
-
NAVX_CAPABILITY_FLAG_YAW_RESET
public static final short NAVX_CAPABILITY_FLAG_YAW_RESET- See Also:
-
NAVX_CAPABILITY_FLAG_AHRSPOS_TS
public static final short NAVX_CAPABILITY_FLAG_AHRSPOS_TS- See Also:
-
NAVX_CAPABILITY_FLAG_AHRSPOS_TS_RAW
public static final short NAVX_CAPABILITY_FLAG_AHRSPOS_TS_RAW- See Also:
-
OMNIMOUNT_DEFAULT
public static final byte OMNIMOUNT_DEFAULT- See Also:
-
OMNIMOUNT_YAW_X_UP
public static final byte OMNIMOUNT_YAW_X_UP- See Also:
-
OMNIMOUNT_YAW_X_DOWN
public static final byte OMNIMOUNT_YAW_X_DOWN- See Also:
-
OMNIMOUNT_YAW_Y_UP
public static final byte OMNIMOUNT_YAW_Y_UP- See Also:
-
OMNIMOUNT_YAW_Y_DOWN
public static final byte OMNIMOUNT_YAW_Y_DOWN- See Also:
-
OMNIMOUNT_YAW_Z_UP
public static final byte OMNIMOUNT_YAW_Z_UP- See Also:
-
OMNIMOUNT_YAW_Z_DOWN
public static final byte OMNIMOUNT_YAW_Z_DOWN- See Also:
-
NAVX_INTEGRATION_CTL_RESET_VEL_X
public static final byte NAVX_INTEGRATION_CTL_RESET_VEL_X- See Also:
-
NAVX_INTEGRATION_CTL_RESET_VEL_Y
public static final byte NAVX_INTEGRATION_CTL_RESET_VEL_Y- See Also:
-
NAVX_INTEGRATION_CTL_RESET_VEL_Z
public static final byte NAVX_INTEGRATION_CTL_RESET_VEL_Z- See Also:
-
NAVX_INTEGRATION_CTL_RESET_DISP_X
public static final byte NAVX_INTEGRATION_CTL_RESET_DISP_X- See Also:
-
NAVX_INTEGRATION_CTL_RESET_DISP_Y
public static final byte NAVX_INTEGRATION_CTL_RESET_DISP_Y- See Also:
-
NAVX_INTEGRATION_CTL_RESET_DISP_Z
public static final byte NAVX_INTEGRATION_CTL_RESET_DISP_Z- See Also:
-
NAVX_INTEGRATION_CTL_RESET_YAW
public static final byte NAVX_INTEGRATION_CTL_RESET_YAW- See Also:
-
BINARY_PACKET_INDICATOR_CHAR
public static final char BINARY_PACKET_INDICATOR_CHAR- See Also:
-
MSGID_AHRS_UPDATE
public static final byte MSGID_AHRS_UPDATE- See Also:
-
MSGID_AHRSPOS_UPDATE
public static final byte MSGID_AHRSPOS_UPDATE- See Also:
-
MSGID_AHRSPOS_TS_UPDATE
public static final byte MSGID_AHRSPOS_TS_UPDATE- See Also:
-
MSGID_AHRSPOS_TS_RAW_UPDATE
public static final byte MSGID_AHRSPOS_TS_RAW_UPDATE- See Also:
-
MSGID_DATA_REQUEST
public static final byte MSGID_DATA_REQUEST- See Also:
-
MSGID_DATA_SET_RESPONSE
public static final byte MSGID_DATA_SET_RESPONSE- See Also:
-
MSGID_INTEGRATION_CONTROL_CMD
public static final byte MSGID_INTEGRATION_CONTROL_CMD- See Also:
-
MSGID_INTEGRATION_CONTROL_RESP
public static final byte MSGID_INTEGRATION_CONTROL_RESP- See Also:
-
MSGID_MAG_CAL_CMD
public static final byte MSGID_MAG_CAL_CMD- See Also:
-
MSGID_FUSION_TUNING_CMD
public static final byte MSGID_FUSION_TUNING_CMD- See Also:
-
MSGID_BOARD_IDENTITY_RESPONSE
public static final byte MSGID_BOARD_IDENTITY_RESPONSE- See Also:
-
MAX_BINARY_MESSAGE_LENGTH
public static final int MAX_BINARY_MESSAGE_LENGTH- See Also:
-
-
Constructor Details
-
AHRSProtocol
public AHRSProtocol()
-
-
Method Details
-
encodeDataGetRequest
public static int encodeDataGetRequest(byte[] buffer, byte type, byte var_id) -
decodeBinaryUint16
public static short decodeBinaryUint16(byte[] buffer, int offset) -
encodeBinaryUint16
public static void encodeBinaryUint16(short val, byte[] buffer, int offset) -
decodeBinaryUint32
public static int decodeBinaryUint32(byte[] buffer, int offset) -
encodeBinaryUint32
public static void encodeBinaryUint32(int val, byte[] buffer, int offset) -
decodeBinaryInt16
public static short decodeBinaryInt16(byte[] buffer, int offset) -
encodeBinaryInt16
public static void encodeBinaryInt16(short val, byte[] buffer, int offset) -
decodeProtocolSignedHundredthsFloat
public static float decodeProtocolSignedHundredthsFloat(byte[] buffer, int offset) -
encodeProtocolSignedHundredthsFloat
public static void encodeProtocolSignedHundredthsFloat(float input, byte[] buffer, int offset) -
encodeSignedHundredthsFloat
public static short encodeSignedHundredthsFloat(float input) -
encodeUnsignedHundredthsFloat
public static short encodeUnsignedHundredthsFloat(float input) -
encodeRatioFloat
public static float encodeRatioFloat(float input_ratio) -
encodeSignedThousandthsFloat
public static float encodeSignedThousandthsFloat(float input) -
decodeProtocolUnsignedHundredthsFloat
public static float decodeProtocolUnsignedHundredthsFloat(byte[] buffer, int offset) -
encodeProtocolUnsignedHundredthsFloat
public static void encodeProtocolUnsignedHundredthsFloat(float input, byte[] buffer, int offset) -
decodeProtocolSignedThousandthsFloat
public static float decodeProtocolSignedThousandthsFloat(byte[] buffer, int offset) -
encodeProtocolSignedThousandthsFloat
public static void encodeProtocolSignedThousandthsFloat(float input, byte[] buffer, int offset) -
decodeProtocolRatio
public static float decodeProtocolRatio(byte[] buffer, int offset) -
encodeProtocolRatio
public static void encodeProtocolRatio(float ratio, byte[] buffer, int offset) -
decodeProtocol1616Float
public static float decodeProtocol1616Float(byte[] buffer, int offset) -
encodeProtocol1616Float
public static void encodeProtocol1616Float(float val, byte[] buffer, int offset) -
getCRC
public static byte getCRC(byte[] buffer, int length)