NAME
BikePower - bicycle power-output calculator with command-line and Tk interface
SYNOPSIS
use Tk;
use BikePower;
$top = new MainWindow;
BikePower::tk_interface($top);
or
use BikePower;
BikePower::output();
DESCRIPTION
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.
CONSTRUCTOR
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;
).
- -no-ini
-
If set to true, do not use the defaults from ~/.bikepower.pl.
- -no-default
-
If set to true, do not use any defaults (all parameters are left undefined).
- imperial
-
Metric/imperial flag. If set, use imperial rather than metric units.
- T_a
-
Temperature in °C.
- given
-
Resolve for v (velocity), P (power) or C (consumption).
- first_C
-
First consumption (Cal/hr) in table or other output.
- first_V
-
First velocity (km/h) in table or other output.
- first_P
-
First power output (Watts) in table or other output.
- V_incr
-
Velocity increment in table.
- P_incr
-
Power increment in table.
- C_incr
-
Consumed_power increment in table.
- N_entry
-
Number of entries in table, default: 10.
- C_a
-
Air resistance coefficient.
- A1
-
Linear coefficient of air resistance.
- A2
-
Quadratic coefficient of air resistance.
- A_c
-
Frontal area of the cyclist in meters^2.
- T
-
Transmission efficiency of bicycle drivetrain.
- E
-
Efficiency of human in cycling.
- H
-
Velocity of headwind [meters/second].
- R
-
Coefficient of rolling friction.
- G
-
Grade of hill.
- Wc
-
Weight of cyclist [kg].
- Wm
-
Weight of machine and clothing [kg].
- BM_rate
-
Basal metabolism rate [Watts/kg of body weight].
- cross_wind
-
The wind given is a cross wind.
METHODS
- calc
-
Resolve for velocity, power output or consumption (as stated in the "given" parameter) for the first_V, first_P or first_C parameter. The calculated values may be get with $bpwr->velocity, $bwpr->power or $bpwr->consumption.
- output
-
Calculate and print a table with the supplied values.
INI FILE
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
};
TODO
+ better POD!
SEE ALSO
BikePower::Tk(3), bikepwr(1), tkbikepwr(1)
AUTHOR
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 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.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 551:
Non-ASCII character seen before =encoding in '°C.'. Assuming CP1252