IanPeake / FatMaxxer

Android Project to find FatMax in real time with a Polar H10
Other
61 stars 11 forks source link
exercise

FatMaxxer

FatMaxxer for Android may help you exercise at the best intensity for fat burning, measured using just a Polar H10 heart rate strap, according to recent research (see below). This app requires a Polar H10 (or possibly H9).

Public Release: https://play.google.com/store/apps/details?id=online.fatmaxxer.publicRelease1 . The Google Play version may lag significantly behind the open source project hosted on Github and early test builds (https://github.com/IanPeake/FatMaxxer#testers-wanted).

See Bruce Rogers' FAQ (http://www.muscleoxygentraining.com/2021/01/dfa-a1-and-exercise-intensity-faq.html) and review (http://www.muscleoxygentraining.com/2021/06/fatmaxxer-new-app-for-real-time-dfa-a1.html).

Screenshot | Garmin notification | Garmin notification | Garmin notification |

Garmin notification

In action:

Update Aug 19

New builds are now available targeting Android 13 (SDK version 33). See APK on github and in closed testing. Feedback welcome.

Overview

FatMaxxer is an Android app which uses the Polar H10 to advise Detrended Fluctuation Analysis alpha1 (DFA, ⍺1) in real time.

There are promising signs that running or cycling at ⍺1 = 0.75 corresponds to the first ventilatory threshold "VT1" or roughly FatMax (https://www.frontiersin.org/articles/10.3389/fphys.2020.596567/full). Measuring VT1 reliably normally requires a lab test. DFA requires only a heart rate strap that can measure inter-heartbeat intervals accurately and reliably. FatMaxxer works just for H10 which is a consumer HR strap validated for use in several research studies.

FatMaxxer reports ⍺1 for the past two minutes in "near real time" via the GUI, speech (speaker/headphones, configurable) and notifications (configurable). The ⍺1 value and other features are calculated over the two minute rolling window of RR values, with ⍺1 calculated every 20 seconds (configurable). The RR stream is subject to artifact filtering, where adjacent RR intervals change by more than +/- threshold (%). Threshold settings are 5%, 25% and "Auto". The "Auto" setting uses a threshold of 5% when HR > 90 BPM and 25% when HR < 85 BPM.

FatMaxxer now provides a 10 second ECG snapshot (H10 only, TBC) around all detected artifacts when Developer mode is enabled: (http://www.muscleoxygentraining.com/2021/07/ecg-artifact-strips-from-fatmaxxer-guide.html). A test segment (segment 0) is recorded at 10s elapsed time.

Google Play Privacy Policy

This section refers to FatMaxxer, packaged as a Google Play application.

FatMaxxer systematically collects and stores fitness data in the form of heart beat intervals from an attached Bluetooth Low Energy device. FatMaxxer systematically collects and stores the IDs of nearby Polar BLE devices, including user-initiated connections. FatMaxxer systematically collects and stores data derived from heart beat intervals and BLE devices. Data are stored in a local private cache for approximately one week to enable the user to send crash logs, diagnostic and other performance data to third parties (such as the FatMaxxer developer) for troubleshooting or analysis or both. Data may be shared by user request with other applications only via android data sharing APIs. It cannot be guaranteed that shared data will be encrypted.

After one week cached data is deleted. There is currently no way for the user to request that cached data will be deleted within the application.

Testing

Sideload a recent test version from the APK downloadable from the Github repository. Join the https://groups.google.com/g/fatmaxxer-closed-testing for access to Google Play closed test versions. To help me fix your issue efficiently use the Github issue tracker above to report bugs.

License

Apache 2.0 for any code that was authored by me. See also credits/acknowledgments below.

Getting started

User Interface

Shows ⍺1, plus detected artifacts, number of samples and therefore artifact rate (%) over the window; elapsed time; instantaneous heart rate and heart rate variablility (RMSSD). Android UI screenshot above shows output after walk/run intervals on an earlier version.

Graph plots:

Plots are user-configurable separately for real time and replay mode.

Frequently Asked Questions

I cannot find FatMaxxer in the Play Store in my Country

Release is currently limited to a specific set of countries due to lack of translations. If your country is not enabled let me know. Only English and Dutch are supported. Additional translations welcome.

FatMaxxer hangs / crashes / does not connect to my sensor on startup

FatMaxxer does not produce an ECG log file

FatMaxxer still hangs / crashes

If possible, locate the debug.log file and send it to fatmaxxer@gmail.com. Search for the folder online.fatmaxxer.alpha1 on your phone, or enable Developer Mode and Export the debug.log file.

Will it work with my device?

Only the H10 (and maybe H9) are supported. The research only validated the H10. It's believed that other sensors are not reliable enough. The Polar BLE API used by FatMaxxer does not support the H7.

(Why) does it have to be the H10/H9?

It doesn't have to be the H9/H10, but I chose to develop for those, and therefore use the Polar SDK, because they are regarded as the least-worst consumer sensors for accuracy/precision, and the HRV experimental research is based on them. I use the H10 for those reasons, and chose the Polar SDK for Android because I am an Android user. The Polar SDK doesn't support other non-Polar sensors unfortunately.

Is there any plan for an iOS app?

Not at this stage, sorry. I wrote this app for Android because that's what I currently use. However the project is more or less entirely open source. It would be great if there was an iOS developer prepared to do a port to iOS.

FatMaxxer crashes on my device

Please do feel free to open a new issue on https://github.com/IanPeake/FatMaxxer/ with as much detail as possible about the fault. I am still working on aligning with Android development best practice for several aspects, including Notifications.

Audio / notification (wearable) updates

Reports ⍺1 and other features via audio and/or notifications (configurable), adjusting to work rate:

Audio updates report ⍺1 at HR above a hardcoded threshold, and RMSSD otherwise. Reports artifacts above a hardcoded threshold, or at higher intensity. Audio updates are more frequent at higher work rates. Audible warning (click) is played on dropped artifact.

Notifications: A notification update is sent whenever ⍺1 is recalculated. Notification title provides ⍺1 and artifacts dropped (%). This provides a basic way to view output on a wearable (see photo above). Some Garmin devices show notification titles during activities (see photo above).

Logs

Log files are recorded to external storage and available for export via the Androd ShareSheet.

Replay

Enable Developer mode, Import a previously recorded RR.csv, then Replay and select the RR.csv file from your logs directory. FatMaxxer will replay the previous session (for review / screen shot). The graph will be slightly quantized for most plots except RRs. Replay is at up to 60x real time.

Known issues / limitations

Acknowledgements and References