BikePower
BikePower - bicycle power-output calculator with command-line and Tk interface
use Tk;
use BikePower;
$top = new MainWindow;
BikePower::tk_interface($top);
or
use BikePower;
BikePower::output();
BikePower calculates power output and power consumption for bicycling. You give it things like riding speed, body weight, hill grade, and wind speed. The module returns power output and power consumption, broken out in various ways.
This module is meant for inclusion in own programs. There are two perl scripts in the distribution, bikepwr and tkbikepwr, for use as stand-alone programs.
A new BikePower object is constructed with
$bpwr = new BikePower [options];
Here is a list of possible options, which are supplied in a key-value-notion (e.g.
$bpwr = new BikePower '-no-ini' => 1, 'V_first' => 20;
).
The easiest way to create the ini file is to use tkbikepwr and
clicking on the menu item "Save as default". The ini file is evaled as
a perl script and should contain the variable $x as a reference to
a hash. For example:
$x = {
'V_incr' => 2,
'C_a' => '0.9',
'A_c' => '0.4925155 (upright)',
'Wm' => 19,
'E' => '0.249',
'G' => '0',
'H' => '0',
'first_C' => 500,
'C_incr' => 100,
'A1' => '0',
'R' => '0.0066 (26 x 1.375)',
'T_a' => 20,
'T' => '0.95',
'first_P' => 50,
'given' => 'v',
'Wc' => 68,
'BM_rate' => '1.4',
'P_incr' => 50,
'cross_wind' => '0',
'first_V' => 16,
'N_entry' => 10
};
+ better POD!
BikePower::Tk(3), bikepwr(1), tkbikepwr(1)
Slaven Rezic (eserte@cs.tu-berlin.de)
Original program bike_power.c by Ken Roberts (roberts@cs.columbia.edu), Dept of Computer Science, Columbia University, New York and co-author Mark Grennan (markg@okcforum.org).
Copyright (c) 1997,1998,1999 Slaven Rezic. All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself.