Aug-04-2022, 02:48 PM
(This post was last modified: Aug-04-2022, 02:48 PM by deanhystad.)
If stroke rate is a constant (entered by the user), there is no reason to integrate. Record starting time, and whenever you want an expected strokes count:
expected_strokes = strokes_per_second * (time.time() - start_time).
If stroke rate is measured, it makes more sense to measure stroke count and compute stroke rate. As far as I know there is no way to measure stroke rate directly, so you are forced to count strokes and measure time and compute the derivative of stroke count over time. May as well use the accurate stroke counter instead of a messy computed stroke rate.
expected_strokes = strokes_per_second * (time.time() - start_time).
If stroke rate is measured, it makes more sense to measure stroke count and compute stroke rate. As far as I know there is no way to measure stroke rate directly, so you are forced to count strokes and measure time and compute the derivative of stroke count over time. May as well use the accurate stroke counter instead of a messy computed stroke rate.