Weather compensation

You may be missing my point, I do understand the logic and background in Automatic Control.

I am almost ready with my project using the PID library and the OneWire library for my sensors.

What I need is a function like this to get my setpoint dynamic:

This is a draft from the old systems programming enviroment Weather compensation module K01.

K01-YIN A005 5.1 Outside temperature sensor.
K01-YUT B001 41.5 Setpoint for the PID to control motorvalve, sensor at boiler outlet.
K01-X1 -30.0
K01-Y1 63.0
K01-X2 -20.0
K01-Y2 56.0
K01-X3 -10.0
K01-Y3 50.0
K01-X4 0.0
K01-Y4 45.0
K01-X5 15.0
K01-Y5 35.0

The possibilty to "bend" the curve to get a summit around zero degrees is very useful.

I have been looking at this:

double x[10] = {0,1,2,3,4,5,6,7,8,9};
double y[10] = {0,0,5,5,0,0,3,4,5,6};
doulbe m[10] = {0,.5,.5,.5.,.25,.25,.75,1,1,1}

Spline stepSpline(x,y,10,0);
Spline linearSpline(x,y,10,1);
Spline hermiteSpline(x,y,m,10); // No neet to specify type since m passed
Spline catmullsSpline(x,y,10,Catmull);

stepSpline.value(5.5); // => 0
linearSpline.value(5.5); // => 1.5

Spline mySpline();
mySpline.setPoints(x,y);
mySpline.setDegree(1);

mySpline.value(5.5); // => 1.5

Is it possible to integrate the outside sensor in the code.

If not, I do appreciate some help with this.

The code:

#include <spline.h>

Spline tempCurve;

void setup(void) {

Serial.begin(9600);

float x[7] = {-30,-20,-10,0.0,15};
float y[7] = {63,56,50,45,35};
tempCurve.setPoints(x,y,7);
tempCurve.setDegree( Catmull );

for( float i = 0; i <= 4; i+= .1 ) {
float temp = tempCurve.value(i);
Serial.print(i);
for(float j=0; j<= temp; j += .2) {
Serial.print( "*" );
}
Serial.print( " " );
Serial.println(temp);
}
}

void loop(void) {

}