/include/hr_tools.php

Description

Tools for heart rate computing and display

Includes
require_once ('conf/config.php') (line 15)

General configuration file

Variables
array $GLOBALS['hr_col'] (line 22)

Heart rate colors for some particuliar HR pct values.

Used to compute colors by interpolation.

Functions
get_days_hr_info (line 99)

Get day heart rate information within period

Rest HR is minumum rest HR, max GR is maximum max HR within period.

  • return: Rest and max HR : array('rest_hr' => <value>, 'max_hr' => <value>)
array get_days_hr_info (integer $user_id, string $min_day, string $max_day)
  • integer $user_id: User ID (as in database)
  • string $min_day: Minimum date considered (format: YYYY-MM-DD)
  • string $max_day: Maximum date considered (format: YYYY-MM-DD)
get_gd_hr_color (line 121)

Get RGB color for a given heart rate value

Rest HR is minumum rest HR, max HR is maximum max HR within period.

  • return: RGB color (array of 3 integers [0-255])
array get_gd_hr_color (integer $hr, array $hr_lim, [float $white_ratio = 0])
  • integer $hr: Heart rate value
  • array $hr_lim: HR special values ('rest', 'pct65', 'pct80', 'pct90', 'max')
  • float $white_ratio: Mix with white color (0: no, 1: white)
get_user_hr_limits (line 40)

Get user rest and maximum heart rate from database

void get_user_hr_limits (integer $user_id, integer &$rest_hr, integer &$max_hr, integer $exe_max_hr)
  • integer $user_id: User ID (as in database)
  • integer &$rest_hr: Rest heart rate computed if input is empty.
  • integer &$max_hr: Maximum heart rate computed if input is empty.
  • integer $exe_max_hr: Maximum heart rate found in exercise. (exe_max_hr cannot be > max_hr)

Documentation generated on Sat, 28 Mar 2009 23:15:18 +0000 by phpDocumentor 1.4.1