var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1787954400000,15.00000000],[1787954580000,14.80000000],[1787954880000,14.80000000],[1787955180000,14.68000000],[1787955480000,14.56000000],[1787955780000,14.52000000],[1787956080000,14.64000000],[1787956380000,14.76000000],[1787956680000,14.74000000],[1787956980000,14.58000000],[1787957280000,14.60000000],[1787957580000,14.70000000],[1787957880000,14.72000000],[1787958180000,14.72000000],[1787958480000,14.78000000],[1787958780000,14.84000000],[1787959080000,14.70000000],[1787959380000,14.64000000],[1787959680000,14.60000000],[1787959980000,14.62000000],[1787960280000,14.92000000],[1787960580000,15.10000000],[1787960880000,15.16000000],[1787961180000,15.22000000],[1787961480000,15.26000000],[1787961780000,15.30000000],[1787962080000,15.36000000],[1787962380000,15.54000000],[1787962680000,15.66000000],[1787962980000,15.80000000],[1787963280000,15.80000000],[1787963580000,15.88000000],[1787963880000,15.88000000],[1787964180000,15.78000000],[1787964480000,15.78000000],[1787964780000,15.74000000],[1787965080000,15.74000000],[1787965380000,15.90000000],[1787965680000,16.04000000],[1787965980000,16.16000000],[1787966280000,16.20000000],[1787966580000,16.20000000],[1787966880000,16.22000000],[1787967180000,16.30000000],[1787967480000,16.44000000],[1787967780000,16.46000000],[1787968080000,16.66000000],[1787968380000,16.74000000],[1787968680000,16.90000000],[1787968980000,17.02000000],[1787969280000,17.00000000],[1787969580000,16.94000000],[1787969880000,16.88000000],[1787970180000,16.58000000],[1787970480000,16.10000000],[1787970780000,15.86000000],[1787971080000,15.70000000],[1787971380000,15.62000000],[1787971680000,15.70000000],[1787971980000,15.80000000],[1787972280000,15.78000000],[1787972580000,15.70000000],[1787972880000,15.80000000],[1787973180000,15.74000000],[1787973480000,15.70000000],[1787973780000,15.60000000],[1787974080000,15.60000000],[1787974380000,15.58000000],[1787974680000,15.54000000],[1787974980000,15.50000000],[1787975280000,15.36000000],[1787975580000,15.24000000],[1787975880000,15.14000000],[1787976180000,15.18000000],[1787976480000,15.20000000],[1787976780000,15.14000000],[1787977080000,15.06000000],[1787977380000,15.00000000],[1787977680000,15.00000000],[1787977980000,14.94000000],[1787978280000,14.90000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1787954400000,5.8],[1787954580000,5.7],[1787954880000,5.6],[1787955180000,6.1],[1787955480000,6.1],[1787955780000,6.2],[1787956080000,6.1],[1787956380000,6.2],[1787956680000,6.3],[1787956980000,6.4],[1787957280000,6.2],[1787957580000,6],[1787957880000,5.7],[1787958180000,5.6],[1787958480000,5.5],[1787958780000,5.5],[1787959080000,5.8],[1787959380000,6.2],[1787959680000,6.3],[1787959980000,6.4],[1787960280000,5.6],[1787960580000,6.5],[1787960880000,6.3],[1787961180000,6],[1787961480000,6.5],[1787961780000,6.5],[1787962080000,6.2],[1787962380000,5.7],[1787962680000,5.9],[1787962980000,5.9],[1787963280000,5.8],[1787963580000,5.5],[1787963880000,5.8],[1787964180000,5.3],[1787964480000,5.3],[1787964780000,5.4],[1787965080000,5.5],[1787965380000,5.4],[1787965680000,5.9],[1787965980000,6.3],[1787966280000,6.9],[1787966580000,6.9],[1787966880000,6.8],[1787967180000,7],[1787967480000,6.7],[1787967780000,7.1],[1787968080000,6.6],[1787968380000,6.7],[1787968680000,6.2],[1787968980000,6.7],[1787969280000,6.9],[1787969580000,7.1],[1787969880000,7.4],[1787970180000,6.9],[1787970480000,6.1],[1787970780000,5.8],[1787971080000,5.7],[1787971380000,5.7],[1787971680000,5.6],[1787971980000,5.6],[1787972280000,6.1],[1787972580000,6],[1787972880000,5.7],[1787973180000,5.9],[1787973480000,5.8],[1787973780000,6.1],[1787974080000,5.9],[1787974380000,6.1],[1787974680000,6.1],[1787974980000,6.3],[1787975280000,6.7],[1787975580000,6.5],[1787975880000,7],[1787976180000,6.1],[1787976480000,6.3],[1787976780000,6.3],[1787977080000,6.5],[1787977380000,6.4],[1787977680000,6.5],[1787977980000,6.6],[1787978280000,6.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() { var dataset = [{label: "5 cm nad povrchom (\u00b0C)", data: [[1787954400000,11.73333333],[1787954580000,11.70000000],[1787954880000,11.94000000],[1787955180000,11.96000000],[1787955480000,12.08000000],[1787955780000,12.16000000],[1787956080000,12.26000000],[1787956380000,12.30000000],[1787956680000,12.22000000],[1787956980000,11.98000000],[1787957280000,11.88000000],[1787957580000,11.84000000],[1787957880000,11.80000000],[1787958180000,11.74000000],[1787958480000,11.78000000],[1787958780000,12.02000000],[1787959080000,12.36000000],[1787959380000,12.76000000],[1787959680000,13.08000000],[1787959980000,13.46000000],[1787960280000,13.78000000],[1787960580000,13.82000000],[1787960880000,13.88000000],[1787961180000,13.98000000],[1787961480000,14.06000000],[1787961780000,14.12000000],[1787962080000,14.20000000],[1787962380000,14.34000000],[1787962680000,14.20000000],[1787962980000,14.34000000],[1787963280000,14.06000000],[1787963580000,14.24000000],[1787963880000,14.08000000],[1787964180000,13.80000000],[1787964480000,13.68000000],[1787964780000,14.06000000],[1787965080000,14.36000000],[1787965380000,14.66000000],[1787965680000,14.78000000],[1787965980000,14.82000000],[1787966280000,14.90000000],[1787966580000,14.98000000],[1787966880000,15.00000000],[1787967180000,15.00000000],[1787967480000,15.16000000],[1787967780000,15.14000000],[1787968080000,15.26000000],[1787968380000,15.34000000],[1787968680000,15.64000000],[1787968980000,15.66000000],[1787969280000,15.52000000],[1787969580000,15.54000000],[1787969880000,15.48000000],[1787970180000,15.38000000],[1787970480000,15.04000000],[1787970780000,14.88000000],[1787971080000,14.78000000],[1787971380000,14.74000000],[1787971680000,14.80000000],[1787971980000,14.88000000],[1787972280000,14.70000000],[1787972580000,14.64000000],[1787972880000,14.78000000],[1787973180000,14.62000000],[1787973480000,14.66000000],[1787973780000,14.56000000],[1787974080000,14.60000000],[1787974380000,14.58000000],[1787974680000,14.60000000],[1787974980000,14.50000000],[1787975280000,14.34000000],[1787975580000,14.30000000],[1787975880000,14.20000000],[1787976180000,14.26000000],[1787976480000,14.28000000],[1787976780000,14.28000000],[1787977080000,14.22000000],[1787977380000,14.20000000],[1787977680000,14.20000000],[1787977980000,14.20000000],[1787978280000,14.30000000],], color: "#f39c12"}]; var options = { 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-ground-temperature-legend' } }; graphs['#chart-ground-temperature'] = $.plot('#chart-ground-temperature', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Vlhkosť (%)', data: [[1787954400000,54.40000000],[1787954580000,54.84000000],[1787954880000,54.22000000],[1787955180000,56.72000000],[1787955480000,57.00000000],[1787955780000,57.68000000],[1787956080000,56.94000000],[1787956380000,56.86000000],[1787956680000,57.22000000],[1787956980000,58.16000000],[1787957280000,57.18000000],[1787957580000,56.14000000],[1787957880000,55.00000000],[1787958180000,54.46000000],[1787958480000,53.92000000],[1787958780000,53.84000000],[1787959080000,55.50000000],[1787959380000,57.06000000],[1787959680000,57.66000000],[1787959980000,57.96000000],[1787960280000,53.82000000],[1787960580000,56.84000000],[1787960880000,55.72000000],[1787961180000,54.50000000],[1787961480000,56.14000000],[1787961780000,55.94000000],[1787962080000,54.60000000],[1787962380000,52.34000000],[1787962680000,52.44000000],[1787962980000,51.98000000],[1787963280000,51.68000000],[1787963580000,50.32000000],[1787963880000,51.38000000],[1787964180000,50.10000000],[1787964480000,50.14000000],[1787964780000,50.40000000],[1787965080000,50.90000000],[1787965380000,49.82000000],[1787965680000,51.08000000],[1787965980000,52.26000000],[1787966280000,54.16000000],[1787966580000,54.16000000],[1787966880000,54.00000000],[1787967180000,54.48000000],[1787967480000,52.82000000],[1787967780000,54.26000000],[1787968080000,51.70000000],[1787968380000,51.62000000],[1787968680000,49.54000000],[1787968980000,50.68000000],[1787969280000,51.58000000],[1787969580000,52.64000000],[1787969880000,53.74000000],[1787970180000,53.00000000],[1787970480000,51.80000000],[1787970780000,51.52000000],[1787971080000,51.74000000],[1787971380000,51.92000000],[1787971680000,51.42000000],[1787971980000,50.98000000],[1787972280000,52.72000000],[1787972580000,52.78000000],[1787972880000,51.14000000],[1787973180000,52.08000000],[1787973480000,52.10000000],[1787973780000,53.56000000],[1787974080000,52.84000000],[1787974380000,53.52000000],[1787974680000,53.52000000],[1787974980000,54.58000000],[1787975280000,56.42000000],[1787975580000,56.36000000],[1787975880000,58.54000000],[1787976180000,54.78000000],[1787976480000,55.40000000],[1787976780000,55.94000000],[1787977080000,56.82000000],[1787977380000,56.58000000],[1787977680000,56.96000000],[1787977980000,57.70000000],[1787978280000,56.60000000],], 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: 'Rýchlosť vetra (km/h)', data: [[1787954400000,3.480000012],[1787954580000,2.952],[1787954880000,2.736],[1787955180000,2.664],[1787955480000,1.8],[1787955780000,1.656],[1787956080000,1.728],[1787956380000,2.664],[1787956680000,1.08],[1787956980000,1.296],[1787957280000,1.224],[1787957580000,1.08],[1787957880000,2.088],[1787958180000,3.312],[1787958480000,4.248],[1787958780000,4.176],[1787959080000,3.24],[1787959380000,2.736],[1787959680000,1.512],[1787959980000,2.52],[1787960280000,2.664],[1787960580000,1.368],[1787960880000,1.08],[1787961180000,2.736],[1787961480000,2.736],[1787961780000,2.88],[1787962080000,2.376],[1787962380000,3.312],[1787962680000,3.6],[1787962980000,4.464],[1787963280000,3.816],[1787963580000,4.392],[1787963880000,6.192],[1787964180000,4.392],[1787964480000,3.456],[1787964780000,5.544],[1787965080000,3.6],[1787965380000,5.256],[1787965680000,2.808],[1787965980000,2.736],[1787966280000,1.44],[1787966580000,1.728],[1787966880000,2.736],[1787967180000,2.88],[1787967480000,2.16],[1787967780000,1.944],[1787968080000,3.888],[1787968380000,2.808],[1787968680000,3.168],[1787968980000,3.456],[1787969280000,3.168],[1787969580000,3.312],[1787969880000,3.888],[1787970180000,4.536],[1787970480000,6.048],[1787970780000,4.896],[1787971080000,6.48],[1787971380000,5.904],[1787971680000,6.12],[1787971980000,4.536],[1787972280000,2.736],[1787972580000,3.816],[1787972880000,4.032],[1787973180000,3.096],[1787973480000,4.32],[1787973780000,3.744],[1787974080000,3.384],[1787974380000,3.528],[1787974680000,2.952],[1787974980000,1.656],[1787975280000,2.088],[1787975580000,2.736],[1787975880000,1.656],[1787976180000,2.592],[1787976480000,3.096],[1787976780000,3.384],[1787977080000,3.6],[1787977380000,3.24],[1787977680000,2.088],[1787977980000,4.32],[1787978280000,4.86],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1787954400000,4.68],[1787954580000,4.032],[1787954880000,4.248],[1787955180000,4.536],[1787955480000,2.808],[1787955780000,3.024],[1787956080000,2.664],[1787956380000,3.744],[1787956680000,1.728],[1787956980000,1.8],[1787957280000,1.944],[1787957580000,1.728],[1787957880000,3.096],[1787958180000,4.32],[1787958480000,5.04],[1787958780000,5.112],[1787959080000,3.96],[1787959380000,3.888],[1787959680000,2.448],[1787959980000,3.888],[1787960280000,3.816],[1787960580000,2.304],[1787960880000,1.8],[1787961180000,3.672],[1787961480000,3.744],[1787961780000,4.032],[1787962080000,3.528],[1787962380000,4.68],[1787962680000,4.824],[1787962980000,6.192],[1787963280000,5.256],[1787963580000,6.048],[1787963880000,8.208],[1787964180000,5.832],[1787964480000,4.176],[1787964780000,6.696],[1787965080000,6.192],[1787965380000,7.2],[1787965680000,4.392],[1787965980000,3.96],[1787966280000,2.304],[1787966580000,2.232],[1787966880000,3.528],[1787967180000,3.672],[1787967480000,3.312],[1787967780000,2.664],[1787968080000,4.824],[1787968380000,4.608],[1787968680000,4.752],[1787968980000,4.824],[1787969280000,4.608],[1787969580000,4.608],[1787969880000,5.256],[1787970180000,7.632],[1787970480000,7.776],[1787970780000,7.92],[1787971080000,10.296],[1787971380000,9.936],[1787971680000,10.8],[1787971980000,6.264],[1787972280000,4.176],[1787972580000,5.976],[1787972880000,4.968],[1787973180000,4.68],[1787973480000,6.12],[1787973780000,5.04],[1787974080000,4.608],[1787974380000,4.824],[1787974680000,3.888],[1787974980000,2.232],[1787975280000,2.592],[1787975580000,3.24],[1787975880000,2.808],[1787976180000,3.456],[1787976480000,4.32],[1787976780000,4.248],[1787977080000,4.752],[1787977380000,4.392],[1787977680000,2.88],[1787977980000,5.472],[1787978280000,6.12],], color: '#EF9856', points: { show: true }, lines: { show: false }, } ]; var options = { xaxes: [{ axisLabel: 'wind', }], 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.1km/h' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-wind-legend' } }; graphs['#chart-wind'] = $.plot('#chart-wind', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Smer vetra', data: [[1787954400000,255.20000000],[1787954580000,262.80000000],[1787954880000,314.86000000],[1787955180000,280.30000000],[1787955480000,225.22000000],[1787955780000,213.06000000],[1787956080000,150.20000000],[1787956380000,324.10000000],[1787956680000,324.00000000],[1787956980000,70.58000000],[1787957280000,36.88000000],[1787957580000,54.50000000],[1787957880000,51.18000000],[1787958180000,38.04000000],[1787958480000,19.66000000],[1787958780000,150.48000000],[1787959080000,352.28000000],[1787959380000,214.16000000],[1787959680000,338.20000000],[1787959980000,319.28000000],[1787960280000,326.02000000],[1787960580000,209.98000000],[1787960880000,40.02000000],[1787961180000,34.80000000],[1787961480000,217.86000000],[1787961780000,276.32000000],[1787962080000,93.94000000],[1787962380000,153.02000000],[1787962680000,147.12000000],[1787962980000,25.36000000],[1787963280000,83.54000000],[1787963580000,51.18000000],[1787963880000,29.86000000],[1787964180000,30.26000000],[1787964480000,58.24000000],[1787964780000,26.96000000],[1787965080000,345.74000000],[1787965380000,338.76000000],[1787965680000,333.60000000],[1787965980000,333.30000000],[1787966280000,340.78000000],[1787966580000,100.08000000],[1787966880000,35.80000000],[1787967180000,65.92000000],[1787967480000,30.36000000],[1787967780000,78.54000000],[1787968080000,39.32000000],[1787968380000,216.28000000],[1787968680000,273.70000000],[1787968980000,347.40000000],[1787969280000,344.50000000],[1787969580000,145.76000000],[1787969880000,72.60000000],[1787970180000,74.32000000],[1787970480000,38.66000000],[1787970780000,38.44000000],[1787971080000,32.86000000],[1787971380000,29.38000000],[1787971680000,24.76000000],[1787971980000,42.92000000],[1787972280000,70.28000000],[1787972580000,49.68000000],[1787972880000,44.30000000],[1787973180000,44.16000000],[1787973480000,29.14000000],[1787973780000,100.68000000],[1787974080000,100.66000000],[1787974380000,51.12000000],[1787974680000,73.04000000],[1787974980000,240.54000000],[1787975280000,267.48000000],[1787975580000,249.44000000],[1787975880000,81.20000000],[1787976180000,97.04000000],[1787976480000,44.38000000],[1787976780000,32.86000000],[1787977080000,37.56000000],[1787977380000,47.02000000],[1787977680000,55.24000000],[1787977980000,53.28000000],[1787978280000,41.10000000],], color: '#002f80', points: { show: true }, lines: { show: false }, } ]; var options = { xaxes: [{ axisLabel: 'wind_direction', }], xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, yaxis: { min: 0, max: 360, ticks: [[0, 'S'], [90, 'V'], [180, 'J'], [270, 'Z'], [360, 'S']] }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: function(label, xval, yval, flotItem) { dir = meteo_wind_direction_name(yval); format_date = moment(xval).format('DD.MM., hh:mm') return format_date+' - '+dir; } }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-wind-direction-legend' } }; graphs['#chart-wind-direction'] = $.plot('#chart-wind-direction', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Zrážky', data: [[1787954400000,0],[1787954580000,0],[1787954880000,0],[1787955180000,0],[1787955480000,0],[1787955780000,0],[1787956080000,0],[1787956380000,0],[1787956680000,0],[1787956980000,0],[1787957280000,0],[1787957580000,0],[1787957880000,0],[1787958180000,0],[1787958480000,0],[1787958780000,0],[1787959080000,0],[1787959380000,0],[1787959680000,0],[1787959980000,0],[1787960280000,0],[1787960580000,0],[1787960880000,0],[1787961180000,0],[1787961480000,0],[1787961780000,0],[1787962080000,0],[1787962380000,0],[1787962680000,0],[1787962980000,0],[1787963280000,0],[1787963580000,0],[1787963880000,0],[1787964180000,0],[1787964480000,0],[1787964780000,0],[1787965080000,0],[1787965380000,0],[1787965680000,0],[1787965980000,0],[1787966280000,0],[1787966580000,0],[1787966880000,0],[1787967180000,0],[1787967480000,0],[1787967780000,0],[1787968080000,0],[1787968380000,0],[1787968680000,0],[1787968980000,0],[1787969280000,0],[1787969580000,0],[1787969880000,0],[1787970180000,0],[1787970480000,0],[1787970780000,0],[1787971080000,0],[1787971380000,0],[1787971680000,0],[1787971980000,0],[1787972280000,0],[1787972580000,0],[1787972880000,0],[1787973180000,0],[1787973480000,0],[1787973780000,0],[1787974080000,0],[1787974380000,0],[1787974680000,0],[1787974980000,0],[1787975280000,0],[1787975580000,0],[1787975880000,0],[1787976180000,0],[1787976480000,0],[1787976780000,0],[1787977080000,0],[1787977380000,0],[1787977680000,0],[1787977980000,0],[1787978280000,0],], color: '#008fbf' } ]; var options = { xaxes: [{ axisLabel: 'rain', }], 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.3mm' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-rain-legend' } }; graphs['#chart-rain'] = $.plot('#chart-rain', 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; }