I'm using this equation to convert steps to estimated calories lost.
I now need to do the opposite and convert total calories to estimated steps.
This is the equation I'm using for steps to calories:
+(CGFloat) totalCalories:(NSUInteger)TotalStepsTaken weight:(CGFloat)PersonsWeight{
CGFloat TotalMinutesElapsed = (float)TotalStepsTaken / AverageStepsPerMinute; //Average Steps Per Minute is Equal to 100
CGFloat EstimatedCaloriesBurned = PersonsWeight * TotalMinutesElapsed * Walking3MphRate; //Walking3MphRate = 0.040;
return EstimatedCaloriesBurned;
}
It's written in Objective-C, but I tried to make it as readable as possible.
All calculations are being done over a 1 hour period.
Thank you for you help.
这是代数,我不知道Obj-C语法...
Steps = round( Calories * StepsPerMinute / (Weight * WalkRate) );
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.