/* Calculates a scaled and compensated pressure value from raw data raw: raw temperature value read from Dps310 returns: temperature value in °C  */
int32_t calcTemp(int32_t raw)
/* Calculates a scaled and compensated pressure value from raw data raw: raw temperature value read from Dps310 returns: temperature value in °C  */
int32_t calcTemp(int32_t raw)
{
    double temp = raw;
    temp /= scaling_facts[dps310_ctx.m_tempOsr];
    dps310_ctx.m_lastTempScal = temp;
    temp = dps310_ctx.m_c0Half + dps310_ctx.m_c1 * temp;
    return (int32_t)temp;
}