Paparazzi UAS  v6.2_unstable
Paparazzi is a free software Unmanned Aircraft System.
imu.c File Reference
#include "modules/imu/imu.h"
#include "state.h"
#include "modules/core/abi.h"
#include "modules/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

◆ imu_init()

◆ imu_scale_accel()

◆ imu_scale_gyro()

◆ imu_scale_mag()

◆ imu_SetBodyToImuCurrent()

◆ imu_SetBodyToImuPhi()

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:

◆ imu_SetBodyToImuPsi()

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:

◆ imu_SetBodyToImuTheta()

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:

◆ send_accel()

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

Definition at line 58 of file imu.c.

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

Referenced by imu_init().

+ Here is the caller graph for this function:

◆ send_accel_raw()

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, dev, imu, Int32Vect3::x, Int32Vect3::y, and Int32Vect3::z.

Referenced by imu_init().

+ Here is the caller graph for this function:

◆ send_accel_scaled()

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, dev, imu, Int32Vect3::x, Int32Vect3::y, and Int32Vect3::z.

Referenced by imu_init().

+ Here is the caller graph for this function:

◆ send_gyro()

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

Definition at line 78 of file imu.c.

References dev, 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:

◆ send_gyro_raw()

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

Definition at line 66 of file imu.c.

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

Referenced by imu_init().

+ Here is the caller graph for this function:

◆ send_gyro_scaled()

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

Definition at line 72 of file imu.c.

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

Referenced by imu_init().

+ Here is the caller graph for this function:

◆ send_mag()

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

Definition at line 98 of file imu.c.

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

Referenced by imu_init().

+ Here is the caller graph for this function:

◆ send_mag_raw()

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

Definition at line 86 of file imu.c.

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

Referenced by imu_init().

+ Here is the caller graph for this function:

◆ send_mag_scaled()

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

Definition at line 92 of file imu.c.

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

Referenced by imu_init().

+ Here is the caller graph for this function:

Variable Documentation

◆ imu