~quanrong/calories

Estimate the calories you burn hiking
Migrate to Codeberg
Correct spelling of kcal
Fix typos

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~quanrong/calories
read/write
git@git.sr.ht:~quanrong/calories

You can also use your local clone with git send-email.

calories is a command line tool for estimating calories burned while hiking.

#Basic usage:

calories weight(kg) distance(km) time(min)

for example: calories 76 5 60

If you want to specify a nonzero elevation gain, use the -e flag:

calories -e elevation(m) weight distance time

It always assumes that it's a round trip and the net elevation gain is zero.

It also supports US Customary units:

calories --us-units -e elevation(ft) weight(lbs) distance(mi) time(min)

#Equations:

The equation used by default is the Load Carriage Decision Aid (LCDA) as calibrated by Looney, Santee, et al. in Estimating Energy Expenditure during Level, Uphill, and Downhill Walking.

There are two other equations available:

  • The Pandolf equation (-q pandolf) with the correction factor for negative slope values derived by Santee et al. in Load Carriage Model Development and Testing with Field Data.
  • The Cost of Walking equation (-q minetti) derived by Minetti et al. in Energy cost of walking and running at extreme uphill and downhill slopes.

#Note

I wrote this as a tool for my own use and as an exercise to practice writing Go, which I'm currently learning. I'm a beginner and not a programmer, so it's likely poorly written. Any feedback is welcome!

Also, this is not a medical tool, and I know nothing about sports medicine and medicine in general. Take the results with a fistful of salt and let me know if you have any improvement!