mirror of
https://github.com/russok/FitoTrack.git
synced 2025-10-28 16:22:12 -07:00
Better calorie calculation
This commit is contained in:
parent
a042913381
commit
b4afba8a9c
@ -33,7 +33,8 @@ public class CalorieCalculator {
|
||||
*/
|
||||
public static int calculateCalories(Workout workout, double weight){
|
||||
double mins= (double)(workout.duration / 1000) / 60;
|
||||
return (int)(mins * (getMET(workout) * 3.5 * weight) / 200);
|
||||
int ascent= (int)workout.ascent; // 1 calorie per meter
|
||||
return (int)(mins * (getMET(workout) * 3.5 * weight) / 200) + ascent;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user