var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1574463610000,7.00000000],[1574464210000,6.90000000],[1574464810000,6.80000000],[1574465410000,6.60000000],[1574466010000,6.60000000],[1574466610000,6.50000000],[1574467211000,6.50000000],[1574467810000,6.50000000],[1574468410000,6.40000000],[1574469011000,6.30000000],[1574469610000,6.20000000],[1574470210000,6.20000000],[1574470811000,6.20000000],[1574471411000,6.10000000],[1574472010000,6.00000000],[1574472610000,5.90000000],[1574473211000,5.90000000],[1574473810000,5.80000000],[1574474410000,5.70000000],[1574475011000,5.60000000],[1574475610000,5.50000000],[1574476210000,5.40000000],[1574476811000,5.40000000],[1574477410000,5.20000000],[1574478010000,4.90000000],[1574478610000,4.90000000],[1574479211000,4.90000000],[1574479810000,4.90000000],[1574480410000,4.90000000],[1574481011000,4.90000000],[1574481610000,4.90000000],[1574482210000,4.90000000],[1574482810000,5.00000000],[1574483410000,5.00000000],[1574484010000,5.00000000],[1574484611000,5.00000000],[1574485210000,5.10000000],[1574485810000,5.20000000],[1574486411000,5.20000000],[1574487011000,5.10000000],[1574487611000,5.10000000],[1574488210000,5.10000000],[1574488811000,5.20000000],[1574489411000,5.10000000],[1574490011000,5.20000000],[1574490610000,5.20000000],[1574491211000,5.40000000],[1574491810000,5.50000000],[1574492410000,5.80000000],[1574493011000,6.00000000],[1574493611000,6.20000000],[1574494210000,6.20000000],[1574494811000,6.30000000],[1574495411000,6.20000000],[1574496010000,6.40000000],[1574496611000,6.60000000],[1574497211000,6.90000000],[1574497810000,7.00000000],[1574498411000,6.90000000],[1574499011000,6.50000000],[1574499611000,6.30000000],[1574500211000,6.30000000],[1574500811000,6.20000000],[1574501411000,6.30000000],[1574502011000,6.30000000],[1574502611000,6.40000000],[1574503211000,6.50000000],[1574503810000,6.50000000],[1574504411000,6.70000000],[1574505011000,6.70000000],[1574505610000,7.00000000],[1574506211000,7.00000000],[1574506811000,6.90000000],[1574507411000,6.90000000],[1574508011000,7.10000000],[1574508610000,7.20000000],[1574509211000,7.10000000],[1574509811000,7.00000000],[1574510411000,7.10000000],[1574511011000,7.20000000],[1574511611000,7.30000000],[1574512211000,7.50000000],[1574512811000,7.40000000],[1574513411000,7.70000000],[1574514011000,7.90000000],[1574514611000,7.90000000],[1574515211000,7.90000000],[1574515811000,7.40000000],[1574516411000,7.20000000],[1574517011000,7.10000000],[1574517611000,7.20000000],[1574518211000,7.20000000],[1574518811000,7.00000000],[1574519411000,6.90000000],[1574520011000,6.80000000],[1574520611000,6.60000000],[1574521211000,6.30000000],[1574521811000,6.30000000],[1574522411000,6.10000000],[1574523011000,6.00000000],[1574523611000,6.00000000],[1574524211000,5.90000000],[1574524811000,5.90000000],[1574525411000,5.90000000],[1574526011000,5.90000000],[1574526611000,5.90000000],[1574527211000,6.10000000],[1574527811000,6.30000000],[1574528412000,6.30000000],[1574529011000,6.40000000],[1574529611000,6.50000000],[1574530211000,6.60000000],[1574530812000,6.60000000],[1574531411000,6.60000000],[1574532012000,6.70000000],[1574532611000,6.70000000],[1574533211000,6.80000000],[1574533812000,6.70000000],[1574534411000,6.80000000],[1574535011000,6.80000000],[1574535612000,6.80000000],[1574536212000,6.90000000],[1574536812000,6.90000000],[1574537411000,6.80000000],[1574538011000,6.80000000],[1574538612000,6.70000000],[1574539212000,6.80000000],[1574539812000,6.90000000],[1574540411000,6.80000000],[1574541011000,6.80000000],[1574541612000,6.70000000],[1574542211000,6.80000000],[1574542811000,6.70000000],[1574543412000,6.70000000],[1574544012000,6.70000000],[1574544612000,6.80000000],[1574545211000,6.70000000],[1574545812000,6.70000000],[1574546412000,6.70000000],[1574547011000,6.70000000],[1574547612000,6.60000000],[1574548212000,6.60000000],[1574548812000,6.50000000],[1574549411000,6.50000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1574463610000,3.6],[1574464210000,3.5],[1574464810000,3.4],[1574465410000,3.2],[1574466010000,3.2],[1574466610000,3.2],[1574467211000,3.2],[1574467810000,3.2],[1574468410000,3.1],[1574469011000,3.1],[1574469610000,3],[1574470210000,3],[1574470811000,3],[1574471411000,2.9],[1574472010000,2.8],[1574472610000,2.7],[1574473211000,2.8],[1574473810000,2.7],[1574474410000,2.7],[1574475011000,2.6],[1574475610000,2.5],[1574476210000,2.4],[1574476811000,2.4],[1574477410000,2.2],[1574478010000,1.9],[1574478610000,1.9],[1574479211000,1.9],[1574479810000,1.8],[1574480410000,1.8],[1574481011000,1.8],[1574481610000,1.8],[1574482210000,1.8],[1574482810000,1.8],[1574483410000,1.8],[1574484010000,1.8],[1574484611000,1.7],[1574485210000,1.8],[1574485810000,1.9],[1574486411000,2],[1574487011000,1.9],[1574487611000,1.9],[1574488210000,1.9],[1574488811000,2],[1574489411000,1.9],[1574490011000,2],[1574490610000,2],[1574491211000,2.1],[1574491810000,2.2],[1574492410000,2.4],[1574493011000,2.6],[1574493611000,2.7],[1574494210000,2.6],[1574494811000,2.7],[1574495411000,2.5],[1574496010000,2.7],[1574496611000,2.8],[1574497211000,3],[1574497810000,3],[1574498411000,2.8],[1574499011000,2.5],[1574499611000,2.4],[1574500211000,2.4],[1574500811000,2.4],[1574501411000,2.5],[1574502011000,2.4],[1574502611000,2.5],[1574503211000,2.5],[1574503810000,2.5],[1574504411000,2.8],[1574505011000,2.6],[1574505610000,3],[1574506211000,2.9],[1574506811000,2.9],[1574507411000,2.9],[1574508011000,3.1],[1574508610000,3.2],[1574509211000,3],[1574509811000,3],[1574510411000,3.1],[1574511011000,3.2],[1574511611000,3.2],[1574512211000,3.4],[1574512811000,3.3],[1574513411000,3.6],[1574514011000,3.7],[1574514611000,3.7],[1574515211000,3.6],[1574515811000,3.2],[1574516411000,3.2],[1574517011000,3.1],[1574517611000,3.3],[1574518211000,3.4],[1574518811000,3.2],[1574519411000,3.2],[1574520011000,3.1],[1574520611000,3],[1574521211000,2.9],[1574521811000,3],[1574522411000,2.8],[1574523011000,2.8],[1574523611000,2.8],[1574524211000,2.8],[1574524811000,2.9],[1574525411000,2.9],[1574526011000,2.9],[1574526611000,3],[1574527211000,3.2],[1574527811000,3.4],[1574528412000,3.4],[1574529011000,3.5],[1574529611000,3.6],[1574530211000,3.6],[1574530812000,3.6],[1574531411000,3.6],[1574532012000,3.7],[1574532611000,3.7],[1574533211000,3.8],[1574533812000,3.7],[1574534411000,3.8],[1574535011000,3.8],[1574535612000,3.8],[1574536212000,3.8],[1574536812000,3.8],[1574537411000,3.7],[1574538011000,3.7],[1574538612000,3.6],[1574539212000,3.7],[1574539812000,3.7],[1574540411000,3.7],[1574541011000,3.7],[1574541612000,3.6],[1574542211000,3.8],[1574542811000,3.7],[1574543412000,3.7],[1574544012000,3.7],[1574544612000,3.8],[1574545211000,3.6],[1574545812000,3.6],[1574546412000,3.6],[1574547011000,3.6],[1574547612000,3.4],[1574548212000,3.4],[1574548812000,3.3],[1574549411000,3.3],], 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: [[1574463610000,79.40000000],[1574464210000,79.20000000],[1574464810000,79.20000000],[1574465410000,79.20000000],[1574466010000,79.40000000],[1574466610000,79.60000000],[1574467211000,79.80000000],[1574467810000,79.60000000],[1574468410000,79.80000000],[1574469011000,80.00000000],[1574469610000,80.00000000],[1574470210000,80.00000000],[1574470811000,80.00000000],[1574471411000,80.00000000],[1574472010000,80.20000000],[1574472610000,80.40000000],[1574473211000,80.60000000],[1574473810000,80.80000000],[1574474410000,81.20000000],[1574475011000,81.00000000],[1574475610000,81.00000000],[1574476210000,81.00000000],[1574476811000,81.00000000],[1574477410000,81.00000000],[1574478010000,81.20000000],[1574478610000,81.00000000],[1574479211000,81.20000000],[1574479810000,80.80000000],[1574480410000,80.60000000],[1574481011000,80.60000000],[1574481610000,80.40000000],[1574482210000,80.40000000],[1574482810000,80.00000000],[1574483410000,80.00000000],[1574484010000,80.00000000],[1574484611000,79.60000000],[1574485210000,79.40000000],[1574485810000,79.60000000],[1574486411000,79.80000000],[1574487011000,79.80000000],[1574487611000,79.80000000],[1574488210000,79.80000000],[1574488811000,79.80000000],[1574489411000,79.80000000],[1574490011000,79.80000000],[1574490610000,79.80000000],[1574491211000,79.80000000],[1574491810000,79.60000000],[1574492410000,79.20000000],[1574493011000,78.80000000],[1574493611000,78.40000000],[1574494210000,77.80000000],[1574494811000,77.80000000],[1574495411000,77.60000000],[1574496010000,77.60000000],[1574496611000,77.00000000],[1574497211000,76.60000000],[1574497810000,76.20000000],[1574498411000,75.40000000],[1574499011000,76.00000000],[1574499611000,76.60000000],[1574500211000,76.60000000],[1574500811000,76.80000000],[1574501411000,76.80000000],[1574502011000,76.20000000],[1574502611000,76.20000000],[1574503211000,75.80000000],[1574503810000,76.00000000],[1574504411000,76.20000000],[1574505011000,75.60000000],[1574505610000,76.00000000],[1574506211000,75.60000000],[1574506811000,75.80000000],[1574507411000,76.00000000],[1574508011000,75.80000000],[1574508610000,75.80000000],[1574509211000,75.60000000],[1574509811000,76.00000000],[1574510411000,75.80000000],[1574511011000,75.80000000],[1574511611000,75.60000000],[1574512211000,75.60000000],[1574512811000,75.40000000],[1574513411000,75.40000000],[1574514011000,74.80000000],[1574514611000,75.00000000],[1574515211000,74.60000000],[1574515811000,75.20000000],[1574516411000,76.00000000],[1574517011000,76.20000000],[1574517611000,76.40000000],[1574518211000,76.80000000],[1574518811000,77.00000000],[1574519411000,77.40000000],[1574520011000,77.60000000],[1574520611000,78.20000000],[1574521211000,79.00000000],[1574521811000,79.40000000],[1574522411000,79.80000000],[1574523011000,80.20000000],[1574523611000,80.40000000],[1574524211000,80.60000000],[1574524811000,81.00000000],[1574525411000,81.20000000],[1574526011000,81.40000000],[1574526611000,81.80000000],[1574527211000,81.80000000],[1574527811000,81.80000000],[1574528412000,81.80000000],[1574529011000,81.80000000],[1574529611000,81.80000000],[1574530211000,81.60000000],[1574530812000,81.60000000],[1574531411000,81.60000000],[1574532012000,81.60000000],[1574532611000,81.60000000],[1574533211000,81.40000000],[1574533812000,81.40000000],[1574534411000,81.40000000],[1574535011000,81.40000000],[1574535612000,81.20000000],[1574536212000,81.00000000],[1574536812000,80.80000000],[1574537411000,80.80000000],[1574538011000,80.60000000],[1574538612000,80.80000000],[1574539212000,80.60000000],[1574539812000,80.40000000],[1574540411000,80.60000000],[1574541011000,80.80000000],[1574541612000,81.00000000],[1574542211000,81.20000000],[1574542811000,81.20000000],[1574543412000,81.20000000],[1574544012000,81.20000000],[1574544612000,81.20000000],[1574545211000,81.00000000],[1574545812000,81.00000000],[1574546412000,80.80000000],[1574547011000,80.60000000],[1574547612000,80.40000000],[1574548212000,80.20000000],[1574548812000,80.20000000],[1574549411000,80.20000000],], 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: [[1574463610000,1021.2],[1574464210000,1021.2],[1574464810000,1021.2],[1574465410000,1021.1],[1574466010000,1021.1],[1574466610000,1021],[1574467211000,1021],[1574467810000,1021],[1574468410000,1020.9],[1574469011000,1021],[1574469610000,1021],[1574470210000,1021.1],[1574470811000,1021.1],[1574471411000,1021.1],[1574472010000,1021],[1574472610000,1020.9],[1574473211000,1020.9],[1574473810000,1020.9],[1574474410000,1020.9],[1574475011000,1020.9],[1574475610000,1020.9],[1574476210000,1021],[1574476811000,1021.1],[1574477410000,1021.1],[1574478010000,1021.2],[1574478610000,1021.2],[1574479211000,1021.3],[1574479810000,1021.3],[1574480410000,1021.4],[1574481011000,1021.3],[1574481610000,1021.3],[1574482210000,1021.4],[1574482810000,1021.3],[1574483410000,1021.3],[1574484010000,1021.4],[1574484611000,1021.2],[1574485210000,1021.1],[1574485810000,1021],[1574486411000,1021],[1574487011000,1021],[1574487611000,1020.9],[1574488210000,1020.9],[1574488811000,1020.8],[1574489411000,1020.8],[1574490011000,1020.8],[1574490610000,1020.8],[1574491211000,1020.8],[1574491810000,1020.8],[1574492410000,1020.8],[1574493011000,1020.9],[1574493611000,1021],[1574494210000,1021.1],[1574494811000,1021],[1574495411000,1021.1],[1574496010000,1020.9],[1574496611000,1020.9],[1574497211000,1020.8],[1574497810000,1020.7],[1574498411000,1020.8],[1574499011000,1020.9],[1574499611000,1020.9],[1574500211000,1020.9],[1574500811000,1020.9],[1574501411000,1020.9],[1574502011000,1020.9],[1574502611000,1020.7],[1574503211000,1020.4],[1574503810000,1020.2],[1574504411000,1019.9],[1574505011000,1019.9],[1574505610000,1019.8],[1574506211000,1019.8],[1574506811000,1019.9],[1574507411000,1019.8],[1574508011000,1019.6],[1574508610000,1019.5],[1574509211000,1019.4],[1574509811000,1019.3],[1574510411000,1019.1],[1574511011000,1018.9],[1574511611000,1018.8],[1574512211000,1018.7],[1574512811000,1018.7],[1574513411000,1018.6],[1574514011000,1018.5],[1574514611000,1018.5],[1574515211000,1018.5],[1574515811000,1018.6],[1574516411000,1018.5],[1574517011000,1018.6],[1574517611000,1018.5],[1574518211000,1018.6],[1574518811000,1018.7],[1574519411000,1018.7],[1574520011000,1018.7],[1574520611000,1018.8],[1574521211000,1018.7],[1574521811000,1018.7],[1574522411000,1018.7],[1574523011000,1018.8],[1574523611000,1018.9],[1574524211000,1018.9],[1574524811000,1019],[1574525411000,1018.9],[1574526011000,1018.9],[1574526611000,1018.9],[1574527211000,1018.9],[1574527811000,1018.9],[1574528412000,1019.1],[1574529011000,1019.1],[1574529611000,1019.1],[1574530211000,1019.2],[1574530812000,1019.1],[1574531411000,1019.2],[1574532012000,1019.3],[1574532611000,1019.4],[1574533211000,1019.4],[1574533812000,1019.4],[1574534411000,1019.4],[1574535011000,1019.5],[1574535612000,1019.6],[1574536212000,1019.6],[1574536812000,1019.5],[1574537411000,1019.6],[1574538011000,1019.6],[1574538612000,1019.6],[1574539212000,1019.5],[1574539812000,1019.4],[1574540411000,1019.6],[1574541011000,1019.6],[1574541612000,1019.6],[1574542211000,1019.5],[1574542811000,1019.5],[1574543412000,1019.6],[1574544012000,1019.6],[1574544612000,1019.7],[1574545211000,1019.8],[1574545812000,1019.8],[1574546412000,1019.8],[1574547011000,1019.8],[1574547612000,1019.8],[1574548212000,1019.8],[1574548812000,1019.8],[1574549411000,1019.8],], 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); }); $(document).ready(function() { dataset = [ { label: 'Slnečné žiarenie (W/m2)', data: [[1574463610000,0.00000000],[1574464210000,0.00000000],[1574464810000,0.00000000],[1574465410000,0.00000000],[1574466010000,0.00000000],[1574466610000,0.00000000],[1574467211000,0.00000000],[1574467810000,0.00000000],[1574468410000,0.00000000],[1574469011000,0.00000000],[1574469610000,0.00000000],[1574470210000,0.00000000],[1574470811000,0.00000000],[1574471411000,0.00000000],[1574472010000,0.00000000],[1574472610000,0.00000000],[1574473211000,0.00000000],[1574473810000,0.00000000],[1574474410000,0.00000000],[1574475011000,0.00000000],[1574475610000,0.00000000],[1574476210000,0.00000000],[1574476811000,0.00000000],[1574477410000,0.00000000],[1574478010000,0.00000000],[1574478610000,0.00000000],[1574479211000,0.00000000],[1574479810000,0.00000000],[1574480410000,0.00000000],[1574481011000,0.00000000],[1574481610000,0.00000000],[1574482210000,0.00000000],[1574482810000,0.00000000],[1574483410000,0.00000000],[1574484010000,0.00000000],[1574484611000,0.00000000],[1574485210000,0.00000000],[1574485810000,0.00000000],[1574486411000,0.00000000],[1574487011000,0.00000000],[1574487611000,0.00000000],[1574488210000,0.00000000],[1574488811000,2.00000000],[1574489411000,6.00000000],[1574490011000,16.00000000],[1574490610000,28.00000000],[1574491211000,38.00000000],[1574491810000,62.00000000],[1574492410000,86.00000000],[1574493011000,100.00000000],[1574493611000,108.00000000],[1574494210000,112.00000000],[1574494811000,150.00000000],[1574495411000,132.00000000],[1574496010000,194.00000000],[1574496611000,224.00000000],[1574497211000,270.00000000],[1574497810000,304.00000000],[1574498411000,156.00000000],[1574499011000,122.00000000],[1574499611000,110.00000000],[1574500211000,76.00000000],[1574500811000,76.00000000],[1574501411000,104.00000000],[1574502011000,106.00000000],[1574502611000,124.00000000],[1574503211000,136.00000000],[1574503810000,156.00000000],[1574504411000,186.00000000],[1574505011000,154.00000000],[1574505610000,196.00000000],[1574506211000,184.00000000],[1574506811000,130.00000000],[1574507411000,182.00000000],[1574508011000,198.00000000],[1574508610000,190.00000000],[1574509211000,98.00000000],[1574509811000,84.00000000],[1574510411000,114.00000000],[1574511011000,140.00000000],[1574511611000,192.00000000],[1574512211000,110.00000000],[1574512811000,128.00000000],[1574513411000,234.00000000],[1574514011000,182.00000000],[1574514611000,196.00000000],[1574515211000,132.00000000],[1574515811000,40.00000000],[1574516411000,56.00000000],[1574517011000,56.00000000],[1574517611000,58.00000000],[1574518211000,48.00000000],[1574518811000,40.00000000],[1574519411000,30.00000000],[1574520011000,16.00000000],[1574520611000,10.00000000],[1574521211000,4.00000000],[1574521811000,2.00000000],[1574522411000,0.00000000],[1574523011000,0.00000000],[1574523611000,0.00000000],[1574524211000,0.00000000],[1574524811000,0.00000000],[1574525411000,0.00000000],[1574526011000,0.00000000],[1574526611000,0.00000000],[1574527211000,0.00000000],[1574527811000,0.00000000],[1574528412000,0.00000000],[1574529011000,0.00000000],[1574529611000,0.00000000],[1574530211000,0.00000000],[1574530812000,0.00000000],[1574531411000,0.00000000],[1574532012000,0.00000000],[1574532611000,0.00000000],[1574533211000,0.00000000],[1574533812000,0.00000000],[1574534411000,0.00000000],[1574535011000,0.00000000],[1574535612000,0.00000000],[1574536212000,0.00000000],[1574536812000,0.00000000],[1574537411000,0.00000000],[1574538011000,0.00000000],[1574538612000,0.00000000],[1574539212000,0.00000000],[1574539812000,0.00000000],[1574540411000,0.00000000],[1574541011000,0.00000000],[1574541612000,0.00000000],[1574542211000,0.00000000],[1574542811000,0.00000000],[1574543412000,0.00000000],[1574544012000,0.00000000],[1574544612000,0.00000000],[1574545211000,0.00000000],[1574545812000,0.00000000],[1574546412000,0.00000000],[1574547011000,0.00000000],[1574547612000,0.00000000],[1574548212000,0.00000000],[1574548812000,0.00000000],[1574549411000,0.00000000],], color: '#ffb92f' } ]; var options = { xaxes: [{ axisLabel: 'solar_radiation', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, yaxis: { min: 0, }, 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.1W/m2' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-solar-radiation-legend' } }; graphs['#chart-solar-radiation'] = $.plot('#chart-solar-radiation', 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; }