21 #include "../common/filter.h"
22 #include "../common/maths.h"
23 #include "../config/gyro.h"
24 #include "../config/sensors.h"
48 static inline int32_t ins_gyro_get_x(
struct ins_gyro *
self) {
return self->gyroADC[
X]; }
49 static inline int32_t ins_gyro_get_y(
struct ins_gyro *
self) {
return self->gyroADC[
Y]; }
50 static inline int32_t ins_gyro_get_z(
struct ins_gyro *
self) {
return self->gyroADC[
Z]; }
#define XYZ_AXIS_COUNT
Definition: axis.h:26
sensor_align_e
Definition: sensors.h:34
void ins_gyro_set_filter_hz(struct ins_gyro *self, uint16_t hz)
Definition: gyro.c:95
sensor_align_e align
Definition: gyro.h:27
stdev_t var[3]
Definition: gyro.h:38
void ins_gyro_calibrate(struct ins_gyro *self)
Definition: gyro.c:106
uint16_t calibratingG
Definition: gyro.h:31
void ins_gyro_init(struct ins_gyro *self, const struct gyro_config *config)
Definition: gyro.c:40
const struct gyro_config * config
Definition: gyro.h:40
biquad_t gyroFilterState[3]
Definition: gyro.h:34
int32_t gyroZero[XYZ_AXIS_COUNT]
Definition: gyro.h:32
bool use_filter
Definition: gyro.h:35
uint8_t z
set the acc deadband for z-Axis, this ignores small accelerations
Definition: accelerometer.h:52
bool ins_gyro_is_calibrated(struct ins_gyro *self)
Definition: gyro.c:115
int32_t gyroADC[XYZ_AXIS_COUNT]
Definition: gyro.h:29
int32_t g[3]
Definition: gyro.h:37
void ins_gyro_process_sample(struct ins_gyro *self, int32_t x, int32_t y, int32_t z)
Definition: gyro.c:76