Go to the documentation of this file. 11 #define UM6_FIRMWARE_REVISION (('U' << 24) | ('M' << 16) | ('2' << 8) | 'B') 22 #define CONFIG_ARRAY_SIZE 59 23 #define DATA_ARRAY_SIZE 48 24 #define COMMAND_COUNT 10 27 #define CONFIG_REG_START_ADDRESS 0 28 #define DATA_REG_START_ADDRESS 85 29 #define COMMAND_START_ADDRESS 170 37 #define UM6_COMMUNICATION CONFIG_REG_START_ADDRESS // Stores settings in individual bits 38 #define UM6_MISC_CONFIG (CONFIG_REG_START_ADDRESS + 1) // Stores settings in individual bits 39 #define UM6_MAG_REF_X (CONFIG_REG_START_ADDRESS + 2) // Mag reference values are stored as 32-bit IEEE floating point values (these reflect data AFTER scale factors and compensation are applied) 40 #define UM6_MAG_REF_Y (CONFIG_REG_START_ADDRESS + 3) 41 #define UM6_MAG_REF_Z (CONFIG_REG_START_ADDRESS + 4) 42 #define UM6_ACCEL_REF_X (CONFIG_REG_START_ADDRESS + 5) // Accel reference values are stored as 32-bit IEEE floating point values (these reflect data AFTER scale factors and compensation are applied) 43 #define UM6_ACCEL_REF_Y (CONFIG_REG_START_ADDRESS + 6) 44 #define UM6_ACCEL_REF_Z (CONFIG_REG_START_ADDRESS + 7) 45 #define UM6_EKF_MAG_VARIANCE (CONFIG_REG_START_ADDRESS + 8) // Variances are stored as 32-bit IEEE floating point values. 46 #define UM6_EKF_ACCEL_VARIANCE (CONFIG_REG_START_ADDRESS + 9) 47 #define UM6_EKF_PROCESS_VARIANCE (CONFIG_REG_START_ADDRESS + 10) 48 #define UM6_GYRO_BIAS_XY (CONFIG_REG_START_ADDRESS + 11) // Gyro biases are stored as 16-bit signed integers. Bias correction is applied BEFORE scale factors are applied 49 #define UM6_GYRO_BIAS_Z (CONFIG_REG_START_ADDRESS + 12) 50 #define UM6_ACCEL_BIAS_XY (CONFIG_REG_START_ADDRESS + 13) // Accel biases are stored as 16-bit signed integers. Bias correction is applied BEFORE scale factors are applied 51 #define UM6_ACCEL_BIAS_Z (CONFIG_REG_START_ADDRESS + 14) 52 #define UM6_MAG_BIAS_XY (CONFIG_REG_START_ADDRESS + 15) // Mag biases are stored as 16-bit signed integers. Bias correction is applied BEFORE magnetometer adjustment 53 #define UM6_MAG_BIAS_Z (CONFIG_REG_START_ADDRESS + 16) 54 #define UM6_ACCEL_CAL_00 (CONFIG_REG_START_ADDRESS + 17) // The accelerometer alignment matrix is a 3x3 matrix with 32-bit IEEE floating point entries 55 #define UM6_ACCEL_CAL_01 (CONFIG_REG_START_ADDRESS + 18) 56 #define UM6_ACCEL_CAL_02 (CONFIG_REG_START_ADDRESS + 19) 57 #define UM6_ACCEL_CAL_10 (CONFIG_REG_START_ADDRESS + 20) 58 #define UM6_ACCEL_CAL_11 (CONFIG_REG_START_ADDRESS + 21) 59 #define UM6_ACCEL_CAL_12 (CONFIG_REG_START_ADDRESS + 22) 60 #define UM6_ACCEL_CAL_20 (CONFIG_REG_START_ADDRESS + 23) 61 #define UM6_ACCEL_CAL_21 (CONFIG_REG_START_ADDRESS + 24) 62 #define UM6_ACCEL_CAL_22 (CONFIG_REG_START_ADDRESS + 25) 63 #define UM6_GYRO_CAL_00 (CONFIG_REG_START_ADDRESS + 26) // The gyro alignment matrix is a 3x3 matrix with 32-bit IEEE floating point entries 64 #define UM6_GYRO_CAL_01 (CONFIG_REG_START_ADDRESS + 27) 65 #define UM6_GYRO_CAL_02 (CONFIG_REG_START_ADDRESS + 28) 66 #define UM6_GYRO_CAL_10 (CONFIG_REG_START_ADDRESS + 29) 67 #define UM6_GYRO_CAL_11 (CONFIG_REG_START_ADDRESS + 30) 68 #define UM6_GYRO_CAL_12 (CONFIG_REG_START_ADDRESS + 31) 69 #define UM6_GYRO_CAL_20 (CONFIG_REG_START_ADDRESS + 32) 70 #define UM6_GYRO_CAL_21 (CONFIG_REG_START_ADDRESS + 33) 71 #define UM6_GYRO_CAL_22 (CONFIG_REG_START_ADDRESS + 34) 72 #define UM6_MAG_CAL_00 (CONFIG_REG_START_ADDRESS + 35) // The magnetometer calibration matrix is a 3x3 matrix with 32-bit IEEE floating point entries 73 #define UM6_MAG_CAL_01 (CONFIG_REG_START_ADDRESS + 36) 74 #define UM6_MAG_CAL_02 (CONFIG_REG_START_ADDRESS + 37) 75 #define UM6_MAG_CAL_10 (CONFIG_REG_START_ADDRESS + 38) 76 #define UM6_MAG_CAL_11 (CONFIG_REG_START_ADDRESS + 39) 77 #define UM6_MAG_CAL_12 (CONFIG_REG_START_ADDRESS + 40) 78 #define UM6_MAG_CAL_20 (CONFIG_REG_START_ADDRESS + 41) 79 #define UM6_MAG_CAL_21 (CONFIG_REG_START_ADDRESS + 42) 80 #define UM6_MAG_CAL_22 (CONFIG_REG_START_ADDRESS + 43) 82 #define UM6_GYROX_BIAS_0 (CONFIG_REG_START_ADDRESS + 44) // Terms used for gyro temperature compensation. Each item is a floating point number, to be 83 #define UM6_GYROX_BIAS_1 (CONFIG_REG_START_ADDRESS + 45) // applied to the raw data directly. 84 #define UM6_GYROX_BIAS_2 (CONFIG_REG_START_ADDRESS + 46) 85 #define UM6_GYROX_BIAS_3 (CONFIG_REG_START_ADDRESS + 47) 86 #define UM6_GYROY_BIAS_0 (CONFIG_REG_START_ADDRESS + 48) 87 #define UM6_GYROY_BIAS_1 (CONFIG_REG_START_ADDRESS + 49) 88 #define UM6_GYROY_BIAS_2 (CONFIG_REG_START_ADDRESS + 50) 89 #define UM6_GYROY_BIAS_3 (CONFIG_REG_START_ADDRESS + 51) 90 #define UM6_GYROZ_BIAS_0 (CONFIG_REG_START_ADDRESS + 52) 91 #define UM6_GYROZ_BIAS_1 (CONFIG_REG_START_ADDRESS + 53) 92 #define UM6_GYROZ_BIAS_2 (CONFIG_REG_START_ADDRESS + 54) 93 #define UM6_GYROZ_BIAS_3 (CONFIG_REG_START_ADDRESS + 55) 94 #define UM6_GPS_HOME_LAT (CONFIG_REG_START_ADDRESS + 56) 95 #define UM6_GPS_HOME_LONG (CONFIG_REG_START_ADDRESS + 57) 96 #define UM6_GPS_HOME_ALTITUDE (CONFIG_REG_START_ADDRESS + 58) 101 #define UM6_STATUS DATA_REG_START_ADDRESS // Status register defines error codes with individual bits 102 #define UM6_GYRO_RAW_XY (DATA_REG_START_ADDRESS + 1) // Raw gyro data is stored in 16-bit signed integers 103 #define UM6_GYRO_RAW_Z (DATA_REG_START_ADDRESS + 2) 104 #define UM6_ACCEL_RAW_XY (DATA_REG_START_ADDRESS + 3) // Raw accel data is stored in 16-bit signed integers 105 #define UM6_ACCEL_RAW_Z (DATA_REG_START_ADDRESS + 4) 106 #define UM6_MAG_RAW_XY (DATA_REG_START_ADDRESS + 5) // Raw mag data is stored in 16-bit signed integers 107 #define UM6_MAG_RAW_Z (DATA_REG_START_ADDRESS + 6) 108 #define UM6_GYRO_PROC_XY (DATA_REG_START_ADDRESS + 7) // Processed gyro data has scale factors applied and alignment correction performed. Data is 16-bit signed integer. 109 #define UM6_GYRO_PROC_Z (DATA_REG_START_ADDRESS + 8) 110 #define UM6_ACCEL_PROC_XY (DATA_REG_START_ADDRESS + 9) // Processed accel data has scale factors applied and alignment correction performed. Data is 16-bit signed integer. 111 #define UM6_ACCEL_PROC_Z (DATA_REG_START_ADDRESS + 10) 112 #define UM6_MAG_PROC_XY (DATA_REG_START_ADDRESS + 11) // Processed mag data has scale factors applied and alignment correction performed. Data is 16-bit signed integer. 113 #define UM6_MAG_PROC_Z (DATA_REG_START_ADDRESS + 12) 114 #define UM6_EULER_PHI_THETA (DATA_REG_START_ADDRESS + 13) // Euler angles are 32-bit IEEE floating point 115 #define UM6_EULER_PSI (DATA_REG_START_ADDRESS + 14) 116 #define UM6_QUAT_AB (DATA_REG_START_ADDRESS + 15) // Quaternions are 16-bit signed integers. 117 #define UM6_QUAT_CD (DATA_REG_START_ADDRESS + 16) 118 #define UM6_ERROR_COV_00 (DATA_REG_START_ADDRESS + 17) // Error covariance is a 4x4 matrix of 32-bit IEEE floating point values 119 #define UM6_ERROR_COV_01 (DATA_REG_START_ADDRESS + 18) 120 #define UM6_ERROR_COV_02 (DATA_REG_START_ADDRESS + 19) 121 #define UM6_ERROR_COV_03 (DATA_REG_START_ADDRESS + 20) 122 #define UM6_ERROR_COV_10 (DATA_REG_START_ADDRESS + 21) 123 #define UM6_ERROR_COV_11 (DATA_REG_START_ADDRESS + 22) 124 #define UM6_ERROR_COV_12 (DATA_REG_START_ADDRESS + 23) 125 #define UM6_ERROR_COV_13 (DATA_REG_START_ADDRESS + 24) 126 #define UM6_ERROR_COV_20 (DATA_REG_START_ADDRESS + 25) 127 #define UM6_ERROR_COV_21 (DATA_REG_START_ADDRESS + 26) 128 #define UM6_ERROR_COV_22 (DATA_REG_START_ADDRESS + 27) 129 #define UM6_ERROR_COV_23 (DATA_REG_START_ADDRESS + 28) 130 #define UM6_ERROR_COV_30 (DATA_REG_START_ADDRESS + 29) 131 #define UM6_ERROR_COV_31 (DATA_REG_START_ADDRESS + 30) 132 #define UM6_ERROR_COV_32 (DATA_REG_START_ADDRESS + 31) 133 #define UM6_ERROR_COV_33 (DATA_REG_START_ADDRESS + 32) 134 #define UM6_TEMPERATURE (DATA_REG_START_ADDRESS + 33) // Temperature measured by onboard temperature sensors 135 #define UM6_GPS_LONGITUDE (DATA_REG_START_ADDRESS + 34) // GPS longitude 136 #define UM6_GPS_LATITUDE (DATA_REG_START_ADDRESS + 35) // GPS latitude 137 #define UM6_GPS_ALTITUDE (DATA_REG_START_ADDRESS + 36) // GPS altitude 138 #define UM6_GPS_POSITION_N (DATA_REG_START_ADDRESS + 37) // GPS position (meters north of home position) 139 #define UM6_GPS_POSITION_E (DATA_REG_START_ADDRESS + 38) // GPS position (meters east of home position) 140 #define UM6_GPS_POSITION_H (DATA_REG_START_ADDRESS + 39) // GPS position (meters east of home position) 141 #define UM6_GPS_COURSE_SPEED (DATA_REG_START_ADDRESS + 40) // GPS course over ground in degrees and speed in m/s 142 #define UM6_GPS_SAT_SUMMARY (DATA_REG_START_ADDRESS + 41) // Summarizes GPS satellite data (mode, satellite count, HDOP, and VDOP) 143 #define UM6_GPS_SAT_1_2 (DATA_REG_START_ADDRESS + 42) // ID and SNR for satellites being tracked 144 #define UM6_GPS_SAT_3_4 (DATA_REG_START_ADDRESS + 43) // ID and SNR for satellites being tracked 145 #define UM6_GPS_SAT_5_6 (DATA_REG_START_ADDRESS + 44) // ID and SNR for satellites being tracked 146 #define UM6_GPS_SAT_7_8 (DATA_REG_START_ADDRESS + 45) // ID and SNR for satellites being tracked 147 #define UM6_GPS_SAT_9_10 (DATA_REG_START_ADDRESS + 46) // ID and SNR for satellites being tracked 148 #define UM6_GPS_SAT_11_12 (DATA_REG_START_ADDRESS + 47) // ID and SNR for satellites being tracked 151 #define UM6_GPS_MODE_START_BIT 30 152 #define UM6_GPS_MODE_MASK 0x03 // 2 bits 154 #define UM6_GPS_SAT_COUNT_START_BIT 26 155 #define UM6_GPS_SAT_COUNT_MASK 0x0F // 4 bits 157 #define UM6_GPS_HDOP_START_BIT 16 158 #define UM6_GPS_HDOP_MASK 0x03FF // 10 bits 160 #define UM6_GPS_VDOP_START_BIT 6 161 #define UM6_GPS_VDOP_MASK 0x03FF // 10 bits 172 #define UM6_GET_FW_VERSION COMMAND_START_ADDRESS // Causes the UM6 to report the firmware revision 173 #define UM6_FLASH_COMMIT (COMMAND_START_ADDRESS + 1) // Causes the UM6 to write all configuration values to FLASH 174 #define UM6_ZERO_GYROS (COMMAND_START_ADDRESS + 2) // Causes the UM6 to start a zero gyros command 175 #define UM6_RESET_EKF (COMMAND_START_ADDRESS + 3) // Causes the UM6 to reset the EKF 176 #define UM6_GET_DATA (COMMAND_START_ADDRESS + 4) // Causes the UM6 to transmit a data packet containing data from all enabled channels 177 #define UM6_SET_ACCEL_REF (COMMAND_START_ADDRESS + 5) // Causes the UM6 to set the current measured accel data to the reference vector 178 #define UM6_SET_MAG_REF (COMMAND_START_ADDRESS + 6) // Causes the UM6 to set the current measured magnetometer data to the reference vector 179 #define UM6_RESET_TO_FACTORY (COMMAND_START_ADDRESS + 7) // Causes the UM6 to load default factory settings 181 #define UM6_SAVE_FACTORY (COMMAND_START_ADDRESS + 8) // Causes the UM6 to save the current settings to the factory flash location 183 #define UM6_SET_HOME_POSITION (COMMAND_START_ADDRESS + 9) // Causes the UM6 to save the current GPS position as the "home" position (used to compute relative position) 185 #define UM6_USE_CONFIG_ADDRESS 0 186 #define UM6_USE_FACTORY_ADDRESS 1 188 #define UM6_BAD_CHECKSUM 253 // Sent if the UM6 receives a packet with a bad checksum 189 #define UM6_UNKNOWN_ADDRESS 254 // Sent if the UM6 receives a packet with an unknown address 190 #define UM6_INVALID_BATCH_SIZE 255 // Sent if a requested batch read or write operation would go beyond the bounds of the config or data array 194 #define UM6_BROADCAST_ENABLED (1 << 30) // Enable serial data transmission 195 #define UM6_GYROS_RAW_ENABLED (1 << 29) // Enable transmission of raw gyro data 196 #define UM6_ACCELS_RAW_ENABLED (1 << 28) // Enable transmission of raw accelerometer data 197 #define UM6_MAG_RAW_ENABLED (1 << 27) // Enable transmission of raw magnetometer data 198 #define UM6_GYROS_PROC_ENABLED (1 << 26) // Enable transmission of processed gyro data (biases removed, scale factor applied, rotation correction applied) 199 #define UM6_ACCELS_PROC_ENABLED (1 << 25) // Enable transmission of processed accel data (biases removed, scale factor applied, rotation correction applied) 200 #define UM6_MAG_PROC_ENABLED (1 << 24) // Enable transmission of processed mag data (biases removed, scale factor applied, rotation correction applied) 201 #define UM6_QUAT_ENABLED (1 << 23) // Enable transmission of quaternion data 202 #define UM6_EULER_ENABLED (1 << 22) // Enable transmission of euler angle data 203 #define UM6_COV_ENABLED (1 << 21) // Enable transmission of state covariance data 204 #define UM6_TEMPERATURE_ENABLED (1 << 20) // Enable transmission of gyro temperature readings 205 #define UM6_GPS_POSITION_ENABLED (1 << 19) // Enable transmission of latitude and longitude data 206 #define UM6_GPS_REL_POSITION_ENABLED (1 << 18) // Enable transmission of computed North and East position (with respect to home position) 207 #define UM6_GPS_COURSE_SPEED_ENABLED (1 << 17) // Enable transmission of computed GPS course and speed 208 #define UM6_GPS_SAT_SUMMARY_ENABLED (1 << 16) // Enable transmission of satellite summary data (count, HDOP, VDP, mode) 209 #define UM6_GPS_SAT_DATA_ENABLED (1 << 15) // Enable transmission of satellite data (ID and SNR of each satellite) 211 #define UM6_GPS_BAUD_RATE_MASK (0x07) 212 #define UM6_GPS_BAUD_START_BIT 11 214 #define UM6_BAUD_RATE_MASK (0x07) // Mask specifying the number of bits used to set the serial baud rate 215 #define UM6_BAUD_START_BIT 8 // Specifies the start location of the baud rate bits 217 #define UM6_SERIAL_RATE_MASK (0x000FF) // Mask specifying which bits in this register are used to indicate the broadcast frequency 220 #define UM6_MAG_UPDATE_ENABLED (1 << 31) // Enable magnetometer-based updates in the EKF 221 #define UM6_ACCEL_UPDATE_ENABLED (1 << 30) // Enable accelerometer-based updates in the EKF 222 #define UM6_GYRO_STARTUP_CAL (1 << 29) // Enable automatic gyro calibration on startup 223 #define UM6_QUAT_ESTIMATE_ENABLED (1 << 28) // Enable quaternion-based state estimation 226 #define UM6_MAG_INIT_FAILED (1 << 31) // Indicates magnetometer initialization failed 227 #define UM6_ACCEL_INIT_FAILED (1 << 30) // Indicates accelerometer initialization failed 228 #define UM6_GYRO_INIT_FAILED (1 << 29) // Indicates gyro initialization failed 229 #define UM6_GYRO_ST_FAILED_X (1 << 28) // Indicates that the x-axis gyro self test failed 230 #define UM6_GYRO_ST_FAILED_Y (1 << 27) // Indicates that the y-axis gyro self test failed 231 #define UM6_GYRO_ST_FAILED_Z (1 << 26) // Indicates that the z-axis gyro self test failed 232 #define UM6_ACCEL_ST_FAILED_X (1 << 25) // Indicates that the x-axis accel self test failed 233 #define UM6_ACCEL_ST_FAILED_Y (1 << 24) // Indicates that the y-axis accel self test failed 234 #define UM6_ACCEL_ST_FAILED_Z (1 << 23) // Indicates that the z-axis accel self test failed 235 #define UM6_MAG_ST_FAILED_X (1 << 22) // Indicates that the x-axis mag self test failed 236 #define UM6_MAG_ST_FAILED_Y (1 << 21) // Indicates that the y-axis mag self test failed 237 #define UM6_MAG_ST_FAILED_Z (1 << 20) // Indicates that the z-axis mag self test failed 238 #define UM6_I2C_GYRO_BUS_ERROR (1 << 19) // Indicates that there was an i2c bus error while communicating with the rate gyros 239 #define UM6_I2C_ACCEL_BUS_ERROR (1 << 18) // Indicates that there was an i2c bus error while communicating with the accelerometers 240 #define UM6_I2C_MAG_BUS_ERROR (1 << 17) // Indicates that there was an i2c bus error while communicating with the magnetometer 241 #define UM6_EKF_DIVERGENT (1 << 16) // Indicates that the EKF estimate failed and had to be restarted 242 #define UM6_GYRO_UNRESPONSIVE (1 << 15) // Inidicates that the rate gyros failed to signal new data for longer than expected 243 #define UM6_ACCEL_UNRESPONSIVE (1 << 14) // Indicates that the accelerometer failed to signal new data for longer than expected 244 #define UM6_MAG_UNRESPONSIVE (1 << 13) // Indicates that the magnetometer failed to signal new data for longer than expected 245 #define UM6_FLASH_WRITE_FAILED (1 << 12) // Indicates that a write to flash command failed to complete properly 247 #define UM6_SELF_TEST_COMPLETE (1 << 0) // Indicates that a self-test was completed
um6
Author(s): Mike Purvis
autogenerated on Thu Sep 26 2019 03:18:02