} $arrOut['LastRainTipISO'] = $arrOut['LastRained']; $arrOut['hourlyrainTH'] = '0.0'; // "hourlyrainTH":"0,2", "hourlyrainTH":"<#hourlyrainTH>", if (isset($ws['humiMinTodayTime'])) { $arrOut['ThumTL'] = WStime($ws['humiMinTodayTime']); } else { $arrOut['ThumTL'] = ''; } $arrOut['ThumTH'] = WStime($ws['humiMaxTodayTime']); $arrOut['TpressTL'] = WStime($ws['baroMinTodayTime']); $arrOut['TpressTH'] = WStime($ws['baroMaxTodayTime']); $arrOut['presstrendval'] = $ws['baroDelta']; $arrOut['Tbeaufort'] = $ws['windBeafort']; // "Tbeaufort":"F1", "Tbeaufort":"<#Tbeaufort>", $arrOut['TwgustTM'] = WStime($ws['gustMaxTodayTime']); $arrOut['windTM'] = $ws['gustMaxToday']; $arrOut['bearingTM'] = '5'; $arrOut['BearingRangeFrom10'] = '0'; $arrOut['BearingRangeTo10'] = '359'; $time = strtotime(substr($ws['rtTime'], 0, 8) . 'T' . substr($ws['rtTime'], 8, 6)); $arrOut['timeUTC'] = gmdate('Y,m,d,H,i,s', $time); $arrOut['UV'] = $ws['uvAct']; $arrOut['UVTH'] = $ws['uvMaxToday']; // "UVTH":"<#UVTH>", $arrOut['SolarRad'] = $ws['solarAct']; $arrOut['SolarTM'] = $ws['solarMaxToday']; // "SolarTM":"<#solarTH>", $arrOut['CurrentSolarMax'] = $ws['solarMaxToday']; $arrOut['domwinddir'] = wsConvertWinddir($ws['windAvgDir']); if (!isset($ws['WindRoseData'])) {
<max dt="' . WStime($ws['humiMaxTodayTime']) . '" uabbr="%" label="' . langtransstr('Highest') . '">' . $ws['humiMaxToday'] . '</max> <current dt="' . WStime($ws['actTime']) . '">' . $ws['humiAct'] . '</current> </humidity>'; $limit_high = (string) wsConvertRainfall('50', 'hpa'); if ($ws['rainMonth'] > $limit_high) { $limit_high = 5 * ceil($ws['rainMonth'] / 5); } $limit_high = round(5 * floor($limit_high / 5), 1); if (!isset($ws['rainHour'])) { $ws['rainHour'] = 0; } $string .= ' <precipitation unit="' . $uomRain . '" label="' . langtransstr('Precipitation') . '"> <current dt="' . WStime($ws['actTime']) . '" uabbr="' . $uomRain . '" label="' . langtransstr('Today') . '">' . $ws['rainToday'] . '</current> <interval1h dt="1 ' . langtransstr('Hour') . '" uabbr="' . $uomRain . '" label="' . langtransstr('Last hour') . '">' . $ws['rainHour'] . '</interval1h> <interval6h dt="' . langtransstr('Month') . '" uabbr="' . $uomRain . '" label="' . langtransstr('This month') . '">' . $ws['rainMonth'] . '</interval6h> <limits min="0" max="' . $limit_high . '"> </limits> </precipitation>'; $string .= ' <winddirection unit="°" label="' . langtransstr('Wind') . '"> <current dt="' . WStime($ws['actTime']) . '" uabbr="°;" label="Windrichting">240</current> </winddirection> <windspeed unit="' . $uomWind . '" label="' . langtransstr('Wind') . '"> <current dt="' . WStime($ws['actTime']) . '" uabbr="' . $uomWind . '" label="' . langtransstr('Wind') . '">' . $ws['windAct'] . '</current> <peak dt="" uabbr="' . $uomWind . '" label="' . langtransstr('Highest') . ' ' . langtransstr('Gust') . '">' . $ws['gustMaxToday'] . '</peak> <limits min="0" max="50"> </limits> </windspeed> </wx>'; #ob_flush(); ob_clean(); echo $string;