Page 1 of 1

using virtual Sensor to correct temperature data **SOLVED**

Posted: Sat Jun 06, 2015 1:33 pm
by efiten
Hi All,

I have an outside tem sensor that does not give the correct value due to the placement of the sensor.
In the past I used WeeWX, and I had a conversion script ruiing, to "correct" the output of the temp sensor to the correct values.

this was the calculation :

outTemp = 0.88*(outTemp-7)+7


So now I startet playing with the virtual sensors
as a trivver I use TH0 , that gives me Temp & humidity :

Code: Select all

20150606112403 th0 229 44 0100
20150606112456 th0 230 44 0101
20150606112642 th0 231 44 0102
20150606112828 th0 226 45 0101
So now I creatd a virtual sensor T11 (i only want to correct the temperature)
with as a trigger the TH0 from above, and this as a conversion script :

Code: Select all

awk ' { printf ''%d %d %d %d'', (0.88 * ($2- 7)--7)}'
but this is'nt working.
how do i get the T11 to give me the correct output ?



Erwin

http://weather.on8ar.eu

Re: using virtual Sensor to correct temperature data

Posted: Sun Jun 07, 2015 12:40 am
by admin
Please don't do it this way. There is a sensor calibration feature in Meteohub that takes care of situations like the ones you describe.

Re: using virtual Sensor to correct temperature data

Posted: Sun Jun 07, 2015 1:21 am
by efiten
I know this is not the correct way, but it's the only way I van achieve my calibration.

Around 7 degrees C the reading is correct.
So I use that as my reference point.

Below that, I have to add something to the value, above that, I have to subtract.

So what I do is, from the input temp I subtract 7, multiply that value by 0.88. To the result of this function, I add the 7 degrees again. Like this the temp curve is like I want it to be, and is the same as the stations in my neighbor.

So if you can tell me how I can achieve this with the sensor calibration. That would be great. But with the F(x) =ax+b function, Thuis doesn't look possible.

Erwin

Re: using virtual Sensor to correct temperature data

Posted: Sun Jun 07, 2015 2:12 pm
by admin
I hope you math teacher is not reading here :roll:
You have a linear equation that can be easily transformed:

y = 0.88 * (x - 7) + 7
y = 0.88 x - 7 * 0.88 + 7
y = 0.88 x + 0.84

...and this fist exactly in the offset/factor calibration model of Meteohub :P

Re: using virtual Sensor to correct temperature data

Posted: Sun Jun 07, 2015 2:17 pm
by efiten
Ow :oops:

I should have found out that myself...
A long while ago I was good at math...

I'm glad my math teacher from those days doesn't have a weather station. 8)

Thanks, will try that later today

Erwin