In relation to the original question, I have found inconsistency among API and Datasheet for the calculation of gas sensor heater resistance. Page 21 of Datasheet shows floating point and integer calculations but they are not equivalent. var1 in integer calculation is (amb_temp*par_g3/10)<<8, but the floating point method calculates this part as (amb_temp*par_g3*10)<<8 (var1 in the floating point method is different from that in the integer method, so I have deduced this result by rearranging the entire floating point formulae). Moreover, the integer calculation in API is var1=(amb_temp*par_g3)/1000)*256 (small modifications made for clarity) in line 1006 of bme680.c. The floating point calculation in API looks the same as that in Datasheet. So, there are three variations in calculating var1 or its equivalent, each 100 times different from another. Could you tell me which is correct, and hopefully fix the incorrect formulae? Thank you.
... View more