Hi,
Barometer temperature sensor range is from -40..85°C but the calculation is only for positive values.
if (rslt == BMP5_OK)
{
raw_data_t = (int32_t)((uint32_t)(reg_data[2] << 16) | (uint16_t)(reg_data[1] << 8) | reg_data[0]);
#ifdef BMP5_USE_FIXED_POINT
/* Division by 2^16(whose equivalent value is 65536) is performed to get temperature data and followed by fixed point digit
* precision in deg C
*/
sensor_data->temperature =
(int64_t)((raw_data_t / (int64_t)65536.0) * (power(10, BMP5_FIXED_POINT_DIGIT_PRECISION)));
#else
/* Division by 2^16(whose equivalent value is 65536) is performed to get temperature data in deg C */
sensor_data->temperature = (float)(raw_data_t / 65536.0);
#endif
Hi, Barometer temperature sensor range is from -40..85°C but the calculation is only for positive values.