Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
imu.c File Reference

Inertial Measurement Unit interface. More...

#include "subsystems/imu.h"
#include "state.h"
#include "subsystems/abi.h"
#include "subsystems/datalink/telemetry.h"
+ Include dependency graph for imu.c:

Go to the source code of this file.

Functions

static void send_accel_raw (struct transport_tx *trans, struct link_device *dev)
 
static void send_accel_scaled (struct transport_tx *trans, struct link_device *dev)
 
static void send_accel (struct transport_tx *trans, struct link_device *dev)
 
static void send_gyro_raw (struct transport_tx *trans, struct link_device *dev)
 
static void send_gyro_scaled (struct transport_tx *trans, struct link_device *dev)
 
static void send_gyro (struct transport_tx *trans, struct link_device *dev)
 
static void send_mag_raw (struct transport_tx *trans, struct link_device *dev)
 
static void send_mag_scaled (struct transport_tx *trans, struct link_device *dev)
 
static void send_mag (struct transport_tx *trans, struct link_device *dev)
 
void imu_init (void)
 
void imu_SetBodyToImuPhi (float phi)
 
void imu_SetBodyToImuTheta (float theta)
 
void imu_SetBodyToImuPsi (float psi)
 
void imu_SetBodyToImuCurrent (float set)
 
void WEAK imu_scale_gyro (struct Imu *_imu)
 
void WEAK imu_scale_accel (struct Imu *_imu)
 
void WEAK imu_scale_mag (struct Imu *_imu)
 

Variables

struct Imu imu
 global IMU state More...
 

Detailed Description

Inertial Measurement Unit interface.

Definition in file imu.c.

Function Documentation

void imu_SetBodyToImuPhi ( float  phi)

Definition at line 151 of file imu.c.

References Imu::body_to_imu, imu, orientationGetEulers_f(), orientationGetQuat_f(), orientationSetEulers_f(), and FloatEulers::phi.

+ Here is the call graph for this function:

void imu_SetBodyToImuPsi ( float  psi)

Definition at line 169 of file imu.c.

References Imu::body_to_imu, imu, orientationGetEulers_f(), orientationGetQuat_f(), orientationSetEulers_f(), and FloatEulers::psi.

+ Here is the call graph for this function:

void imu_SetBodyToImuTheta ( float  theta)

Definition at line 160 of file imu.c.

References Imu::body_to_imu, imu, orientationGetEulers_f(), orientationGetQuat_f(), orientationSetEulers_f(), and FloatEulers::theta.

+ Here is the call graph for this function:

static void send_accel ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 58 of file imu.c.

References Imu::accel, ACCELS_FLOAT_OF_BFP, imu, FloatVect3::x, FloatVect3::y, and FloatVect3::z.

Referenced by imu_init().

+ Here is the caller graph for this function:

static void send_accel_raw ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 46 of file imu.c.

References Imu::accel_unscaled, imu, Int32Vect3::x, Int32Vect3::y, and Int32Vect3::z.

Referenced by imu_init().

+ Here is the caller graph for this function:

static void send_accel_scaled ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 52 of file imu.c.

References Imu::accel, imu, Int32Vect3::x, Int32Vect3::y, and Int32Vect3::z.

Referenced by imu_init().

+ Here is the caller graph for this function:

static void send_gyro ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 78 of file imu.c.

References Imu::gyro, imu, FloatRates::p, FloatRates::q, FloatRates::r, and RATES_FLOAT_OF_BFP.

Referenced by imu_init().

+ Here is the caller graph for this function:

static void send_gyro_raw ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 66 of file imu.c.

References Imu::gyro_unscaled, imu, Int32Rates::p, Int32Rates::q, and Int32Rates::r.

Referenced by imu_init().

+ Here is the caller graph for this function:

static void send_gyro_scaled ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 72 of file imu.c.

References Imu::gyro, imu, Int32Rates::p, Int32Rates::q, and Int32Rates::r.

Referenced by imu_init().

+ Here is the caller graph for this function:

static void send_mag ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 98 of file imu.c.

References imu, Imu::mag, MAGS_FLOAT_OF_BFP, FloatVect3::x, FloatVect3::y, and FloatVect3::z.

Referenced by imu_init().

+ Here is the caller graph for this function:

static void send_mag_raw ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 86 of file imu.c.

References imu, Imu::mag_unscaled, Int32Vect3::x, Int32Vect3::y, and Int32Vect3::z.

Referenced by imu_init().

+ Here is the caller graph for this function:

static void send_mag_scaled ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 92 of file imu.c.

References imu, Imu::mag, Int32Vect3::x, Int32Vect3::y, and Int32Vect3::z.

Referenced by imu_init().

+ Here is the caller graph for this function:

Variable Documentation

struct Imu imu

global IMU state

Definition at line 108 of file imu.c.

Referenced by ahrs_aligner_run(), ahrs_gx3_init(), ahrs_gx3_publish_imu(), b2_hff_propagate(), direct_memory_logger_periodic(), file_logger_periodic(), gx3_packet_read_message(), handle_ins_msg(), high_speed_logger_spi_link_periodic(), imu_analog_periodic(), imu_apogee_downlink_raw(), imu_apogee_event(), imu_aspirin2_event(), imu_aspirin_event(), imu_aspirin_i2c_event(), imu_b2_event(), imu_bebop_event(), imu_disco_event(), imu_drotek2_event(), imu_feed_gyro_accel(), imu_feed_mag(), imu_gl1_event(), imu_hbmini_downlink_raw(), imu_hbmini_event(), imu_init(), imu_krooz_downlink_raw(), imu_krooz_event(), imu_krooz_periodic(), imu_mpu9250_event(), imu_mpu_hmc_event(), imu_mpu_i2c_event(), imu_mpu_spi_event(), imu_navgo_downlink_raw(), imu_navgo_event(), imu_navstik_event(), imu_nps_event(), imu_ppzuav_event(), imu_px4_event(), imu_px4fmu_event(), imu_quality_assessment_periodic(), imu_SetBodyToImuCurrent(), imu_SetBodyToImuPhi(), imu_SetBodyToImuPsi(), imu_SetBodyToImuTheta(), imu_swing_event(), imu_um6_publish(), imu_umarim_downlink_raw(), imu_umarim_event(), imu_vectornav_propagate(), init_ap(), ins_int_propagate(), logger_uart_periodic(), mag_calib_ukf_run(), mag_hmc58xx_module_event(), mag_pitot_parse_msg(), mag_pitot_raw_downlink(), main_init(), navdata_publish_imu(), send_accel(), send_accel_raw(), send_accel_scaled(), send_aligner(), send_gyro(), send_gyro_raw(), send_gyro_scaled(), send_imu_mag_current(), send_mag(), send_mag_raw(), send_mag_scaled(), UM6_packet_read_message(), and wind_estimator_periodic().