Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
baro_ets.c File Reference
#include "sensors/baro_ets.h"
#include "mcu_periph/i2c.h"
#include "estimator.h"
#include <math.h>
#include "subsystems/nav.h"
+ Include dependency graph for baro_ets.c:

Go to the source code of this file.

Macros

#define BARO_ETS_ADDR   0xE8
 
#define BARO_ETS_REG   0x07
 
#define BARO_ETS_SCALE   0.32
 
#define BARO_ETS_OFFSET_MAX   30000
 
#define BARO_ETS_OFFSET_MIN   10
 
#define BARO_ETS_OFFSET_NBSAMPLES_INIT   20
 
#define BARO_ETS_OFFSET_NBSAMPLES_AVRG   40
 
#define BARO_ETS_R   0.5
 
#define BARO_ETS_SIGMA2   0.1
 
#define BARO_ETS_I2C_DEV   i2c0
 

Functions

void baro_ets_init (void)
 
void baro_ets_read_periodic (void)
 
void baro_ets_read_event (void)
 

Variables

uint16_t baro_ets_adc
 
uint16_t baro_ets_offset
 
bool_t baro_ets_valid
 
float baro_ets_altitude
 
bool_t baro_ets_enabled
 
float baro_ets_r
 
float baro_ets_sigma2
 
struct i2c_transaction baro_ets_i2c_trans
 
bool_t baro_ets_offset_init
 
uint32_t baro_ets_offset_tmp
 
uint16_t baro_ets_cnt
 

Macro Definition Documentation

#define BARO_ETS_ADDR   0xE8

Definition at line 49 of file baro_ets.c.

Referenced by baro_ets_read_periodic().

#define BARO_ETS_I2C_DEV   i2c0

Definition at line 60 of file baro_ets.c.

Referenced by baro_ets_read_periodic().

#define BARO_ETS_OFFSET_MAX   30000

Definition at line 52 of file baro_ets.c.

Referenced by baro_ets_read_event().

#define BARO_ETS_OFFSET_MIN   10

Definition at line 53 of file baro_ets.c.

Referenced by baro_ets_read_event().

#define BARO_ETS_OFFSET_NBSAMPLES_AVRG   40

Definition at line 55 of file baro_ets.c.

Referenced by baro_ets_init(), and baro_ets_read_event().

#define BARO_ETS_OFFSET_NBSAMPLES_INIT   20

Definition at line 54 of file baro_ets.c.

Referenced by baro_ets_init().

#define BARO_ETS_R   0.5

Definition at line 56 of file baro_ets.c.

Referenced by baro_ets_init().

#define BARO_ETS_REG   0x07

Definition at line 50 of file baro_ets.c.

#define BARO_ETS_SCALE   0.32

Definition at line 51 of file baro_ets.c.

Referenced by baro_ets_read_event().

#define BARO_ETS_SIGMA2   0.1

Definition at line 57 of file baro_ets.c.

Referenced by baro_ets_init().

Function Documentation

Variable Documentation

uint16_t baro_ets_adc

Definition at line 64 of file baro_ets.c.

Referenced by baro_ets_init(), baro_ets_read_event(), and baro_ets_read_periodic().

float baro_ets_altitude
uint16_t baro_ets_cnt

Definition at line 77 of file baro_ets.c.

Referenced by baro_ets_init(), and baro_ets_read_event().

bool_t baro_ets_enabled

Definition at line 68 of file baro_ets.c.

Referenced by baro_ets_init().

struct i2c_transaction baro_ets_i2c_trans

Definition at line 72 of file baro_ets.c.

Referenced by baro_ets_init(), baro_ets_read_event(), and baro_ets_read_periodic().

uint16_t baro_ets_offset

Definition at line 65 of file baro_ets.c.

Referenced by baro_ets_init(), and baro_ets_read_event().

bool_t baro_ets_offset_init

Definition at line 75 of file baro_ets.c.

Referenced by baro_ets_init(), and baro_ets_read_event().

uint32_t baro_ets_offset_tmp

Definition at line 76 of file baro_ets.c.

Referenced by baro_ets_init(), and baro_ets_read_event().

float baro_ets_r

Definition at line 69 of file baro_ets.c.

Referenced by baro_ets_init().

float baro_ets_sigma2

Definition at line 70 of file baro_ets.c.

Referenced by baro_ets_init().

bool_t baro_ets_valid

Definition at line 66 of file baro_ets.c.

Referenced by baro_ets_init(), baro_ets_read_event(), and baro_ets_read_periodic().