How can I output ten minutes moving average every one minute?_Campbellsci论坛问答

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

How can I output ten minutes moving average every one minute?_Campbellsci论坛问答

新对话如下:

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

分享到:

原文链接:,转发请注明来源!
海洋仪器网 仪器使用 How can I output ten minutes moving average every one minute?_Campbellsci论坛问答
「How can I output ten minutes moving average every one minute?_Campbellsci论坛问答」评论列表

发表评论