[wxqc] Text to Degrees

Steve Hatchett steve at softwx.com
Sun Apr 8 20:51:51 CDT 2007


For converting degrees to text, I like the following:

http://www.tnetweather.com/nb-0002.php

 

which is basically a two line function

$windlabel = array ("N","NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S",

   "SSW","SW", "WSW", "W", "WNN", "NW", "NNW");

$dir = $windlabel[ fmod((($winddir + 11) / 22.5),16) ];

 

For finding average wind direction, I think the accepted method, as
mentioned by others here, is to calculate a vector average. I have seen both
unit vector averages (where wind speed is not considered), and weighted
vector averages (where speed is considered) used by the NOAA/NWS, depending
upon the application. 

http://www.ndbc.noaa.gov/wndav.shtml

 

But I have not been able to find out which of the two is the NWS standard
for observation. This was discussed in a thread last year.

http://server.gladstonefamily.net/pipermail/wxqc/2006-August/thread.html#444
7

 

Steve

SoftWx

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://server.gladstonefamily.net/pipermail/wxqc/attachments/20070408/cc679924/attachment-0001.htm 


More information about the wxqc mailing list