var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1787954400000,13.83333333],[1787954580000,13.72000000],[1787954880000,13.54000000],[1787955180000,13.46000000],[1787955480000,13.34000000],[1787955780000,13.24000000],[1787956080000,13.14000000],[1787956380000,13.06000000],[1787956680000,12.96000000],[1787956980000,12.86000000],[1787957280000,12.80000000],[1787957580000,12.74000000],[1787957880000,12.70000000],[1787958180000,12.70000000],[1787958480000,12.74000000],[1787958780000,12.72000000],[1787959080000,12.80000000],[1787959380000,12.78000000],[1787959680000,12.70000000],[1787959980000,12.70000000],[1787960280000,12.70000000],[1787960580000,12.70000000],[1787960880000,12.72000000],[1787961180000,12.86000000],[1787961480000,13.00000000],[1787961780000,13.16000000],[1787962080000,13.20000000],[1787962380000,13.12000000],[1787962680000,13.04000000],[1787962980000,12.98000000],[1787963280000,12.90000000],[1787963580000,12.82000000],[1787963880000,12.74000000],[1787964180000,12.64000000],[1787964480000,12.60000000],[1787964780000,12.50000000],[1787965080000,12.46000000],[1787965380000,12.46000000],[1787965680000,12.68000000],[1787965980000,12.66000000],[1787966280000,12.58000000],[1787966580000,12.60000000],[1787966880000,12.62000000],[1787967180000,12.70000000],[1787967480000,12.80000000],[1787967780000,12.86000000],[1787968080000,12.80000000],[1787968380000,12.90000000],[1787968680000,13.08000000],[1787968980000,13.32000000],[1787969280000,13.70000000],[1787969580000,13.80000000],[1787969880000,13.88000000],[1787970180000,14.10000000],[1787970480000,14.52000000],[1787970780000,15.20000000],[1787971080000,15.88000000],[1787971380000,16.02000000],[1787971680000,15.82000000],[1787971980000,15.98000000],[1787972280000,16.16000000],[1787972580000,15.84000000],[1787972880000,15.34000000],[1787973180000,15.04000000],[1787973480000,14.78000000],[1787973780000,14.62000000],[1787974080000,14.50000000],[1787974380000,14.50000000],[1787974680000,14.50000000],[1787974980000,14.60000000],[1787975280000,14.62000000],[1787975580000,14.84000000],[1787975880000,15.00000000],[1787976180000,14.86000000],[1787976480000,14.80000000],[1787976780000,14.84000000],[1787977080000,15.26000000],[1787977380000,15.44000000],[1787977680000,15.64000000],[1787977980000,15.72000000],[1787978280000,15.80000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1787954400000,8.5],[1787954580000,8.3],[1787954880000,8.1],[1787955180000,8.2],[1787955480000,8.3],[1787955780000,8.4],[1787956080000,8.4],[1787956380000,8.7],[1787956680000,8.9],[1787956980000,9.1],[1787957280000,9.3],[1787957580000,9.6],[1787957880000,9.4],[1787958180000,9.1],[1787958480000,9],[1787958780000,9],[1787959080000,9.1],[1787959380000,9.3],[1787959680000,9.4],[1787959980000,9.5],[1787960280000,9.2],[1787960580000,9.2],[1787960880000,8.9],[1787961180000,8.8],[1787961480000,8.7],[1787961780000,8.9],[1787962080000,9.2],[1787962380000,9.7],[1787962680000,9.6],[1787962980000,9.4],[1787963280000,9.3],[1787963580000,9.3],[1787963880000,9.2],[1787964180000,9.2],[1787964480000,9.2],[1787964780000,9.2],[1787965080000,9.3],[1787965380000,9.5],[1787965680000,9.9],[1787965980000,9.9],[1787966280000,9.7],[1787966580000,9.4],[1787966880000,8.9],[1787967180000,8.9],[1787967480000,8.7],[1787967780000,8.7],[1787968080000,8.9],[1787968380000,8.9],[1787968680000,8.8],[1787968980000,8.6],[1787969280000,8.4],[1787969580000,8.6],[1787969880000,9],[1787970180000,9],[1787970480000,8.5],[1787970780000,7.9],[1787971080000,8],[1787971380000,8.2],[1787971680000,8.1],[1787971980000,7.9],[1787972280000,8.1],[1787972580000,8.9],[1787972880000,8.8],[1787973180000,8.8],[1787973480000,8.5],[1787973780000,8.7],[1787974080000,8.6],[1787974380000,8.7],[1787974680000,8.9],[1787974980000,9],[1787975280000,9.3],[1787975580000,8.7],[1787975880000,9],[1787976180000,9.1],[1787976480000,8.9],[1787976780000,8.8],[1787977080000,8.9],[1787977380000,9.1],[1787977680000,8.9],[1787977980000,9.1],[1787978280000,9.2],], 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,9.96666667],[1787954580000,9.80000000],[1787954880000,9.56000000],[1787955180000,9.50000000],[1787955480000,9.28000000],[1787955780000,9.14000000],[1787956080000,9.16000000],[1787956380000,9.20000000],[1787956680000,9.56000000],[1787956980000,9.36000000],[1787957280000,9.30000000],[1787957580000,9.44000000],[1787957880000,9.40000000],[1787958180000,9.46000000],[1787958480000,9.76000000],[1787958780000,9.86000000],[1787959080000,10.02000000],[1787959380000,10.16000000],[1787959680000,10.18000000],[1787959980000,10.24000000],[1787960280000,10.38000000],[1787960580000,10.48000000],[1787960880000,10.66000000],[1787961180000,10.80000000],[1787961480000,10.94000000],[1787961780000,11.12000000],[1787962080000,11.38000000],[1787962380000,11.36000000],[1787962680000,11.08000000],[1787962980000,10.78000000],[1787963280000,10.54000000],[1787963580000,10.34000000],[1787963880000,10.12000000],[1787964180000,9.90000000],[1787964480000,9.88000000],[1787964780000,9.92000000],[1787965080000,9.94000000],[1787965380000,10.14000000],[1787965680000,10.42000000],[1787965980000,10.62000000],[1787966280000,10.54000000],[1787966580000,10.50000000],[1787966880000,10.60000000],[1787967180000,10.72000000],[1787967480000,10.66000000],[1787967780000,10.58000000],[1787968080000,10.58000000],[1787968380000,10.66000000],[1787968680000,10.98000000],[1787968980000,11.20000000],[1787969280000,11.46000000],[1787969580000,11.92000000],[1787969880000,12.34000000],[1787970180000,12.48000000],[1787970480000,12.68000000],[1787970780000,13.30000000],[1787971080000,13.72000000],[1787971380000,13.72000000],[1787971680000,13.60000000],[1787971980000,13.72000000],[1787972280000,13.60000000],[1787972580000,13.34000000],[1787972880000,12.44000000],[1787973180000,11.88000000],[1787973480000,12.14000000],[1787973780000,12.26000000],[1787974080000,12.60000000],[1787974380000,12.90000000],[1787974680000,13.18000000],[1787974980000,13.48000000],[1787975280000,13.56000000],[1787975580000,13.46000000],[1787975880000,13.70000000],[1787976180000,13.68000000],[1787976480000,13.52000000],[1787976780000,13.74000000],[1787977080000,14.16000000],[1787977380000,14.18000000],[1787977680000,14.50000000],[1787977980000,14.84000000],[1787978280000,14.90000000],], 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,70.30000000],[1787954580000,69.90000000],[1787954880000,70.04000000],[1787955180000,70.78000000],[1787955480000,71.92000000],[1787955780000,72.72000000],[1787956080000,73.22000000],[1787956380000,74.94000000],[1787956680000,76.48000000],[1787956980000,78.08000000],[1787957280000,79.46000000],[1787957580000,81.16000000],[1787957880000,80.40000000],[1787958180000,78.86000000],[1787958480000,78.34000000],[1787958780000,78.14000000],[1787959080000,78.30000000],[1787959380000,79.72000000],[1787959680000,80.58000000],[1787959980000,81.24000000],[1787960280000,79.50000000],[1787960580000,79.28000000],[1787960880000,77.58000000],[1787961180000,76.34000000],[1787961480000,75.46000000],[1787961780000,75.58000000],[1787962080000,76.74000000],[1787962380000,80.18000000],[1787962680000,79.84000000],[1787962980000,79.28000000],[1787963280000,79.16000000],[1787963580000,79.14000000],[1787963880000,79.08000000],[1787964180000,79.68000000],[1787964480000,80.06000000],[1787964780000,80.72000000],[1787965080000,81.50000000],[1787965380000,82.40000000],[1787965680000,83.26000000],[1787965980000,83.58000000],[1787966280000,82.74000000],[1787966580000,80.90000000],[1787966880000,78.04000000],[1787967180000,77.68000000],[1787967480000,76.32000000],[1787967780000,75.94000000],[1787968080000,77.56000000],[1787968380000,77.04000000],[1787968680000,75.66000000],[1787968980000,73.08000000],[1787969280000,70.54000000],[1787969580000,70.90000000],[1787969880000,72.42000000],[1787970180000,71.72000000],[1787970480000,67.32000000],[1787970780000,62.10000000],[1787971080000,59.54000000],[1787971380000,60.04000000],[1787971680000,60.52000000],[1787971980000,59.02000000],[1787972280000,59.10000000],[1787972580000,63.42000000],[1787972880000,65.26000000],[1787973180000,66.46000000],[1787973480000,66.28000000],[1787973780000,67.72000000],[1787974080000,67.82000000],[1787974380000,68.50000000],[1787974680000,69.22000000],[1787974980000,69.22000000],[1787975280000,70.64000000],[1787975580000,66.98000000],[1787975880000,67.46000000],[1787976180000,68.44000000],[1787976480000,68.10000000],[1787976780000,67.50000000],[1787977080000,65.84000000],[1787977380000,66.26000000],[1787977680000,64.32000000],[1787977980000,65.00000000],[1787978280000,65.10000000],], 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,1.919999988],[1787954580000,1.944],[1787954880000,2.088],[1787955180000,1.44],[1787955480000,1.008],[1787955780000,1.944],[1787956080000,1.512],[1787956380000,1.872],[1787956680000,1.44],[1787956980000,1.656],[1787957280000,2.52],[1787957580000,1.656],[1787957880000,2.232],[1787958180000,2.52],[1787958480000,2.448],[1787958780000,1.872],[1787959080000,1.872],[1787959380000,1.44],[1787959680000,2.664],[1787959980000,1.872],[1787960280000,2.088],[1787960580000,1.224],[1787960880000,1.944],[1787961180000,2.52],[1787961480000,1.944],[1787961780000,1.368],[1787962080000,1.44],[1787962380000,1.44],[1787962680000,2.016],[1787962980000,2.16],[1787963280000,2.16],[1787963580000,2.016],[1787963880000,1.224],[1787964180000,1.008],[1787964480000,0.864],[1787964780000,1.224],[1787965080000,1.872],[1787965380000,3.816],[1787965680000,2.52],[1787965980000,3.024],[1787966280000,3.6],[1787966580000,3.528],[1787966880000,2.952],[1787967180000,2.448],[1787967480000,1.584],[1787967780000,1.224],[1787968080000,2.376],[1787968380000,2.448],[1787968680000,3.312],[1787968980000,2.376],[1787969280000,1.728],[1787969580000,1.584],[1787969880000,2.448],[1787970180000,4.032],[1787970480000,3.888],[1787970780000,7.488],[1787971080000,6.336],[1787971380000,4.32],[1787971680000,4.608],[1787971980000,7.416],[1787972280000,4.68],[1787972580000,1.656],[1787972880000,1.656],[1787973180000,2.304],[1787973480000,3.456],[1787973780000,2.304],[1787974080000,1.656],[1787974380000,1.296],[1787974680000,3.168],[1787974980000,2.376],[1787975280000,2.808],[1787975580000,5.688],[1787975880000,3.96],[1787976180000,3.168],[1787976480000,2.952],[1787976780000,2.304],[1787977080000,4.68],[1787977380000,4.608],[1787977680000,5.184],[1787977980000,4.824],[1787978280000,5.58],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1787954400000,2.999999988],[1787954580000,2.88],[1787954880000,2.592],[1787955180000,2.088],[1787955480000,1.512],[1787955780000,2.592],[1787956080000,2.088],[1787956380000,2.736],[1787956680000,2.448],[1787956980000,2.232],[1787957280000,3.456],[1787957580000,2.448],[1787957880000,2.808],[1787958180000,3.24],[1787958480000,3.384],[1787958780000,2.736],[1787959080000,3.24],[1787959380000,3.672],[1787959680000,3.96],[1787959980000,2.952],[1787960280000,3.168],[1787960580000,1.728],[1787960880000,3.24],[1787961180000,3.816],[1787961480000,2.808],[1787961780000,1.728],[1787962080000,2.232],[1787962380000,1.8],[1787962680000,2.592],[1787962980000,3.024],[1787963280000,3.24],[1787963580000,2.808],[1787963880000,1.656],[1787964180000,1.512],[1787964480000,1.44],[1787964780000,2.088],[1787965080000,4.032],[1787965380000,6.768],[1787965680000,4.176],[1787965980000,4.824],[1787966280000,4.896],[1787966580000,4.176],[1787966880000,4.32],[1787967180000,3.6],[1787967480000,2.376],[1787967780000,1.944],[1787968080000,3.456],[1787968380000,3.744],[1787968680000,4.68],[1787968980000,3.672],[1787969280000,2.52],[1787969580000,2.52],[1787969880000,4.536],[1787970180000,8.928],[1787970480000,7.272],[1787970780000,11.52],[1787971080000,9.576],[1787971380000,6.696],[1787971680000,8.496],[1787971980000,11.376],[1787972280000,7.704],[1787972580000,3.024],[1787972880000,2.088],[1787973180000,3.24],[1787973480000,4.752],[1787973780000,3.096],[1787974080000,2.52],[1787974380000,1.872],[1787974680000,4.248],[1787974980000,3.456],[1787975280000,4.896],[1787975580000,9.432],[1787975880000,5.544],[1787976180000,4.824],[1787976480000,4.968],[1787976780000,3.528],[1787977080000,5.904],[1787977380000,6.552],[1787977680000,6.84],[1787977980000,7.272],[1787978280000,8.28],], 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,161.80000000],[1787954580000,161.26000000],[1787954880000,90.44000000],[1787955180000,245.70000000],[1787955480000,265.16000000],[1787955780000,93.78000000],[1787956080000,154.72000000],[1787956380000,136.72000000],[1787956680000,195.24000000],[1787956980000,77.76000000],[1787957280000,96.94000000],[1787957580000,190.08000000],[1787957880000,313.14000000],[1787958180000,293.64000000],[1787958480000,274.10000000],[1787958780000,258.82000000],[1787959080000,162.18000000],[1787959380000,102.14000000],[1787959680000,209.14000000],[1787959980000,228.54000000],[1787960280000,252.32000000],[1787960580000,290.50000000],[1787960880000,283.36000000],[1787961180000,313.00000000],[1787961480000,242.96000000],[1787961780000,152.80000000],[1787962080000,151.82000000],[1787962380000,196.74000000],[1787962680000,227.66000000],[1787962980000,303.16000000],[1787963280000,221.74000000],[1787963580000,217.56000000],[1787963880000,226.00000000],[1787964180000,275.26000000],[1787964480000,182.48000000],[1787964780000,279.92000000],[1787965080000,211.86000000],[1787965380000,139.16000000],[1787965680000,153.52000000],[1787965980000,221.34000000],[1787966280000,248.08000000],[1787966580000,265.28000000],[1787966880000,233.52000000],[1787967180000,275.64000000],[1787967480000,177.54000000],[1787967780000,222.10000000],[1787968080000,233.48000000],[1787968380000,261.12000000],[1787968680000,273.84000000],[1787968980000,257.56000000],[1787969280000,244.26000000],[1787969580000,185.18000000],[1787969880000,155.80000000],[1787970180000,116.06000000],[1787970480000,115.58000000],[1787970780000,117.92000000],[1787971080000,114.50000000],[1787971380000,129.60000000],[1787971680000,115.60000000],[1787971980000,118.10000000],[1787972280000,130.80000000],[1787972580000,157.22000000],[1787972880000,265.58000000],[1787973180000,249.88000000],[1787973480000,255.96000000],[1787973780000,259.12000000],[1787974080000,185.60000000],[1787974380000,88.62000000],[1787974680000,270.68000000],[1787974980000,146.52000000],[1787975280000,163.44000000],[1787975580000,137.02000000],[1787975880000,240.42000000],[1787976180000,272.16000000],[1787976480000,205.82000000],[1787976780000,94.38000000],[1787977080000,131.30000000],[1787977380000,297.68000000],[1787977680000,262.04000000],[1787977980000,252.22000000],[1787978280000,249.60000000],], 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; }