Class constructor
void
PolarFile
(string $fileName, integer $userId)
-
string
$fileName: Polar file name (full path name)
-
integer
$userId: User ID (as in database)
Parse a block from a Polar file (buffered)
A Block starts with a line [block_name]
string
_parse_block_get
(string &$buffer, integer &$line_no)
-
string
&$buffer: Pointer to buffer
-
integer
&$line_no: Pointer to line number where to start parsing. It contains the line number of the end of the block on return.
Parse note to extract contest distance or interval training expression
Contest distance / Internal expression is in { }
- Contest distance is D=<distance>, where <distance> is number of meters or
<distance>m or <distance>k[m] or number of km if float number
(contains . or ,). <distance> can be also a keyword in
('marathon','half','semi').
- Interval training expression start with 'F='
Options also in { }
- Shoe used : S=<shoe-name>[:<distance>[k[m]]] where <distance> is initial
distance for shoe (in km if not specified)
string
_parse_note
(string $note, string &$exercise_type, integer &$distance, array &$int_training, array &$options)
-
string
$note: Exercise note
-
integer
&$distance: If 'contest' : official distance in meters
-
array
&$int_training: If 'int_training' : Array of interval training elements (index from 0) :
- repeat_nb : Nb of repetitions (integer >= 1)
- work_distance : Distance of effort in meters
- work_duration : Duration of effort in seconds
- reco_distance : Distance of recovery in meters
- reco_duration : Duration of recovery in seconds
-
array
&$options: : Associative array of options :
- shoe : Shoe name (ID)
- shoe_ini_dist : Shoe optional init distance (meters)
- footpod_id : Foot pod ID (1 digit, default : 1)
- footpod_batt : Battery initial use (sec x10)
-
string
&$exercise_type: &exercise_type exercise type : 'contest' for contest, 'int_training' for interval training, else 'training'.