Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
ins_arduimu_basic.c File Reference
#include <stdbool.h>
#include "modules/ins/ins_arduimu_basic.h"
#include "mcu_periph/i2c.h"
#include "state.h"
#include "subsystems/gps.h"
#include "generated/airframe.h"
#include "inter_mcu.h"
#include "math/pprz_algebra_int.h"
+ Include dependency graph for ins_arduimu_basic.c:

Go to the source code of this file.

Macros

#define NB_DATA   9
 
#define ARDUIMU_I2C_DEV   i2c0
 
#define ArduIMU_SLAVE_ADDR   0x22
 
#define HIGH_ACCEL_LOW_SPEED   15.0
 
#define HIGH_ACCEL_LOW_SPEED_RESUME   4.0
 
#define HIGH_ACCEL_HIGH_THRUST   (0.8*MAX_PPRZ)
 
#define HIGH_ACCEL_HIGH_THRUST_RESUME   (0.1*MAX_PPRZ)
 
#define FillBufWith32bit(_buf, _index, _value)
 

Functions

void ArduIMU_init (void)
 
void ArduIMU_periodicGPS (void)
 
void ArduIMU_periodic (void)
 
void ArduIMU_event (void)
 
void ahrs_update_gps (void)
 

Variables

struct i2c_transaction ardu_gps_trans
 
struct i2c_transaction ardu_ins_trans
 
static int16_t recievedData [NB_DATA]
 
struct FloatEulers arduimu_eulers
 ArduIMU simulation. More...
 
struct FloatRates arduimu_rates
 
struct FloatVect3 arduimu_accel
 
float ins_roll_neutral
 
float ins_pitch_neutral
 
bool arduimu_calibrate_neutrals
 
bool high_accel_done
 
bool high_accel_flag
 

Macro Definition Documentation

◆ ARDUIMU_I2C_DEV

#define ARDUIMU_I2C_DEV   i2c0

Definition at line 43 of file ins_arduimu_basic.c.

◆ ArduIMU_SLAVE_ADDR

#define ArduIMU_SLAVE_ADDR   0x22

Definition at line 49 of file ins_arduimu_basic.c.

◆ FillBufWith32bit

#define FillBufWith32bit (   _buf,
  _index,
  _value 
)
Value:
{ \
_buf[_index] = (uint8_t) (_value); \
_buf[_index+1] = (uint8_t) ((_value) >> 8); \
_buf[_index+2] = (uint8_t) ((_value) >> 16); \
_buf[_index+3] = (uint8_t) ((_value) >> 24); \
}

Definition at line 98 of file ins_arduimu_basic.c.

◆ HIGH_ACCEL_HIGH_THRUST

#define HIGH_ACCEL_HIGH_THRUST   (0.8*MAX_PPRZ)

Definition at line 76 of file ins_arduimu_basic.c.

◆ HIGH_ACCEL_HIGH_THRUST_RESUME

#define HIGH_ACCEL_HIGH_THRUST_RESUME   (0.1*MAX_PPRZ)

Definition at line 77 of file ins_arduimu_basic.c.

◆ HIGH_ACCEL_LOW_SPEED

#define HIGH_ACCEL_LOW_SPEED   15.0

Definition at line 74 of file ins_arduimu_basic.c.

◆ HIGH_ACCEL_LOW_SPEED_RESUME

#define HIGH_ACCEL_LOW_SPEED_RESUME   4.0

Definition at line 75 of file ins_arduimu_basic.c.

◆ NB_DATA

#define NB_DATA   9

Definition at line 40 of file ins_arduimu_basic.c.

Function Documentation

◆ ahrs_update_gps()

void ahrs_update_gps ( void  )

Definition at line 214 of file ins_arduimu_basic.c.

◆ ArduIMU_event()

◆ ArduIMU_init()

◆ ArduIMU_periodic()

void ArduIMU_periodic ( void  )

◆ ArduIMU_periodicGPS()

Variable Documentation

◆ ardu_gps_trans

struct i2c_transaction ardu_gps_trans

Definition at line 57 of file ins_arduimu_basic.c.

Referenced by ArduIMU_event(), ArduIMU_init(), and ArduIMU_periodicGPS().

◆ ardu_ins_trans

struct i2c_transaction ardu_ins_trans

Definition at line 58 of file ins_arduimu_basic.c.

Referenced by ArduIMU_event(), ArduIMU_init(), and ArduIMU_periodic().

◆ arduimu_accel

struct FloatVect3 arduimu_accel

Definition at line 64 of file ins_arduimu_basic.c.

◆ arduimu_calibrate_neutrals

bool arduimu_calibrate_neutrals

Definition at line 71 of file ins_arduimu_basic.c.

◆ arduimu_eulers

struct FloatEulers arduimu_eulers

ArduIMU simulation.

Sim provides attitude and rates.

Definition at line 62 of file ins_arduimu_basic.c.

◆ arduimu_rates

struct FloatRates arduimu_rates

Definition at line 63 of file ins_arduimu_basic.c.

◆ high_accel_done

bool high_accel_done

Definition at line 78 of file ins_arduimu_basic.c.

Referenced by ArduIMU_init(), and ArduIMU_periodicGPS().

◆ high_accel_flag

bool high_accel_flag

Definition at line 79 of file ins_arduimu_basic.c.

Referenced by ArduIMU_init(), and ArduIMU_periodicGPS().

◆ ins_pitch_neutral

float ins_pitch_neutral

Definition at line 67 of file ins_arduimu_basic.c.

◆ ins_roll_neutral

float ins_roll_neutral

Definition at line 66 of file ins_arduimu_basic.c.

◆ recievedData

int16_t recievedData[NB_DATA]
static

Definition at line 60 of file ins_arduimu_basic.c.

Referenced by ArduIMU_event().

uint8_t
unsigned char uint8_t
Definition: types.h:14