Moving average low-pass filter
A moving average smooths noisy sensor data by averaging the last samples. It is a simple low‑pass filter with a tunable window size.

1. Python example
from collections import deque
buffer = deque(maxlen=5)
buffer.append(value)
filtered_value = sum(buffer) / len(buffer)
2. Notes
- Increasing reduces noise but adds latency.
- For lower latency with adaptive smoothing, the 1‑Euro filter is a strong alternative (Casiez et al., 2012).
references
Casiez, G., Roussel, N., & Vogel, D. (2012). 1€ filter: A simple speed-based low-pass filter for noisy input in interactive systems. Proceedings of the SIGCHI Conference on Human Factors in Computing Systems, 2527–2530. https://doi.org/10.1145/2207676.2208639