diff --git a/templates/new_workout.html b/templates/new_workout.html index abd3db5..b8e5e67 100644 --- a/templates/new_workout.html +++ b/templates/new_workout.html @@ -378,10 +378,10 @@ const timeDiffSec = (endDate.getTime() - startDate.getTime()) / 1000; // Calculate the energy(joules) expended based on power and time difference - const energy = powerPerSec * timeDiffSec; + const energy = power * timeDiffSec; //Convert joules to calories - return energy * 0.238902957619; + return (energy * 0.238902957619) / 1000; }