The toxic emissions saved is from a formula developed by
Patrick Goebel of Global Cycling Org (Velonet). It is a
measure of the amount of pollutants that would have been
emitted if an "average" automobile had been driven instead
of the bicycle. The pollutants included are: total
organic gases (TOG), carbon monoxide (CO) and nitric
oxides (NO). These pollutants are generated when an
engine is "cold started" (number of trips = N) and while
running (number of miles = D). Averaging for traveling at
25 mph and 55 mph gives the following formula for
ES=Emissions Saved:
ES = TOG + CO + NO
= [(4.69 + 45.43 + 2.72) * N] + [(.66 + 4.575 + .72) * D]
= (52.84 * N) + (5.955 * D)
Finally, ES in grams is divided by 454 to give the number of
pounds of pollutants saved.
The calories burned is from the "bike_power" program by
Ken Roberts of Columbia University and refined by Mark Grennan
of Oklahoma Office of State Finance.
The calculation is based on many variables including the following:
G grade of the hill (vertical_rise/distance)
HEAD headwind [meters/second],7 multiplier crosswind
SPEED MPH
TF temperature in F (affects air density)
WM weight of bicycle (lb)
WC weight of cyclist (lb)
AC frontal area (m^2): 0.4925155 for upright position,
0.4297982 crouch, 0.3080527 racing, 0.1844627 in pack
R rolling friction: 0.012 for mountain bike tires,
0.004 racing slick, 0.0051 27x1.25 tires
E=0.249 efficiency of human in cycling
T=0.95 transmission efficiency of bicycle drivetrain
A1=0.0 linear coefficient of air resistance
C_a=0.9 air resistance coefficient
BM_rate=1.4 basal metabolism rate [Watts/kg body weight]
Finally, the pounds of fat burned is calculated from the calories
by 3500 calories per pound of fat.

shell script to calculate car emissions
shell script to calculate calories burned