Macros | Enumerations

advanced constants More...

Macros

#define kImuSmallFilterLimit
 
#define kImuMotorFilterLimit
 
#define kImuMotorFilterTimeOut
 
#define kImuCalibrationTime
 

Enumerations

enum  eImuAddress
 clusters twi addresses for the mpu6050 More...
 
enum  eImuRegister
 clusters MPU6050 registers for read or write access More...
 
enum  eImuStateMask
 clusters flags regarding the imu More...
 
enum  eImuOffset
 clusters inital offsets for the different sensors for each robot More...
 

Detailed Description

advanced constants

Macro Definition Documentation

◆ kImuCalibrationTime

#define kImuCalibrationTime

constant (5000): Time in milliseconds for calibrating the sensors
see also imu_calibrate()

◆ kImuMotorFilterLimit

#define kImuMotorFilterLimit

constant ( 10): Limit of motor power to be ignored for integration
see also kImuSetUseMotorFilter

◆ kImuMotorFilterTimeOut

#define kImuMotorFilterTimeOut

constant ( 50): Timeout in systicks (10ms) for motor-power-filter.
This allows the motors to slow down.
see also kImuSetUseMotorFilter

◆ kImuSmallFilterLimit

#define kImuSmallFilterLimit

constant (131): Limit of angular velocity to be ignored for integration
see also kImuSetUseSmallFilter

Enumeration Type Documentation

◆ eImuAddress

clusters twi addresses for the mpu6050

Enumerator
kImuAddress1 

twi address (0xD0): if AD0 is low

kImuAddress2 

twi address (0xD2): if AD0 is high

kImuAddressDefault 

twi address (kImuAddress1): default device address

◆ eImuOffset

enum eImuOffset

clusters inital offsets for the different sensors for each robot

See also
imu_get() and imu_set()
Enumerator
kImuOffsetAndiX 

constant (1715): offset of linear accel. along x-axis for Andi

kImuOffsetAndiY 

constant ( 218): offset of linear accel. along y-axis for Andi

kImuOffsetAndiZ 

constant (-249): offset of angular vel. around z-axis for Andi

kImuOffsetAnniX 

constant (1356): offset of linear accel. along x-axis for Anni

kImuOffsetAnniY 

constant (-214): offset of linear accel. along y-axis for Anni

kImuOffsetAnniZ 

constant ( -16): offset of angular vel. around z-axis for Anni

kImuOffsetEmmiX 

constant (1150): offset of linear accel. along x-axis for Emmi

kImuOffsetEmmiY 

constant (-145): offset of linear accel. along y-axis for Emmi

kImuOffsetEmmiZ 

constant (-236): offset of angular vel. around z-axis for Emmi

kImuOffsetHugoX 

constant ( 731): offset of linear accel. along x-axis for Hugo

kImuOffsetHugoY 

constant ( 12): offset of linear accel. along y-axis for Hugo

kImuOffsetHugoZ 

constant ( 162): offset of angular vel. around z-axis for Hugo

kImuOffsetPeteX 

constant (1378): offset of linear accel. along x-axis for Pete

kImuOffsetPeteY 

constant ( -44): offset of linear accel. along y-axis for Pete

kImuOffsetPeteZ 

constant ( -4): offset of angular vel. around z-axis for Pete

◆ eImuRegister

clusters MPU6050 registers for read or write access

Multibyte registers like kImuRegAccelX are in order:
High byte first (here: 0x3B)
Low byte second (here: 0x3C)

Enumerator
kImuRegWhoami 

register address (0x75): current twi address
(usually 0x68 == kImuAddress1 / 2)

kImuRegSmplrtDiv 

register address (0x19): sample rate divisor

kImuRegPwrMgmt1 

register address (0x6B): configures the power mode and the clock source

kImuRegDlpfConfig 

register address (0x1A): [2:0] digital low-pass filter

kImuRegGyroConfig 

register address (0x1B): triggers gyroscope self-test and configures the gyroscopes full scale range

kImuRegAccelConfig 

register address (0x1C): triggers accelerometer self-test and configures the accelerometer full scale

kImuRegAccelX 

register address (0x3B): linear acceleration along x-axis (16-bit)

kImuRegAccelY 

register address (0x3D): linear acceleration along y-axis (16-bit)

kImuRegAccelZ 

register address (0x3F): linear acceleration along z-axis (16-bit)

kImuRegTemp 

register address (0x41): temperature (16-bit)

kImuRegGyroX 

register address (0x43): angular velocity around x-axis (16-bit)

kImuRegGyroY 

register address (0x45): angular velocity around y-axis (16-bit)

kImuRegGyroZ 

register address (0x47): angular velocity around z-axis (16-bit)

◆ eImuStateMask

clusters flags regarding the imu

Enumerator
kImuStateNone 

bit mask (0x00): all flags are cleared

kImuStateInit 

bit mask (0x01): imu was succesfully initialized

kImuStateUseSmallFilter 

bit mask (0x02): ignore small angular velocity for integration

kImuStateUseMotorFilter 

bit mask (0x04): ignore angular velocity for integration, if motors are (almost) turned off

kImuStateGyroRes 

bit mask (0x18): these two bits, represent current full scale range for the angular velocity (yaw angle)
this is the same mask as used for the IMU register (kImuRegGyroConfig)

kImuStateAll 

bit mask (0x1F): filter all used flags