Gyroscope Advanced Usage
Raw And Translated Data
Raw and translated rotation datas are available. Calling mpu925x_get_rotation
function also calls mpu925x_get_rotation_raw
function internally. Both functions stores data in given mpu925x_t
struct.
Full-Scale Select
One can set gyroscope full-scale range of 250 dps, 500 dps, 1000 dps and 2000 dps.
-
void mpu925x_set_gyroscope_scale(mpu925x_t *mpu925x, mpu925x_gyroscope_scale scale)
Set gyroscope full-scale range.
- Parameters
mpu925x – MPU-925X struct pointer.
scale – Gyroscope full-scale range to be set.
Digital Low Pass Filter
One can enable hardware digital low pass filter. Look datasheet for more info.
Offset Cancellation
Offset cancellation consist 2 steps: Getting and setting offset cancellation values. While getting offset cancellation values, sensor must stand still.
-
void mpu925x_get_gyroscope_offset(mpu925x_t *mpu925x, uint16_t sampling_amount, int16_t *offset)
Get gyroscope offset cancellation values.
See also
mpu925x_set_gyroscope_offset
- Parameters
mpu925x – MPU-925X struct pointer.
sampling_amount – Sampling amount for rotation values.
offset – 3d array which holds gyroscope offset cancellation values.
-
void mpu925x_set_gyroscope_offset(mpu925x_t *mpu925x, int16_t *offset)
Set gyroscope offset cancellation values.
See also
mpu925x_get_gyroscope_offset
- Parameters
mpu925x – MPU-925X struct pointer.
offset – 3d array which holds gyroscope offset cancellation values.
One can use these two methods to get and set offset values or call one unified function which does 2 of them at once.
-
void mpu925x_gyroscope_offset_cancellation(mpu925x_t *mpu925x, uint16_t sampling_amount)
Get and set gyroscope offset cancellation values.
See also
mpu925x_get_gyroscope_offset
See also
mpu925x_set_gyroscope_offset
- Parameters
mpu925x – MPU-925X struct pointer.
sampling_amount – Sampling amount for rotation values.