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.
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.
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)