MMW-005 Solid State Wind Sensor
__________________________________________________________________________________________
conversion from meters per second to kilometer per hour.
Refer to Table 2 for conversion factors for wind speed.
Table 2. Wind Speed Conversion Factors
Units
Conversion Factor
Kilometers per Hour
3.6
Knots 1.944
Miles per Hour
2.237
Feet per Second
3.281
'CR1000 Series Datalogger
'Declare Public Variables
Public MMW005 As String * 20
Public NBytesReturned
Public MMW005Values (2) As Float
Alias MMW005Values (1) = Wind_Dir
Alias MMW005Values (2) = Wind_Speed
'Define Data Tables
' Note: These tables are examples only. Specific applications may require different outputs.
DataTable (Wnd2Min,True,-1)
DataInterval (0,2,Min,10)
'2 minute averages of WindDir and WindSpeed
WindVector (1,Wind_Speed,Wind_Dir,IEEE4,False,0,0,0)
FieldNames ("Mean_Horizontal_Wnd_Spd:,Unit_Vector_Mean_Wnd_Dir:,Standard_Deviation_Wnd_Dir")
EndTable
DataTable (Wnd10Min,True,-1)
DataInterval (0,10,Min,10)
'10 minute average of WindDir and WindSpeed
WindVector (1,Wind_Speed,Wind_Dir,IEEE4,False,0,0,0)
FieldNames ("Mean_Horizontal_Wnd_Spd:,Unit_Vector_Mean_Wnd_Dir:,Standard_Deviation_Wnd_Dir")
EndTable
DataTable (Wnd60Min,True,-1)
DataInterval (0,60,Min,10)
'Hourly Averages of Wind Speed and Direction
WindVector (1,Wind_Speed,Wind_Dir,IEEE4,False,0,0,0)
FieldNames ("Mean_Horizontal_Wnd_Spd:,Unit_Vector_Mean_Wnd_Dir:,Standard_Deviation_Wnd_Dir")
Maximum (1,Wind_Speed,FP2,False,True)
SampleMaxMin (1,Wind_Dir,FP2,False)
EndTable
'Main Program
BeginProg
SerialOpen (Com1,4800,0,0,10000)
Scan (5,Sec,0,0)
'Character 36 is $, and Character 13 is CR.
SerialInRecord (Com1,MMW005,36,0,13,NBytesReturned,01)
SplitStr (MMW005Values(),MMW005,"",2,0)
'Convert Wind Speed from m/s to km/hr
'*** Other Conversion Factors can be used as required ***
MMW005Values (2) = MMW005Values (2) * 3.6
'Call Output Tables
CallTable (Wnd2Min)
CallTable (Wnd10Min)
CallTable (Wnd60Min)