Update body temp calc
@@ -375,7 +375,11 @@ class HCIdump(Thread):
def obj0020(xobj):
(temp1, temp2, bat) = TTB_STRUCT.unpack(xobj)
# Body temperature is calculated from the two measured temperatures is a similar way as in the app
- body_temp = 123.993 * math.log10(temp1 / 100) - 73.428 * math.log10(temp2 / 100) - 42.214
+ body_temp = (
+ 3.71934 * pow(10, -11) * math.exp(0.69314 * temp1 / 100)
+ - 1.02801 * pow(10, -8) * math.exp(0.53871 * temp2 / 100)
+ + 36.413
+ )
return {"temperature": body_temp, "battery": bat}
def obj0410(xobj):
