I decided to improve the temperature conversion. Here's where the curve fitting software come in.
One of them is Curve Expert - can be bought at https://www.curveexpert.net/order, but trial is also available.

After a few tweaks, the polynomial curve fitting method turned out to be the best (5th degree).
double calctemp(short x)
{
double a = 1.445633283634090E+02;
double b = -1.386947619796149E-01;
double c = 9.837913934334235E-05;
double d = -4.486094388070098E-08;
double e = 1.076415627857750E-11;
double f = -1.066640689001453E-15;
return a + b * x + c * pow(x, 2) + d * pow(x, 3) + e * pow(x, 4) + f * pow(x, 5);
}
It turned out that all temperatures are transferred in the same way, so this function can be used to calculate different temperatures - e.g. domestic hot water.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.