|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
47 bmp->i2c_trans.slave_addr = addr;
51 bmp->data_available =
false;
52 bmp->initialized =
false;
234 var1 = ((double)
t_fine / 2) - 64000.0;
235 var2 = (var1 * var1 * (double)bmp->
calib.
dig_p5) / 32768.0;
236 var2 = var2 + (var1 * (double)bmp->
calib.
dig_p5 * 2.0);
237 var2 = (var2 / 4.0) + ((double)bmp->
calib.
dig_p4 * 65536.0);
238 var1 = (((double)bmp->
calib.
dig_p3 * var1 * (var1 / 524288.0)) + ((
double)bmp->
calib.
dig_p2 * var1)) / 524288.0;
239 var1 = (1 + (var1 / 32768.0)) * (
double)bmp->
calib.
dig_p1;
241 p = (
p - (var2 / 4096.0)) * (6250.0 / var1);
void bmp280_i2c_init(struct Bmp280_I2c *bmp, struct i2c_periph *i2c_p, uint8_t addr)
@ BMP280_STATUS_READ_STATUS_REG
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
@ BMP280_STATUS_GET_CALIB
enum Bmp280Status status
state machine status
static double compensate_temperature(struct Bmp280_I2c *bmp)
This internal API is used to compensate the raw temperature data and return the compensated temperatu...
volatile bool data_available
data ready flag
#define BMP280_CTRL_MEAS_REG_ADDR
struct i2c_periph * i2c_p
#define BMP280_OVERSAMPLING_1X_T
@ I2CTransFailed
transaction failed
@ BMP280_STATUS_READ_DATA_REGS
#define BMP280_INACTIVITY_62_5_MS
void bmp280_i2c_event(struct Bmp280_I2c *bmp)
#define BMP280_NVRAM_COPY_BIT
@ I2CTransSuccess
transaction successfully finished by I2C driver
#define BMP280_POWER_NORMAL_MODE
bool i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
uint32_t raw_pressure
uncompensated pressure
static void parse_calib_data(struct Bmp280_I2c *bmp)
This internal API is used to parse the calibration data, compensates it and store it in device struct...
bool initialized
config done flag
bool i2c_transceive(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len_w, uint16_t len_r)
Submit a write/read transaction.
@ BMP280_STATUS_CONFIGURE
struct i2c_transaction i2c_trans
enum I2CTransactionStatus status
Transaction status.
#define BMP280_CONCAT_BYTES(msb, lsb)
float temperature
temperature in deg Celcius
uint16_t f
Camera baseline, in meters (i.e. horizontal distance between the two cameras of the stereo setup)
uint8_t slave_addr
Slave address.
struct bmp280_reg_calib_data calib
calibration data
PRINT_CONFIG_MSG("USE_INS_NAV_INIT defaulting to TRUE")
#define BMP280_DATA_START_REG_ADDR
uint32_t raw_temperature
uncompensated temperature
#define BMP280_OVERSAMPLING_8X_P
#define BMP280_CONFIG_LEN
#define BMP280_STATUS_REG_ADDR
static void parse_sensor_data(struct Bmp280_I2c *bmp)
local function to extract raw data from i2c buffer and compute compensation with selected precision
@ I2CTransDone
transaction set to done by user level
Sensor driver for BMP280 sensor via I2C.
void bmp280_i2c_periodic(struct Bmp280_I2c *bmp)
#define BMP280_CALIB_LSB_DATA_ADDR
#define BMP280_P_T_DATA_LEN
#define BMP280_IIR_FILTER_COEFF_2
#define BMP280_CONFIG_REG_ADDR
#define BMP280_CALIB_DATA_LEN
float pressure
pressure in Pascal
static double compensate_pressure(struct Bmp280_I2c *bmp)
This internal API is used to compensate the raw pressure data and return the compensated pressure dat...