Class constructor
void
PolarExercise
(integer $user_id, [string $publish_rights = 'public'])
-
integer
$user_id: User ID (as in database)
-
string
$publish_rights: Publish rights in ('public','public-but-desc')
Display exercise HTML output
void
display_html
(integer $exe_id, string $day, [string $tab = 'data'])
-
integer
$exe_id: ID of exercise to display
-
string
$day: Day (YYYY-MM-DD format)
-
string
$tab: Tab to display in :
- 'graph' : Curves (HR, speed, ...), F(T) or F(D)
- 'data' : Detailed data
- 'laps' : Intermediate times (only if more than 1 lap
or if speed is recorded)
Display header row for columns for laps
void
_display_laps_header_columns
(array $exe, array $lap_1, string $lap_type, [string $note_str = '1000m'])
-
array
$exe: Exercise info, used to select columns
-
array
$lap_1: First lap info, used to select columns
-
string
$lap_type: Type of laps in ('polar','distance','interval')
-
string
$note_str: Note title : step if 'distance', Ascend / descend if 'altitude'
Display header row for group of columns for laps
void
_display_laps_header_col_groups
(array $exe, array $lap_1)
-
array
$exe: Exercise info, used to select columns
-
array
$lap_1: First lap info, used to select columns
Get RGB color for a value between min and max
array
_get_color_for_value
(integer $value, integer $min_value, integer $max_value, array $min_color, array $max_color, [float $white_ratio = 0])
-
integer
$value: Value
-
integer
$min_value: Minimum value
-
integer
$max_value: Maximum value
-
array
$min_color: RGB color for min value (3 integers [0-255])
-
array
$max_color: RGB color for max value (3 integers [0-255])
-
float
$white_ratio: Mix with white color (0: no, 1: white)
Parse Polar HRM file to get all HR data (keep last HRM parsed in session)
array
_parse_hrm_file
(integer $exe_id, integer $year, integer $month, integer $day, integer $rank)
-
integer
$exe_id: Exercise ID
-
integer
$year: Year of exercise date
-
integer
$month: Month of exercise date
-
integer
$day: Day of exercise date
-
integer
$rank: Rank of exercise