Spacecraft.Average(Variable, Variable) Method

Top 

Description

Calculates the moving window average of a value using the specified number of data points.

 

This method has been Deprecated. Please use Average(Variable, Variable) instead.

 

Timing Precision Mode

This page describes functionality in nanosecond timing precision mode.

Click here to see the documentation for this object in millisecond timing precision mode.

 

Note: This method has a state. See the Methods and Properties with State page for more information.

 

Method Signature

Spacecraft.Average(

Variable valueToAverage,


Variable pointsToAverage)

 

 

Arguments

valueToAverage


Description:

The value to average.

 

 

pointsToAverage


Description:

An integer value representing the maximum number of data points to average over.

Valid Range:

pointsToAverage ≥ 2

 

 

 

Return Value

Type:

number

 

 

The average calculated from the specified number of points. If the number of data points is less than or equal to the specified number of of data points to average, then an ordinary "simple" average of the data is performed. Otherwise, a "moving" or "sliding" average is performed.

 

Syntax

myVariable1 = mySpacecraft1.Average(myVariable2, myVariable3);

 

 

See also

Spacecraft Object

Spacecraft Propagation Guide

Coverage and Contact Analysis Guide