Atmel Software Framework

bmp_caldata_t Struct Reference

BMP085 & BMP180 calibration coeffs.

Every sensor module has unique individual coefficients stored in the device EEPROM. Before pressure and temperature can be calculated these values must be read and stored for use in the compensated (i.e. "real") temperature and pressure calculations.

This data structure and macros below define a type that stores calibration coefficients for Bosch BMP085, BMP180, or SMD500 pressure sensors. The fields are named per the Bosch documentation defining the compensated temperature and pressure equations that require these coefficients.

The driver currently statically allocates storage for only one copy of the calibration coefficients. In the event that a system is built with multiple BMP085 (for example) pressure sensors this scheme will not work, as each physical device will require a device-specific copy of the coeffs for use in compensated temperature and pressure calculations for the device.

Data Fields

int16_t ac1
 
int16_t ac2
 
int16_t ac3
 
uint16_t ac4
 
uint16_t ac5
 
uint16_t ac6
 
int16_t b1
 
int16_t b2
 
int16_t mb
 
int16_t mc
 
int16_t md
 

int16_t bmp_caldata_t::ac1
int16_t bmp_caldata_t::ac2
int16_t bmp_caldata_t::ac3
uint16_t bmp_caldata_t::ac4
uint16_t bmp_caldata_t::ac5
uint16_t bmp_caldata_t::ac6
int16_t bmp_caldata_t::b1
int16_t bmp_caldata_t::b2
int16_t bmp_caldata_t::mb
int16_t bmp_caldata_t::mc
int16_t bmp_caldata_t::md