NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Collaboration diagram for IMU:

Macros

#define SPIN_RATE_LIMIT   20
 

Enumerations

enum  { IMU_FLAG_USE_ACC = (1 << 0), IMU_FLAG_USE_MAG = (1 << 1), IMU_FLAG_USE_YAW = (1 << 2), IMU_FLAG_DCM_CONVERGE_FASTER = (1 << 3) }
 

Functions

void imu_reset (struct imu *self)
 
void imu_init (struct imu *self, const struct config *config)
 
void imu_reset_velocity_estimate (struct imu *self)
 
bool imu_is_leveled (struct imu *self, uint8_t max_angle)
 
void imu_update (struct imu *self, float dt)
 
void imu_input_accelerometer (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_gyro (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_get_rotation (struct imu *self, quat_t *q)
 
float imu_get_cos_tilt_angle (struct imu *self)
 
int16_t imu_calc_throttle_angle_correction (struct imu *self, uint8_t throttle_correction_value)
 
void imu_get_attitude_dd (struct imu *self, union attitude_euler_angles *att)
 
void imu_get_gyro (struct imu *self, int16_t gyr[3])
 
float imu_get_gyro_scale (struct imu *self)
 
void imu_get_raw_accel (struct imu *self, union imu_accel_reading *accel)
 
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)
 
float imu_get_velocity_integration_time (struct imu *self)
 
float imu_get_avg_vertical_accel_cmss (struct imu *self)
 
float imu_get_est_vertical_vel_cms (struct imu *self)
 
void imu_enable_fast_dcm_convergence (struct imu *self, bool on)
 

Detailed Description

  • Test that imu leveling is detected correctly.
  • Make sure that different acc readings properly align the imu.

Macro Definition Documentation

#define SPIN_RATE_LIMIT   20

Enumeration Type Documentation

anonymous enum
Enumerator
IMU_FLAG_USE_ACC 
IMU_FLAG_USE_MAG 
IMU_FLAG_USE_YAW 
IMU_FLAG_DCM_CONVERGE_FASTER 

Function Documentation

int16_t imu_calc_throttle_angle_correction ( struct imu self,
uint8_t  throttle_correction_value 
)

Here is the call graph for this function:

void imu_enable_fast_dcm_convergence ( struct imu self,
bool  on 
)
void imu_get_attitude_dd ( struct imu self,
union attitude_euler_angles att 
)
float imu_get_avg_vertical_accel_cmss ( struct imu self)
float imu_get_cos_tilt_angle ( struct imu self)
float imu_get_est_vertical_vel_cms ( struct imu self)
void imu_get_gyro ( struct imu self,
int16_t  gyr[3] 
)
float imu_get_gyro_scale ( struct imu self)
int16_t imu_get_pitch_dd ( struct imu self)
void imu_get_raw_accel ( struct imu self,
union imu_accel_reading accel 
)
int16_t imu_get_roll_dd ( struct imu self)
void imu_get_rotation ( struct imu self,
quat_t q 
)
float imu_get_velocity_integration_time ( struct imu self)
int16_t imu_get_yaw_dd ( struct imu self)
void imu_init ( struct imu self,
const struct config config 
)

Here is the call graph for this function:

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 
)
bool imu_is_leveled ( struct imu self,
uint8_t  max_angle 
)

Here is the call graph for this function:

void imu_reset ( struct imu self)
void imu_reset_velocity_estimate ( struct imu self)
void imu_update ( struct imu self,
float  dt 
)

Here is the call graph for this function: