Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
pressure_board_navarro.c File Reference

Pressure Board Navarro. More...

+ Include dependency graph for pressure_board_navarro.c:

Go to the source code of this file.

Macros

#define PBN_I2C_DEV   i2c0
 Default I2C device on tiny is i2c0. More...
 
#define PBN_I2C_ADDR   0x28
 Sensor I2C slave address. More...
 
#define OFFSET_NBSAMPLES_AVRG   100
 Number of values to compute an offset at startup. More...
 
#define PBN_START_DELAY   30
 Number of loops before starting to store data. More...
 
#define PBN_OFFSET_FILTER   7
 Weight for offset IIR filter. More...
 
#define PBN_AIRSPEED_SCALE   (1./0.54)
 Quadratic scale factor for airspeed. More...
 
#define PBN_ALTITUDE_SCALE   0.32
 Linear scale factor for altitude. More...
 
#define PBN_PRESSURE_OFFSET   101325.0
 

Functions

void pbn_init (void)
 
void pbn_periodic (void)
 
void pbn_read_event (void)
 

Variables

struct PBNState pbn
 
struct i2c_transaction pbn_trans
 
static uint16_t offset_cnt
 
static uint16_t startup_delay
 

Detailed Description

Pressure Board Navarro.

Definition in file pressure_board_navarro.c.

Macro Definition Documentation

#define OFFSET_NBSAMPLES_AVRG   100

Number of values to compute an offset at startup.

Definition at line 52 of file pressure_board_navarro.c.

Referenced by pbn_init().

#define PBN_AIRSPEED_SCALE   (1./0.54)

Quadratic scale factor for airspeed.

Definition at line 62 of file pressure_board_navarro.c.

Referenced by pbn_read_event().

#define PBN_ALTITUDE_SCALE   0.32

Linear scale factor for altitude.

Definition at line 67 of file pressure_board_navarro.c.

Referenced by pbn_read_event().

#define PBN_I2C_ADDR   0x28

Sensor I2C slave address.

Definition at line 49 of file pressure_board_navarro.c.

Referenced by pbn_periodic().

#define PBN_I2C_DEV   i2c0

Default I2C device on tiny is i2c0.

Definition at line 45 of file pressure_board_navarro.c.

Referenced by pbn_periodic().

#define PBN_OFFSET_FILTER   7

Weight for offset IIR filter.

Definition at line 58 of file pressure_board_navarro.c.

Referenced by pbn_init(), and pbn_read_event().

#define PBN_PRESSURE_OFFSET   101325.0

Definition at line 71 of file pressure_board_navarro.c.

Referenced by pbn_read_event().

#define PBN_START_DELAY   30

Number of loops before starting to store data.

Definition at line 55 of file pressure_board_navarro.c.

Referenced by pbn_init().

Function Documentation

void pbn_periodic ( void  )

Definition at line 97 of file pressure_board_navarro.c.

References i2c_transaction::buf, i2c_transceive(), PBN_I2C_ADDR, PBN_I2C_DEV, pbn_trans, and startup_delay.

+ Here is the call graph for this function:

Variable Documentation

uint16_t offset_cnt
static

Definition at line 79 of file pressure_board_navarro.c.

Referenced by pbn_read_event().

struct PBNState pbn

Definition at line 76 of file pressure_board_navarro.c.

Referenced by pbn_init(), and pbn_read_event().

struct i2c_transaction pbn_trans

Definition at line 77 of file pressure_board_navarro.c.

Referenced by pbn_periodic(), and pbn_read_event().

uint16_t startup_delay
static

Definition at line 80 of file pressure_board_navarro.c.

Referenced by pbn_periodic().