MovingAverage
- class phoenix5.MovingAverage(capacity: int)
Bases:
pybind11_object
Class to calculate the rolling average of a signal
Constructor for a MovingAverage Object
- Parameters:
capacity – maximum number of items this will hold
- clear() None
Clears all data points
- getCount() int
- Returns:
the count of the items
- getSum() float
- Returns:
the sum of the items
- pop() None
Pull out oldest item
- process(input: float) float
Add input & calculate average
- Parameters:
input – Value to add
- Returns:
new average
- push(d: float) None
Add new item
- Parameters:
d – item to add