metaclass: (Default)
[personal profile] metaclass
MPX4115A,DS18B20,ATmega,F#,C#,Firebird,SQL,bat-файлы и rrdtool.

select 'update pressure_zero.rrd '||
        cast((pressure.MC_DTDATA-cast('1970.01.01 00:00:00' as timestamp))*86400 as numeric(18))||':'||
        cast(pressure.MC_CALCVALUE/exp(-0.029*9.81*205/(8.31*(temperature.mc_calcvalue+273.15)))        as varchar(20))||''
from MeteoCurrent pressure
join MeteoCurrent temperature on temperature.mc_sens_id=1
 where pressure.MC_SENS_ID=8;


D:\Programm\Firebird25\bin\isql.exe fb25:meteo -u METEO -p meteopassword -ch WIN1251 -b -i export_rrd.sql | grep update >data.tmp
D:\Programm\rrdtool\rrdtool.exe -<data.tmp

Давление:



Температура:




Пересчет давления с датчика в давление на уровне моря и складирование его в rrdtool.

Date: 2011-01-16 11:24 am (UTC)
From: [identity profile] metaclass.livejournal.com
Проверил с трех разных мест - грузятся :)

Date: 2011-01-16 11:25 am (UTC)
From: [identity profile] denisioru.livejournal.com
Пруфпик

Date: 2011-01-16 11:28 am (UTC)
From: [identity profile] metaclass.livejournal.com
Черви днс погрызли.

Profile

metaclass: (Default)
metaclass

April 2017

S M T W T F S
      1
2345678
9101112 131415
16171819202122
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 25th, 2025 01:53 pm
Powered by Dreamwidth Studios