Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added feature to calculate BMR and daily calories based on activity level #248

Merged
merged 9 commits into from
Feb 6, 2022

Conversation

a124557
Copy link

@a124557 a124557 commented Feb 5, 2022

This patch addresses issue #238.

The following features were added:

  1. In Weight Track -> Index, the BMR for the user is calculated based on two formulas, the Mifflin-St Jeor equation, and the Katch-McArdle formula. The latter formula is said to be more accurate for individuals who are leaner. For those with body fat levels equal to or lower than 15%, the app uses the Katch-McArdle Formula to calculate BMR. When body fat is greater than 15%, the Mifflin-St Jeor equation is utilized. The body fat cutoff value can be changed.

  2. Estimated daily calories are now provided in Weight Track -> Index as well. This calculation is based off the user's BMR. A spinner allows the user to select their activity level. This selected activity level is saved even when the app is closed. Depending on which activity level is selected, a different multiplier is used against the BMR to produce the daily calorie value. If the user decides to change the activity level, the daily calorie recommendation will be updated in real-time.

The equations used to perform these calculations can be referenced here: https://www.calculator.net/bmr-calculator.html

Screenshots have been provided for more info.

Please let me know if you have any questions/comments.

Thanks

Screenshot_1644098098
Screenshot_1644098103
Screenshot_1644098110
Screenshot_1644098114

@brodeurlv
Copy link
Owner

Hi @a124557, thank you for the pull request. That's a good addition to the app which integrates well with the other current option.
However, could you please initiate a discussion with me before doing too much work on your side just in case there is already work in progress on my side on similare topics ? Here that's fine anyway, but next time that would be safer.

Can you confirm that the pull request has been fully tested ? I see several additional commits to fix UI or strings. Thanks.

@a124557
Copy link
Author

a124557 commented Feb 6, 2022

Hi @brodeurlv,

Sure. I will let you know before implementing any new features or fixes.

Since the last commit, I have not encountered any issues so far with this PR while using the app. The translations are missing for this PR. I'm not sure if using google translate would have been reliable since I couldn't verify the accuracy of the translations.

Regards,

@a124557

@brodeurlv brodeurlv merged commit 538f901 into brodeurlv:master Feb 6, 2022
@brodeurlv
Copy link
Owner

Thank you @a124557.
For the translation, I will wait for weblate to propose something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants