DWI Bicycle Ride Calorie Calculator

SourceForge Logo DWI Bicycle Ride Calorie Calculator is a simple program that calculates the number of calories expended on a bicycle ride. It is based on an article in the May 1989 issue of Bicycling Magazine, pp. 100-103. It provides a good estimate of the number of calories burned based on time, distance, rider weight, wind speed and direction, drafting, and climbing. It is not meant to be a completely accurate calculator and playing with the input values will reveal that the equations break down for very small and very large average speed values. Calorie expenditure values seem very reasonable for average speeds between 5 and 30 mph. Supports both English and metric units.

The original bicycling health/fitness calculator was developed by Greg Kondrasuk <kondrag@geocities.com> during 1995-1998, and is available at http://www.geocities.com/SiliconValley/Vista/6434/calcalc.html. This version is a re-write of that calculator, and is meant to be a source-code example of how to write applications using DWI and GOB. DWI is a computer programming system that aims to make desktop application development simpler. If you want to use this calculator, you will have to download and compile DWI. Works on Linux/Mac only, sorry, there is no MS Windows version.

The DWI markup that was used to create the application can be viewed here. The DWI code simply specifies how to copy data from the GUI to the object that performs the actual calculations, and back again.

The GOB code that was used to auto-generate the GObject for the calculation can be viewed here. The GOB code just specifies a number of input/output parameters, and the actual code to compute the calories burned.

The C source code for glueing together the GOB and DWI code is here. Its mostly generic system init boilerplate, although it also creates the actual instance of the biker GObject.

April 2004 Linas Vepstas <linas@linas.org>