Avgspa (dest, swath, source), Dest x i swath – Campbell Scientific CR5000 Measurement and Control Module User Manual
Page 177
Section 8. Processing and Math Instructions
8-5
Pi/2
-Pi/2
Pi
0
+y
+x
-x
-y
ATN2 is the inverse trigonometric function of TAN, which takes an angle as
its argument and returns the ratio of two sides of a right triangle. Do not
confuse ATN2 with the cotangent, which is the simple inverse of a tangent
(1/tangent).
ATN2 Function Example
The example uses ATN2 to calculate
π
. By definition, a full circle is 2
π
radians. ATN2(1,1) is
π
/4 radians (90 degrees).
Dim Pi
'Declare variables.
Pi = 4 * ATN2( 5, 5 ) 'Calculate Pi.
AvgSpa (Dest, Swath, Source)
Computes the spatial average of the values in the source array.
Syntax
AvgSpa (Dest, Swath, Source)
Remarks
Find the average of the values in the given array and place the result in the
variable named in Dest. The Source must be a particular element in an array
(e.g., Temp(1)); it is the first element in the array to include in the average.
The Swath is the number of elements to include in the average.
Dest
X i
swath
i j
i j swath
=
=
= +
∑
( )
Where X(j) = Source