10 #ifndef __MBOT_IMU_H__
11 #define __MBOT_IMU_H__
16 #include <pico/stdlib.h>
17 #include <hardware/i2c.h>
18 #include <mbot/defs/mbot_pins.h>
19 #include <mbot/defs/mbot_params.h>
28 #define ACCEL_2_MS2 -0.000299387
29 #define GYRO_2_RADS 5.326484731e-07
30 #define MAG_2_UT 0.0625
31 #define QUAT_2_NORM 6.103515625e-05
32 #define RPY_2_RAD 0.00019174759848570515
35 #define MAX_PACKET_LENGTH 18
36 #define OUT_BUFFER_SIZE 60
83 BHI160_SAMPLE_RATE_12_5HZ = 12,
84 BHI160_SAMPLE_RATE_25HZ = 25,
85 BHI160_SAMPLE_RATE_50HZ = 50,
86 BHI160_SAMPLE_RATE_100HZ = 100,
87 BHI160_SAMPLE_RATE_200HZ = 200,
91 BHI160_ACCEL_RANGE_2G = 2,
92 BHI160_ACCEL_RANGE_4G = 4,
93 BHI160_ACCEL_RANGE_8G = 8,
94 BHI160_ACCEL_RANGE_16G = 16
98 BHI160_GYRO_RANGE_125_DPS = 125,
99 BHI160_GYRO_RANGE_250_DPS = 250,
100 BHI160_GYRO_RANGE_500_DPS = 500,
101 BHI160_GYRO_RANGE_1000_DPS = 1000,
102 BHI160_GYRO_RANGE_2000_DPS = 2000
BHY Sensor Driver Support Header File.
headfile of driver on MCU for bhy
header file of bhy_uc_driver.c
header file of bhy_uc_driver.c
header file of bhy_uc_driver.c
float mag_to_uT
conversion rate from raw gyroscope to uT
Definition: imu.h:58
float accel[3]
accelerometer (XYZ) in units of m/s^2
Definition: imu.h:41
float rpy_to_rad
conversion rate from raw RPY vector to radians
Definition: imu.h:60
float accel_to_ms2
conversion rate from raw accelerometer to m/s^2
Definition: imu.h:56
float gyro[3]
gyroscope (XYZ) in units of rad/s
Definition: imu.h:42
int16_t quat_qlty
quality estimate from Fuser Core
Definition: imu.h:46
int16_t raw_quat[4]
raw quaternion (WXYZ) from 16-bit ADC
Definition: imu.h:54
float quat[4]
normalized quaternion from Fuser Core
Definition: imu.h:44
int16_t raw_mag[3]
raw magnetometer (XYZ)from 16-bit ADC
Definition: imu.h:53
float mag[3]
magnetometer (XYZ) in units of uT
Definition: imu.h:43
float gyro_to_rads
conversion rate from raw gyroscope to rad/s
Definition: imu.h:57
int16_t raw_accel[3]
raw accelerometer (XYZ) from 16-bit ADC
Definition: imu.h:51
float rpy[3]
Roll(x) pitch(Y) yaw(Z) in radians from Fuser Core.
Definition: imu.h:45
float quat_to_norm
conversion rate from raw quaternion
Definition: imu.h:59
int16_t raw_rpy[3]
raw RPY vector (XYZ) Converted to -2^15 TO 2^15
Definition: imu.h:55
int16_t raw_gyro[3]
raw gyroscope (XYZ)from 16-bit ADC
Definition: imu.h:52