1 |
set terminal png |
1 |
set terminal png |
2 |
set output "temperature.png" |
2 |
set output "temperature.png" |
3 |
|
3 |
|
4 |
set key under |
4 |
set key under |
5 |
set xlabel "ADC value [-]" |
5 |
set xlabel "ADC value [-]" |
6 |
set ylabel "Temperature [°C]" |
6 |
set ylabel "Temperature [°C]" |
7 |
|
7 |
|
8 |
f(x)= k*x + q |
8 |
f(x)= k*x + q |
9 |
fit f(x) "calibration_data.txt" using 2:1 via k,q |
9 |
fit f(x) "calibration_data.txt" using 2:1 via k,q |
10 |
|
10 |
|
11 |
|
11 |
|
12 |
# from http://hw.cz/docs/mereni_teploty/mereni_teploty_1.html/ |
12 |
# from http://hw.cz/docs/mereni_teploty/mereni_teploty_1.html/ |
13 |
A=3.90802e-3 |
13 |
A=3.90802e-3 |
14 |
B=-5.802e-7 |
14 |
B=-5.802e-7 |
15 |
g(x)=(-A + sqrt(A*A - 4*B*(1.0 - 1.0*x*2350.0/1024.0/1000.0)))/2.0/B; |
15 |
g(x)=(-A + sqrt(A*A - 4*B*(1.0 - 1.0*x*2350.0/1024.0/1000.0)))/2.0/B; |
16 |
|
16 |
|
17 |
plot "calibration_data.txt" using 2:1 with points title "measured points", f(x) title "0.674201 * x - 294.35", g(x) title "original hw.cz" |
17 |
plot "calibration_data.txt" using 2:1 with points title "measured points", f(x) title "0.674201 * x - 294.35", g(x) title "original hw.cz" |