One bugfix - prevPoints didn't include the immediately preceding previous point.
Distance is interpolated on difference between distance instead of segment, as the interpolation may happen on the same single point.
The constants in tests were adjusted to match new smoothing algorithm. Sometimes it's significant as the sample data are often recorded 3-5 seconds and new algorithm looks up to 9 seconds instead of previously 9 points.
One bugfix - prevPoints didn't include the immediately preceding previous point.
Distance is interpolated on difference between distance instead of segment, as the interpolation may happen on the same single point.
The constants in tests were adjusted to match new smoothing algorithm. Sometimes it's significant as the sample data are often recorded 3-5 seconds and new algorithm looks up to 9 seconds instead of previously 9 points.