39 def __init__(self, rp, t1, r1, t2, r2, t3, r3):
43 y1 = 1.0 / (t1 + ZERO)
44 y2 = 1.0 / (t2 + ZERO)
45 y3 = 1.0 / (t3 + ZERO)
46 x = (y2 - y1) / (l2 - l1)
47 y = (y3 - y1) / (l3 - l1)
48 c = (y - x) / ((l3 - l2) * (l1 + l2 + l3))
49 b = x - c * (l1**2 + l2**2 + l1*l2)
50 a = y1 - (b + l1**2 *c)*l1
53 print(
"//////////////////////////////////////////////////////////////////////////////////////")
54 print(
"// WARNING: negative coefficient 'c'! Something may be wrong with the measurements! //")
55 print(
"//////////////////////////////////////////////////////////////////////////////////////")