var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1785189647000,20.25000000],[1785189771000,20.20000000],[1785190079000,20.06000000],[1785190389000,19.96000000],[1785190698000,19.82000000],[1785191006000,19.80000000],[1785191253000,19.86000000],[1785191562000,19.90000000],[1785191871000,19.90000000],[1785192545000,19.97500000],[1785192792000,19.92000000],[1785193100000,19.94000000],[1785193409000,19.92500000],[1785193656000,19.80000000],[1785193964000,19.72000000],[1785194273000,19.60000000],[1785194582000,19.56000000],[1785194890000,19.50000000],[1785195199000,19.48000000],[1785195508000,19.42500000],[1785195756000,19.52000000],[1785196065000,19.46000000],[1785196374000,19.40000000],[1785196688000,19.40000000],[1785197002000,19.50000000],[1785197308000,19.50000000],[1785197555000,19.54000000],[1785197864000,19.56000000],[1785198176000,19.70000000],[1785198486000,19.78000000],[1785198794000,19.78000000],[1785199103000,19.80000000],[1785199351000,19.94000000],[1785199660000,19.92000000],[1785199968000,19.96000000],[1785200277000,19.98000000],[1785200587000,19.88000000],[1785200895000,19.76000000],[1785201204000,19.77500000],[1785201451000,19.80000000],[1785201761000,19.86000000],[1785202502000,19.90000000],[1785202688000,19.94000000],[1785203003000,19.92000000],[1785203311000,19.95000000],[1785203560000,19.90000000],[1785203868000,19.94000000],[1785204177000,19.96000000],[1785204486000,19.90000000],[1785204794000,19.90000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1785189647000,12],[1785189771000,12.1],[1785190079000,12],[1785190389000,12],[1785190698000,12],[1785191006000,12],[1785191253000,11.9],[1785191562000,11.9],[1785191871000,11.9],[1785192545000,11.9],[1785192792000,11.8],[1785193100000,11.8],[1785193409000,11.8],[1785193656000,11.8],[1785193964000,11.8],[1785194273000,11.7],[1785194582000,11.8],[1785194890000,11.8],[1785195199000,11.8],[1785195508000,11.7],[1785195756000,11.8],[1785196065000,11.8],[1785196374000,11.8],[1785196688000,11.7],[1785197002000,11.8],[1785197308000,11.8],[1785197555000,11.9],[1785197864000,11.8],[1785198176000,11.9],[1785198486000,12],[1785198794000,12],[1785199103000,12],[1785199351000,12],[1785199660000,12],[1785199968000,12],[1785200277000,12],[1785200587000,12],[1785200895000,12],[1785201204000,12],[1785201451000,12],[1785201761000,11.9],[1785202502000,11.9],[1785202688000,11.9],[1785203003000,11.9],[1785203311000,12.1],[1785203560000,11.9],[1785203868000,11.9],[1785204177000,12],[1785204486000,11.9],[1785204794000,11.9],], color: '#5b9f4a' } ]; var options = { xaxes: [{ axisLabel: 'temperature', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.1°C' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-temperature-legend' } }; graphs['#chart-temperature'] = $.plot('#chart-temperature', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Vlhkosť (%)', data: [[1785189647000,59.30000000],[1785189771000,59.62000000],[1785190079000,60.00000000],[1785190389000,60.46000000],[1785190698000,60.74000000],[1785191006000,60.72500000],[1785191253000,60.28000000],[1785191562000,60.18000000],[1785191871000,60.10000000],[1785192545000,59.67500000],[1785192792000,59.66000000],[1785193100000,59.76000000],[1785193409000,59.80000000],[1785193656000,60.16000000],[1785193964000,60.42000000],[1785194273000,60.64000000],[1785194582000,60.96000000],[1785194890000,61.38000000],[1785195199000,61.34000000],[1785195508000,60.97500000],[1785195756000,61.18000000],[1785196065000,61.36000000],[1785196374000,61.58000000],[1785196688000,61.30000000],[1785197002000,61.16666667],[1785197308000,61.25000000],[1785197555000,61.36000000],[1785197864000,61.20000000],[1785198176000,61.04000000],[1785198486000,60.86000000],[1785198794000,61.00000000],[1785199103000,60.92500000],[1785199351000,60.52000000],[1785199660000,60.46000000],[1785199968000,60.30000000],[1785200277000,60.14000000],[1785200587000,60.56000000],[1785200895000,60.98000000],[1785201204000,60.92500000],[1785201451000,60.74000000],[1785201761000,60.46000000],[1785202502000,60.23333333],[1785202688000,60.14000000],[1785203003000,60.26000000],[1785203311000,60.55000000],[1785203560000,60.18000000],[1785203868000,60.08000000],[1785204177000,60.22000000],[1785204486000,60.30000000],[1785204794000,60.13333333],], color: '#ff9000' } ]; var options = { xaxes: [{ axisLabel: 'humidity', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.1%' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-humidity-legend' } }; graphs['#chart-humidity'] = $.plot('#chart-humidity', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Atmosférický tlak (hPa)', data: [[1785189647000,1018.4],[1785189771000,1018.3],[1785190079000,1018.4],[1785190389000,1018.5],[1785190698000,1018.6],[1785191006000,1018.7],[1785191253000,1018.6],[1785191562000,1018.7],[1785191871000,1018.7],[1785192545000,1018.8],[1785192792000,1018.8],[1785193100000,1018.8],[1785193409000,1018.9],[1785193656000,1018.8],[1785193964000,1018.9],[1785194273000,1018.9],[1785194582000,1019],[1785194890000,1019],[1785195199000,1019.1],[1785195508000,1019.1],[1785195756000,1019.1],[1785196065000,1019.2],[1785196374000,1019.3],[1785196688000,1019.3],[1785197002000,1019.3],[1785197308000,1019.4],[1785197555000,1019.5],[1785197864000,1019.5],[1785198176000,1019.6],[1785198486000,1019.6],[1785198794000,1019.6],[1785199103000,1019.7],[1785199351000,1019.7],[1785199660000,1019.6],[1785199968000,1019.7],[1785200277000,1019.8],[1785200587000,1019.9],[1785200895000,1019.9],[1785201204000,1019.9],[1785201451000,1020],[1785201761000,1020],[1785202502000,1020],[1785202688000,1020.1],[1785203003000,1020.1],[1785203311000,1020.1],[1785203560000,1020.1],[1785203868000,1020.1],[1785204177000,1020],[1785204486000,1020.2],[1785204794000,1020.3],], color: '#000000' } ]; var options = { xaxes: [{ axisLabel: 'pressure', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.1hPa' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-pressure-legend' } }; graphs['#chart-pressure'] = $.plot('#chart-pressure', dataset, options); }); $('.modal').on('hide.bs.modal', function() { var memory = $(this).html(); $(this).html(memory); }); function meteo_wind_direction_name(wind_direction) { if (wind_direction >= 0.00 && wind_direction <= 11.25) { ret = 'S'; } else if (wind_direction > 11.25 && wind_direction <= 33.75) { ret = 'SSV'; } else if (wind_direction > 33.75 && wind_direction <= 56.25) { ret = 'SV'; } else if (wind_direction > 56.25 && wind_direction <= 78.75) { // 67.5 ret = 'VSV'; } else if (wind_direction > 78.75 && wind_direction <= 101.25) { // 90 ret = 'V'; } else if (wind_direction > 101.25 && wind_direction <= 123.75) { //112.5 ret = 'VJV'; } else if (wind_direction > 123.75 && wind_direction <= 146.25) { // 135 ret = 'JV'; } else if (wind_direction > 146.25 && wind_direction <= 168.75) { // 157.5 ret = 'JJV'; } else if (wind_direction > 168.75 && wind_direction <= 191.25) { // 180 ret = 'J'; } else if (wind_direction > 191.25 && wind_direction <= 213.75) { // 202.5 ret = 'JJZ'; } else if (wind_direction > 213.75 && wind_direction <= 236.25) { // 225 ret = 'JZ'; } else if (wind_direction > 236.25 && wind_direction <= 258.75) { // 247.5 ret = 'ZJZ'; } else if (wind_direction > 258.75 && wind_direction <= 281.25) { // 270 ret = 'Z'; } else if (wind_direction > 281.25 && wind_direction <= 303.75) { // 292.5 ret = 'ZSZ'; } else if (wind_direction > 303.75 && wind_direction <= 326.25) { // 315 ret = 'SZ'; } else if (wind_direction > 326.25 && wind_direction <= 348.75) { // 337.5 ret = 'SSZ'; } else if (wind_direction > 348.75 && wind_direction <= 360.0) { // 337.5 ret = 'S'; } else { return ''; } return ret; }