Paparazzi UAS
v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
|
#include "std.h"
#include "baro_board.h"
#include "subsystems/sensors/baro.h"
#include "peripherals/mcp355x.h"
#include "subsystems/abi.h"
#include "led.h"
Go to the source code of this file.
Macros | |
#define | NAVGO_BARO_SENS 0.05298 |
scale factor to convert raw ADC measurement to pressure in Pascal. More... | |
#define | NAVGO_BARO_OFFSET 199229 |
#define | BARO_STARTUP_COUNTER 200 |
Functions | |
void | baro_init (void) |
void | baro_periodic (void) |
void | navgo_baro_event (void) |
Variables | |
uint16_t | startup_cnt |
#define BARO_STARTUP_COUNTER 200 |
Definition at line 54 of file baro_board.c.
Referenced by baro_init().
#define NAVGO_BARO_OFFSET 199229 |
Definition at line 50 of file baro_board.c.
Referenced by navgo_baro_event().
#define NAVGO_BARO_SENS 0.05298 |
scale factor to convert raw ADC measurement to pressure in Pascal.
supply voltage Vs = 5V real sensor sensitivity Vout = Vs * (0.009 P - 0.095) with P in kPa 22 bit signed ADC -> only 21 useful bits ADC = 5/2^21 = 2.384e-6 V / LSB
offset = 5*0.095/2.384e-6 = 199229 (LSB) sensitivity = (1000/0.009)*2.384e-6/5 = 0.05298 Pa/LSB
Definition at line 46 of file baro_board.c.
Referenced by navgo_baro_event().
void baro_init | ( | void | ) |
Definition at line 57 of file baro_board.c.
References BARO_STARTUP_COUNTER, LED_OFF, mcp355x_init(), and startup_cnt.
void baro_periodic | ( | void | ) |
Definition at line 66 of file baro_board.c.
References LED_ON, LED_TOGGLE, mcp355x_read(), and startup_cnt.
void navgo_baro_event | ( | void | ) |
Definition at line 82 of file baro_board.c.
References BARO_BOARD_SENDER_ID, mcp355x_data, mcp355x_data_available, mcp355x_event(), NAVGO_BARO_OFFSET, NAVGO_BARO_SENS, Bmp085::pressure, and startup_cnt.
uint16_t startup_cnt |
Definition at line 55 of file baro_board.c.