|
Paparazzi UAS
v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
|
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 |
Pressure Board Navarro.
Definition in file pressure_board_navarro.c.
| #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().
| void pbn_init | ( | void | ) |
Definition at line 82 of file pressure_board_navarro.c.
References PBNState::airspeed, PBNState::airspeed_adc, PBNState::airspeed_filter, PBNState::airspeed_offset, PBNState::altitude, PBNState::altitude_adc, PBNState::altitude_offset, PBNState::data_valid, OFFSET_NBSAMPLES_AVRG, pbn, PBN_OFFSET_FILTER, and PBN_START_DELAY.
| 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:| void pbn_read_event | ( | void | ) |
Definition at line 111 of file pressure_board_navarro.c.
References PBNState::airspeed, PBNState::airspeed_adc, PBNState::airspeed_filter, PBNState::airspeed_offset, PBNState::altitude, PBNState::altitude_adc, PBNState::altitude_offset, BARO_PBN_SENDER_ID, i2c_transaction::buf, PBNState::data_valid, I2CTransDone, Max, offset_cnt, pbn, PBN_AIRSPEED_SCALE, PBN_ALTITUDE_SCALE, PBN_OFFSET_FILTER, PBN_PRESSURE_OFFSET, pbn_trans, stateSetAirspeed_f(), and i2c_transaction::status.
Here is the call graph for this function:
|
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().
|
static |
Definition at line 80 of file pressure_board_navarro.c.
Referenced by pbn_periodic().