|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
37 #include "generated/airframe.h"
42 #ifndef ARDUIMU_I2C_DEV
43 #define ARDUIMU_I2C_DEV i2c0
49 #define ArduIMU_SLAVE_ADDR 0x22
51 #ifdef ARDUIMU_SYNC_SEND
53 #include "pprzlink/messages.h"
74 #define HIGH_ACCEL_LOW_SPEED 15.0
75 #define HIGH_ACCEL_LOW_SPEED_RESUME 4.0 // Hysteresis
76 #define HIGH_ACCEL_HIGH_THRUST (0.8*MAX_PPRZ)
77 #define HIGH_ACCEL_HIGH_THRUST_RESUME (0.1*MAX_PPRZ) // Hysteresis
98 #define FillBufWith32bit(_buf, _index, _value) { \
99 _buf[_index] = (uint8_t) (_value); \
100 _buf[_index+1] = (uint8_t) ((_value) >> 8); \
101 _buf[_index+2] = (uint8_t) ((_value) >> 16); \
102 _buf[_index+3] = (uint8_t) ((_value) >> 24); \
110 #if USE_HIGH_ACCEL_FLAG
115 pprz_t cmd = imcu_get_command(COMMAND_THROTTLE);
197 #ifdef ARDUIMU_SYNC_SEND
struct FloatRates arduimu_rates
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
vector in North East Down coordinates Units: meters
#define ANGLE_FLOAT_OF_BFP(_ai)
#define INS_PITCH_NEUTRAL_DEFAULT
#define FLOAT_RATES_ZERO(_r)
struct FloatVect3 arduimu_accel
#define ArduIMU_SLAVE_ADDR
#define INS_ROLL_NEUTRAL_DEFAULT
@ I2CTransFailed
transaction failed
#define FLOAT_EULERS_ZERO(_e)
#define HIGH_ACCEL_HIGH_THRUST_RESUME
bool arduimu_calibrate_neutrals
#define HIGH_ACCEL_LOW_SPEED
Paparazzi fixed point algebra.
@ I2CTransSuccess
transaction successfully finished by I2C driver
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
#define ACCEL_FLOAT_OF_BFP(_ai)
bool i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
Device independent GPS code (interface)
uint16_t speed_3d
norm of 3d speed in cm/s
#define FLOAT_VECT3_ZERO(_v)
static void stateSetBodyRates_f(struct FloatRates *body_rate)
Set vehicle body angular rate (float).
uint16_t gspeed
norm of 2d ground speed in cm/s
enum I2CTransactionStatus status
Transaction status.
void ahrs_update_gps(void)
void ArduIMU_periodicGPS(void)
I2C transaction structure.
Common code for AP and FBW telemetry.
static void stateSetAccelNed_f(struct NedCoor_f *ned_accel)
Set acceleration in NED coordinates (float).
int32_t course
GPS course over ground in rad*1e7, [0, 2*Pi]*1e7 (CW/north)
void ArduIMU_periodic(void)
struct i2c_transaction ardu_gps_trans
static float stateGetHorizontalSpeedNorm_f(void)
Get norm of horizontal ground speed (float).
static void stateSetNedToBodyEulers_f(struct FloatEulers *ned_to_body_eulers)
Set vehicle body attitude from euler angles (float).
static int16_t recievedData[NB_DATA]
@ I2CTransDone
transaction set to done by user level
#define FillBufWith32bit(_buf, _index, _value)
#define RATE_FLOAT_OF_BFP(_ai)
#define HIGH_ACCEL_HIGH_THRUST
struct FloatEulers arduimu_eulers
ArduIMU simulation.
struct GpsState gps
global GPS state
bool i2c_receive(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint16_t len)
Submit a read only transaction.
struct i2c_transaction ardu_ins_trans