NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
imu.h File Reference
#include <stdbool.h>
#include "common/axis.h"
#include "common/maths.h"
#include "common/quaternion.h"
#include "../config/imu.h"
Include dependency graph for imu.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  imu_accel_reading
 
union  attitude_euler_angles
 
struct  imu
 

Typedefs

typedef int32_t gyro_rates_t [3]
 
typedef int32_t acc_rates_t [3]
 
typedef union attitude_euler_angles euler_angles_t
 

Functions

void imu_init (struct imu *self, const struct config *config)
 
void imu_reload_config (struct imu *self)
 
void imu_input_accelerometer (struct imu *self, int16_t x, int16_t y, int16_t z)
 
void imu_input_gyro (struct imu *self, int16_t x, int16_t y, int16_t z)
 
void imu_input_magnetometer (struct imu *self, int16_t x, int16_t y, int16_t z)
 
void imu_input_yaw_dd (struct imu *self, int16_t yaw)
 
void imu_update (struct imu *self, float dt)
 
void imu_reset (struct imu *self)
 
int16_t imu_calc_throttle_angle_correction (struct imu *self, uint8_t throttle_correction_value)
 
int16_t imu_calc_heading (struct imu *self, t_fp_vector *vec)
 
float imu_get_cos_tilt_angle (struct imu *self)
 
bool imu_is_leveled (struct imu *self, uint8_t max_angle)
 
void imu_get_attitude_dd (struct imu *self, union attitude_euler_angles *att)
 
void imu_get_raw_accel (struct imu *self, union imu_accel_reading *acc)
 
void imu_set_acc_scale (struct imu *self, int16_t acc_1G)
 
void imu_set_gyro_scale (struct imu *self, float gyro_scale)
 
void imu_get_gyro (struct imu *self, int16_t gyro[3])
 
float imu_get_gyro_scale (struct imu *self)
 
int16_t imu_get_roll_dd (struct imu *self)
 
int16_t imu_get_pitch_dd (struct imu *self)
 
int16_t imu_get_yaw_dd (struct imu *self)
 
void imu_get_rotation (struct imu *self, quat_t *q)
 
void imu_enable_fast_dcm_convergence (struct imu *self, bool on)
 
float imu_get_avg_vertical_accel_cmss (struct imu *self)
 
float imu_get_est_vertical_vel_cms (struct imu *self)
 
float imu_get_velocity_integration_time (struct imu *self)
 
void imu_reset_velocity_estimate (struct imu *self)
 

Typedef Documentation

typedef int32_t acc_rates_t[3]
typedef int32_t gyro_rates_t[3]

Function Documentation

int16_t imu_calc_heading ( struct imu self,
t_fp_vector vec 
)
void imu_reload_config ( struct imu self)
void imu_set_acc_scale ( struct imu self,
int16_t  acc_1G 
)
void imu_set_gyro_scale ( struct imu self,
float  gyro_scale 
)