Replies: 1 comment 7 replies
-
|
Thanks! That looks like a really neat solution. Would you be up for putting in a PR for that (with a Changelog entry and version bump)? |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I saw that the Recorder app's heart rate logging saves the last HR sent by the device when it is time to save a new row.
I thought it could be made more robust if it instead kept a running average of all readings sent during a given interval and saved the average instead, so I edited the app to do this. The confidence scores of the readings are also averaged.
It also only incorporates readings that have a confidence score higher than 80. If no readings pass this threshold during the interval, the reading with the highest confidence score is saved instead of an average.
This way, even if the last reading happens to get messed up for some reason and come back with a low confidence score, the app will still log an accurate average based on the rest of the scores logged during the interval, or at least the reading it was most confident about.
Here's the commit: link
Here's a comparison between the old method and the new method for recording HR every 5 seconds, just from a few minutes of moving around:

Not really a dramatic difference in HR values from this small sample - maybe a bit smoother. Either way, I feel more comfortable using an average for this.
Beta Was this translation helpful? Give feedback.
All reactions