hiking_calories_calculator

A calculator for calculating burned calories during hiking that depends on the weight of the person, weight of the pack, type of the terrain and hiking speed. This calculation is based on the famous Pandolf Equation

Getting started

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  ...
  hiking_calories_calculator: "^0.0.1"

Usage

CaloriesCalculator class has static method calculateCalories that can be called to calculate calories.

  Calculation calculation = CaloriesCalculator.calculateCalories(
      weight: Weight(lbs: 120),
      bagWeight: Weight(lbs: 20),
      speed: Speed(mph: 4),
      terrain: Terrains.WET_CLAY_OR_ICE,
      inclination: 0);
  print("\nCalories per Hour:");
  print(calculation.kcalPerHour.ceil().toString());
  print("\nCalories per Mile:");
  print(calculation.kcalPerMile.ceil().toString());

Available Terrain Types:

NoTerrain TypeTerrain FactorAccessible code
1Paved Road1.0Terrains.PAVED_ROAD
2Gravel Road1.2Terrains.GRAVEL_ROAD
3Wet Clay/Ice1.7Terrains.WET_CLAY_OR_ICE
4Sand2.0Terrains.SAND
5Swamp3.5Terrains.SWAMP

Libraries

Distance
calculation
calories
calories_calculator
hiking_calories_calculator
speed
terrain_factors
weight