Package com.kauailabs.navx
Class AHRSProtocol
- java.lang.Object
-
- com.kauailabs.navx.IMUProtocol
-
- com.kauailabs.navx.AHRSProtocol
-
public class AHRSProtocol extends IMUProtocol
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
AHRSProtocol.AHRS_DATA_ACTION
class
AHRSProtocol.AHRS_DATA_TYPE
class
AHRSProtocol.AHRS_TUNING_VAR_ID
static class
AHRSProtocol.AHRSPosTSRawUpdate
static class
AHRSProtocol.AHRSPosTSUpdate
static class
AHRSProtocol.AHRSPosUpdate
static class
AHRSProtocol.AHRSUpdate
static class
AHRSProtocol.AHRSUpdateBase
static class
AHRSProtocol.BoardID
static class
AHRSProtocol.DataSetResponse
static class
AHRSProtocol.IntegrationControl
static class
AHRSProtocol.MagCalData
static class
AHRSProtocol.TuningVar
-
Nested classes/interfaces inherited from class com.kauailabs.navx.IMUProtocol
IMUProtocol.GyroUpdate, IMUProtocol.QuaternionUpdate, IMUProtocol.StreamCommand, IMUProtocol.StreamResponse, IMUProtocol.YPRUpdate
-
-
Field Summary
-
Fields 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 Constructor Description AHRSProtocol()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
decodeAHRSPosTSRawUpdate(byte[] buffer, int offset, int length, AHRSProtocol.AHRSPosTSRawUpdate u)
static int
decodeAHRSPosTSUpdate(byte[] buffer, int offset, int length, AHRSProtocol.AHRSPosTSUpdate u)
static int
decodeAHRSPosUpdate(byte[] buffer, int offset, int length, AHRSProtocol.AHRSPosUpdate u)
static int
decodeAHRSUpdate(byte[] buffer, int offset, int length, AHRSProtocol.AHRSUpdate u)
static short
decodeBinaryInt16(byte[] buffer, int offset)
static short
decodeBinaryUint16(byte[] buffer, int offset)
static int
decodeBinaryUint32(byte[] buffer, int offset)
static int
decodeBoardIDGetResponse(byte[] buffer, int offset, int length, AHRSProtocol.BoardID id)
static int
decodeDataSetResponse(byte[] buffer, int offset, int length, AHRSProtocol.DataSetResponse d)
static int
decodeIntegrationControlResponse(byte[] buffer, int offset, int length, AHRSProtocol.IntegrationControl u)
static int
decodeMagCalDataGetResponse(byte[] buffer, int offset, int length, AHRSProtocol.MagCalData d)
static float
decodeProtocol1616Float(byte[] buffer, int offset)
static float
decodeProtocolRatio(byte[] buffer, int offset)
static float
decodeProtocolSignedHundredthsFloat(byte[] buffer, int offset)
static float
decodeProtocolSignedThousandthsFloat(byte[] buffer, int offset)
static float
decodeProtocolUnsignedHundredthsFloat(byte[] buffer, int offset)
static int
decodeTuningVarGetResponse(byte[] buffer, int offset, int length, AHRSProtocol.TuningVar r)
static void
encodeBinaryInt16(short val, byte[] buffer, int offset)
static void
encodeBinaryUint16(short val, byte[] buffer, int offset)
static void
encodeBinaryUint32(int val, byte[] buffer, int offset)
static int
encodeDataGetRequest(byte[] buffer, byte type, byte var_id)
static int
encodeIntegrationControlCmd(byte[] buffer, AHRSProtocol.IntegrationControl u)
static int
encodeMagCalDataSetRequest(byte[] buffer, AHRSProtocol.MagCalData d)
static void
encodeProtocol1616Float(float val, byte[] buffer, int offset)
static void
encodeProtocolRatio(float ratio, byte[] buffer, int offset)
static void
encodeProtocolSignedHundredthsFloat(float input, byte[] buffer, int offset)
static void
encodeProtocolSignedThousandthsFloat(float input, byte[] buffer, int offset)
static void
encodeProtocolUnsignedHundredthsFloat(float input, byte[] buffer, int offset)
static float
encodeRatioFloat(float input_ratio)
static short
encodeSignedHundredthsFloat(float input)
static float
encodeSignedThousandthsFloat(float input)
static int
encodeTuningVarSetRequest(byte[] buffer, AHRSProtocol.TuningVar r)
static short
encodeUnsignedHundredthsFloat(float input)
static byte
getCRC(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 Detail
-
NAVX_CAL_STATUS_IMU_CAL_STATE_MASK
public static final byte NAVX_CAL_STATUS_IMU_CAL_STATE_MASK
- See Also:
- Constant Field Values
-
NAVX_CAL_STATUS_IMU_CAL_INPROGRESS
public static final byte NAVX_CAL_STATUS_IMU_CAL_INPROGRESS
- See Also:
- Constant Field Values
-
NAVX_CAL_STATUS_IMU_CAL_ACCUMULATE
public static final byte NAVX_CAL_STATUS_IMU_CAL_ACCUMULATE
- See Also:
- Constant Field Values
-
NAVX_CAL_STATUS_IMU_CAL_COMPLETE
public static final byte NAVX_CAL_STATUS_IMU_CAL_COMPLETE
- See Also:
- Constant Field Values
-
NAVX_CAL_STATUS_MAG_CAL_COMPLETE
public static final byte NAVX_CAL_STATUS_MAG_CAL_COMPLETE
- See Also:
- Constant Field Values
-
NAVX_CAL_STATUS_BARO_CAL_COMPLETE
public static final byte NAVX_CAL_STATUS_BARO_CAL_COMPLETE
- See Also:
- Constant Field Values
-
NAVX_SELFTEST_STATUS_COMPLETE
public static final byte NAVX_SELFTEST_STATUS_COMPLETE
- See Also:
- Constant Field Values
-
NAVX_SELFTEST_RESULT_GYRO_PASSED
public static final byte NAVX_SELFTEST_RESULT_GYRO_PASSED
- See Also:
- Constant Field Values
-
NAVX_SELFTEST_RESULT_ACCEL_PASSED
public static final byte NAVX_SELFTEST_RESULT_ACCEL_PASSED
- See Also:
- Constant Field Values
-
NAVX_SELFTEST_RESULT_MAG_PASSED
public static final byte NAVX_SELFTEST_RESULT_MAG_PASSED
- See Also:
- Constant Field Values
-
NAVX_SELFTEST_RESULT_BARO_PASSED
public static final byte NAVX_SELFTEST_RESULT_BARO_PASSED
- See Also:
- Constant Field Values
-
NAVX_OP_STATUS_INITIALIZING
public static final byte NAVX_OP_STATUS_INITIALIZING
- See Also:
- Constant Field Values
-
NAVX_OP_STATUS_SELFTEST_IN_PROGRESS
public static final byte NAVX_OP_STATUS_SELFTEST_IN_PROGRESS
- See Also:
- Constant Field Values
-
NAVX_OP_STATUS_ERROR
public static final byte NAVX_OP_STATUS_ERROR
- See Also:
- Constant Field Values
-
NAVX_OP_STATUS_IMU_AUTOCAL_IN_PROGRESS
public static final byte NAVX_OP_STATUS_IMU_AUTOCAL_IN_PROGRESS
- See Also:
- Constant Field Values
-
NAVX_OP_STATUS_NORMAL
public static final byte NAVX_OP_STATUS_NORMAL
- See Also:
- Constant Field Values
-
NAVX_SENSOR_STATUS_MOVING
public static final byte NAVX_SENSOR_STATUS_MOVING
- See Also:
- Constant Field Values
-
NAVX_SENSOR_STATUS_YAW_STABLE
public static final byte NAVX_SENSOR_STATUS_YAW_STABLE
- See Also:
- Constant Field Values
-
NAVX_SENSOR_STATUS_MAG_DISTURBANCE
public static final byte NAVX_SENSOR_STATUS_MAG_DISTURBANCE
- See Also:
- Constant Field Values
-
NAVX_SENSOR_STATUS_ALTITUDE_VALID
public static final byte NAVX_SENSOR_STATUS_ALTITUDE_VALID
- See Also:
- Constant Field Values
-
NAVX_SENSOR_STATUS_SEALEVEL_PRESS_SET
public static final byte NAVX_SENSOR_STATUS_SEALEVEL_PRESS_SET
- See Also:
- Constant Field Values
-
NAVX_SENSOR_STATUS_FUSED_HEADING_VALID
public static final byte NAVX_SENSOR_STATUS_FUSED_HEADING_VALID
- See Also:
- Constant Field Values
-
NAVX_CAPABILITY_FLAG_OMNIMOUNT
public static final short NAVX_CAPABILITY_FLAG_OMNIMOUNT
- See Also:
- Constant Field Values
-
NAVX_CAPABILITY_FLAG_OMNIMOUNT_CONFIG_MASK
public static final short NAVX_CAPABILITY_FLAG_OMNIMOUNT_CONFIG_MASK
- See Also:
- Constant Field Values
-
NAVX_CAPABILITY_FLAG_VEL_AND_DISP
public static final short NAVX_CAPABILITY_FLAG_VEL_AND_DISP
- See Also:
- Constant Field Values
-
NAVX_CAPABILITY_FLAG_YAW_RESET
public static final short NAVX_CAPABILITY_FLAG_YAW_RESET
- See Also:
- Constant Field Values
-
NAVX_CAPABILITY_FLAG_AHRSPOS_TS
public static final short NAVX_CAPABILITY_FLAG_AHRSPOS_TS
- See Also:
- Constant Field Values
-
NAVX_CAPABILITY_FLAG_AHRSPOS_TS_RAW
public static final short NAVX_CAPABILITY_FLAG_AHRSPOS_TS_RAW
- See Also:
- Constant Field Values
-
OMNIMOUNT_DEFAULT
public static final byte OMNIMOUNT_DEFAULT
- See Also:
- Constant Field Values
-
OMNIMOUNT_YAW_X_UP
public static final byte OMNIMOUNT_YAW_X_UP
- See Also:
- Constant Field Values
-
OMNIMOUNT_YAW_X_DOWN
public static final byte OMNIMOUNT_YAW_X_DOWN
- See Also:
- Constant Field Values
-
OMNIMOUNT_YAW_Y_UP
public static final byte OMNIMOUNT_YAW_Y_UP
- See Also:
- Constant Field Values
-
OMNIMOUNT_YAW_Y_DOWN
public static final byte OMNIMOUNT_YAW_Y_DOWN
- See Also:
- Constant Field Values
-
OMNIMOUNT_YAW_Z_UP
public static final byte OMNIMOUNT_YAW_Z_UP
- See Also:
- Constant Field Values
-
OMNIMOUNT_YAW_Z_DOWN
public static final byte OMNIMOUNT_YAW_Z_DOWN
- See Also:
- Constant Field Values
-
NAVX_INTEGRATION_CTL_RESET_VEL_X
public static final byte NAVX_INTEGRATION_CTL_RESET_VEL_X
- See Also:
- Constant Field Values
-
NAVX_INTEGRATION_CTL_RESET_VEL_Y
public static final byte NAVX_INTEGRATION_CTL_RESET_VEL_Y
- See Also:
- Constant Field Values
-
NAVX_INTEGRATION_CTL_RESET_VEL_Z
public static final byte NAVX_INTEGRATION_CTL_RESET_VEL_Z
- See Also:
- Constant Field Values
-
NAVX_INTEGRATION_CTL_RESET_DISP_X
public static final byte NAVX_INTEGRATION_CTL_RESET_DISP_X
- See Also:
- Constant Field Values
-
NAVX_INTEGRATION_CTL_RESET_DISP_Y
public static final byte NAVX_INTEGRATION_CTL_RESET_DISP_Y
- See Also:
- Constant Field Values
-
NAVX_INTEGRATION_CTL_RESET_DISP_Z
public static final byte NAVX_INTEGRATION_CTL_RESET_DISP_Z
- See Also:
- Constant Field Values
-
NAVX_INTEGRATION_CTL_RESET_YAW
public static final byte NAVX_INTEGRATION_CTL_RESET_YAW
- See Also:
- Constant Field Values
-
BINARY_PACKET_INDICATOR_CHAR
public static final char BINARY_PACKET_INDICATOR_CHAR
- See Also:
- Constant Field Values
-
MSGID_AHRS_UPDATE
public static final byte MSGID_AHRS_UPDATE
- See Also:
- Constant Field Values
-
MSGID_AHRSPOS_UPDATE
public static final byte MSGID_AHRSPOS_UPDATE
- See Also:
- Constant Field Values
-
MSGID_AHRSPOS_TS_UPDATE
public static final byte MSGID_AHRSPOS_TS_UPDATE
- See Also:
- Constant Field Values
-
MSGID_AHRSPOS_TS_RAW_UPDATE
public static final byte MSGID_AHRSPOS_TS_RAW_UPDATE
- See Also:
- Constant Field Values
-
MSGID_DATA_REQUEST
public static final byte MSGID_DATA_REQUEST
- See Also:
- Constant Field Values
-
MSGID_DATA_SET_RESPONSE
public static final byte MSGID_DATA_SET_RESPONSE
- See Also:
- Constant Field Values
-
MSGID_INTEGRATION_CONTROL_CMD
public static final byte MSGID_INTEGRATION_CONTROL_CMD
- See Also:
- Constant Field Values
-
MSGID_INTEGRATION_CONTROL_RESP
public static final byte MSGID_INTEGRATION_CONTROL_RESP
- See Also:
- Constant Field Values
-
MSGID_MAG_CAL_CMD
public static final byte MSGID_MAG_CAL_CMD
- See Also:
- Constant Field Values
-
MSGID_FUSION_TUNING_CMD
public static final byte MSGID_FUSION_TUNING_CMD
- See Also:
- Constant Field Values
-
MSGID_BOARD_IDENTITY_RESPONSE
public static final byte MSGID_BOARD_IDENTITY_RESPONSE
- See Also:
- Constant Field Values
-
MAX_BINARY_MESSAGE_LENGTH
public static final int MAX_BINARY_MESSAGE_LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
decodeAHRSUpdate
public static int decodeAHRSUpdate(byte[] buffer, int offset, int length, AHRSProtocol.AHRSUpdate u)
-
decodeAHRSPosUpdate
public static int decodeAHRSPosUpdate(byte[] buffer, int offset, int length, AHRSProtocol.AHRSPosUpdate u)
-
decodeAHRSPosTSUpdate
public static int decodeAHRSPosTSUpdate(byte[] buffer, int offset, int length, AHRSProtocol.AHRSPosTSUpdate u)
-
decodeAHRSPosTSRawUpdate
public static int decodeAHRSPosTSRawUpdate(byte[] buffer, int offset, int length, AHRSProtocol.AHRSPosTSRawUpdate u)
-
encodeDataGetRequest
public static int encodeDataGetRequest(byte[] buffer, byte type, byte var_id)
-
encodeMagCalDataSetRequest
public static int encodeMagCalDataSetRequest(byte[] buffer, AHRSProtocol.MagCalData d)
-
decodeMagCalDataGetResponse
public static int decodeMagCalDataGetResponse(byte[] buffer, int offset, int length, AHRSProtocol.MagCalData d)
-
encodeTuningVarSetRequest
public static int encodeTuningVarSetRequest(byte[] buffer, AHRSProtocol.TuningVar r)
-
decodeTuningVarGetResponse
public static int decodeTuningVarGetResponse(byte[] buffer, int offset, int length, AHRSProtocol.TuningVar r)
-
encodeIntegrationControlCmd
public static int encodeIntegrationControlCmd(byte[] buffer, AHRSProtocol.IntegrationControl u)
-
decodeIntegrationControlResponse
public static int decodeIntegrationControlResponse(byte[] buffer, int offset, int length, AHRSProtocol.IntegrationControl u)
-
decodeDataSetResponse
public static int decodeDataSetResponse(byte[] buffer, int offset, int length, AHRSProtocol.DataSetResponse d)
-
decodeBoardIDGetResponse
public static int decodeBoardIDGetResponse(byte[] buffer, int offset, int length, AHRSProtocol.BoardID 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)
-
-