Dear Sir:
How can I output ten minutes moving average every one minute? I use cr-1000, but when I config a ten minutes moving average item, it always output every ten minutes. Can I output it every one minute? Sorry for my poor english, thanks!
Mars Liu
Check out the function AvgRun, I think it is close to what you are looking for.
Sorry, I make a mistake. I want to output ten minutes Resultant wind every minute not only wind speed average.It's include vector calculate. so avgRun can't do that. how can do that? thanks!
The way I've done this in the past is to calculate it manually taking the individual sine and cosine values from the wind direction input and generating the averages.
Something along these lines:
'10M WD Sine
SinWdir10 = Sin(Wdir10)
'10M WD Cosine
CosWdir10 = Cos(Wdir10)
'Average 10M WD Sine
AvgRun (AvgSinWdir10,1,SinWdir10,180)
'Average 10M WD Cosine
AvgRun (AvgCosWdir10,1,CosWdir10,180)
'Calculate 15 Minute Running Avg for Wind Direction
AvgWdir10 = ATN(AvgSinWdir10/AvgCosWdir10)
If AvgCosWdir10 < 0 Then
AvgWdir10 = 180 + AvgWdir10
elseif AvgSinWdir10 < 0 Then
AvgWdir10 = 360 + AvgWdir10
Endif
IslandMan
Dear IslandMan:
It works, thanks!
I have another question. How about "standard deviation of wind direction"? I also want to output ten minutes standard deviation of wind direction every minute, thanks!
Mars Liu
Mars,
Here is the Sigma code using the averages.
e10 = SQR (1-((AvgSinWdir10^2)+(AvgCosWdir10^2)))
Sigma10 = ASIN (e10*(1+(0.1547*(e10^3))))
As I recall, this is straight from the CR1000 manual.
Glad I was able to help.
IslandMan