Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include <stdbool.h>
#include "modules/ins/ins_arduimu_basic.h"
#include "mcu_periph/i2c.h"
#include "state.h"
#include "modules/gps/gps.h"
#include "generated/airframe.h"
#include "modules/core/commands.h"
#include "math/pprz_algebra_int.h"
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 |
#define ARDUIMU_I2C_DEV i2c0 |
Definition at line 43 of file ins_arduimu_basic.c.
#define ArduIMU_SLAVE_ADDR 0x22 |
Definition at line 49 of file ins_arduimu_basic.c.
#define FillBufWith32bit | ( | _buf, | |
_index, | |||
_value | |||
) |
#define HIGH_ACCEL_HIGH_THRUST (0.8*MAX_PPRZ) |
Definition at line 76 of file ins_arduimu_basic.c.
#define HIGH_ACCEL_HIGH_THRUST_RESUME (0.1*MAX_PPRZ) |
Definition at line 77 of file ins_arduimu_basic.c.
#define HIGH_ACCEL_LOW_SPEED 15.0 |
Definition at line 74 of file ins_arduimu_basic.c.
#define HIGH_ACCEL_LOW_SPEED_RESUME 4.0 |
Definition at line 75 of file ins_arduimu_basic.c.
#define NB_DATA 9 |
Definition at line 40 of file ins_arduimu_basic.c.
void ahrs_update_gps | ( | void | ) |
Definition at line 214 of file ins_arduimu_basic.c.
void ArduIMU_event | ( | void | ) |
Definition at line 165 of file ins_arduimu_basic.c.
References ACCEL_FLOAT_OF_BFP, ANGLE_FLOAT_OF_BFP, ardu_gps_trans, ardu_ins_trans, arduimu_accel, arduimu_eulers, arduimu_rates, i2c_transaction::buf, DefaultChannel, DefaultDevice, I2CTransDone, I2CTransFailed, I2CTransSuccess, ins_pitch_neutral, ins_roll_neutral, FloatRates::p, FloatEulers::phi, FloatEulers::psi, FloatRates::q, FloatRates::r, RATE_FLOAT_OF_BFP, recievedData, stateSetAccelNed_f(), stateSetBodyRates_f(), stateSetNedToBodyEulers_f(), i2c_transaction::status, FloatEulers::theta, FloatVect3::x, FloatVect3::y, and FloatVect3::z.
void ArduIMU_init | ( | void | ) |
Definition at line 81 of file ins_arduimu_basic.c.
References ardu_gps_trans, ardu_ins_trans, arduimu_accel, arduimu_calibrate_neutrals, arduimu_eulers, arduimu_rates, FLOAT_EULERS_ZERO, FLOAT_RATES_ZERO, FLOAT_VECT3_ZERO, high_accel_done, high_accel_flag, I2CTransDone, ins_pitch_neutral, INS_PITCH_NEUTRAL_DEFAULT, ins_roll_neutral, INS_ROLL_NEUTRAL_DEFAULT, and i2c_transaction::status.
void ArduIMU_periodic | ( | void | ) |
Definition at line 142 of file ins_arduimu_basic.c.
References ardu_ins_trans, ARDUIMU_I2C_DEV, ArduIMU_SLAVE_ADDR, i2c_receive(), I2CTransDone, NB_DATA, and i2c_transaction::status.
void ArduIMU_periodicGPS | ( | void | ) |
Definition at line 105 of file ins_arduimu_basic.c.
References ardu_gps_trans, arduimu_calibrate_neutrals, ARDUIMU_I2C_DEV, ArduIMU_SLAVE_ADDR, i2c_transaction::buf, GpsState::course, FillBufWith32bit, GpsState::fix, gps, GpsState::gspeed, high_accel_done, high_accel_flag, HIGH_ACCEL_HIGH_THRUST, HIGH_ACCEL_HIGH_THRUST_RESUME, HIGH_ACCEL_LOW_SPEED, i2c_transmit(), I2CTransDone, GpsState::speed_3d, stateGetHorizontalSpeedNorm_f(), and i2c_transaction::status.
struct i2c_transaction ardu_gps_trans |
Definition at line 1 of file ins_arduimu_basic.c.
Referenced by ArduIMU_event(), ArduIMU_init(), and ArduIMU_periodicGPS().
struct i2c_transaction ardu_ins_trans |
Definition at line 1 of file ins_arduimu_basic.c.
Referenced by ArduIMU_event(), ArduIMU_init(), and ArduIMU_periodic().
struct FloatVect3 arduimu_accel |
Definition at line 60 of file ins_arduimu_basic.c.
bool arduimu_calibrate_neutrals |
Definition at line 71 of file ins_arduimu_basic.c.
struct FloatEulers arduimu_eulers |
ArduIMU simulation.
Sim provides attitude and rates.
Definition at line 60 of file ins_arduimu_basic.c.
struct FloatRates arduimu_rates |
Definition at line 60 of file ins_arduimu_basic.c.
bool high_accel_done |
Definition at line 78 of file ins_arduimu_basic.c.
Referenced by ArduIMU_init(), and ArduIMU_periodicGPS().
bool high_accel_flag |
Definition at line 79 of file ins_arduimu_basic.c.
Referenced by ArduIMU_init(), and ArduIMU_periodicGPS().
float ins_pitch_neutral |
Definition at line 67 of file ins_arduimu_basic.c.
float ins_roll_neutral |
Definition at line 66 of file ins_arduimu_basic.c.
Definition at line 60 of file ins_arduimu_basic.c.
Referenced by ArduIMU_event().