metar decoding

From: Date: Fri, 09 May 2003 19:33:17 +0000
Subject: metar decoding
Groups: php.general 
Request: Send a blank email to php-general+get-147064@lists.php.net to get a copy of this message
Hi, I was wondering, does anyone here have any experience decoding metar output? I know ther eis PHP weather, but that is far too much for what I want (plus i cant get it working anyway). I just want to get simple values that I can do what I want with. If it helps, this is what the output looks like: 2003/05/09 17:53 KSFF 091753Z 06008G18KT 10SM SCT090 SCT200 16/01 A3000 RMK AO2 SLP158 T01560011 10156 20044 50002 The second line is always on one line. I know I can break it up using explode, but then I have to get things like this; 091753Z I need the 09 and the 1753 separated and do not need the Z 10SM I need just the 10 SCT090 I need SCT and 090 separated SCT200 I need SCT and 200 separated There are of course others, but that would at least get me started. I'm sure it's just a matter of regular expressions, but my brain is having trouble grasping those ideas. If you have any ideas I'd be happy to hear them! Thanks, Bryan

« previous php.general (#147064) next »