function _set($val) { $ary['year'] = $val[1]; // YYYY $ary['month'] = $val[2]; // MM $ary['day'] = $val[3]; // DD $ary['hour'] = $val[4]; // hh $ary['min'] = $val[5]; // mm $ary['timestamp'] = mktime($val[4], $val[5], 0, $val[2], $val[3], $val[1]); $ary['wind_direction'] = Conversions::getWindDirection($val[6]); // WD $ary['wind_speed'] = Conversions::getWindSpeed($val[7]); // WSPD $ary['gusts'] = Conversions::getWindSpeed($val[8]); // GST $ary['wave_height'] = Conversions::getWaveHeight($val[9]); // WVHT $ary['dominant_wave_period'] = Conversions::getWavePeriod($val[10]); // DPD $ary['avg_wave_period'] = Conversions::getWavePeriod($val[11]); // APD $ary['mean_wave_direction'] = Conversions::getMeanWaveDirection($val[12]); // MWD $ary['barometer'] = Conversions::getBarometer($val[13]); // BARO $ary['air_temp'] = Conversions::getTemp($val[14]); // ATMP $ary['water_temp'] = Conversions::getTemp($val[15]); // WTMP $ary['dewpoint'] = Conversions::getTemp($val[16]); // DEWP $ary['visibility'] = Conversions::getVisibility($val[17]); // VIS $ary['pressure_tendency'] = Conversions::getPressureTrend($val[18]); // PTDY $ary['tide'] = Conversions::getTide(str_replace("|", "", $val[19])); // TIDE return $ary; }