/** * Guess heart rate * @param float $distance * @param int $seconds * @return float */ protected function guessHR($distance, $seconds) { if (self::$VDOTshape <= 0 || $seconds == 0) { return 0.5; } $Shape = new VDOT(self::$VDOTshape); $speed = 60 * 1000 * $distance / $seconds; $hr = VDOT::HRat($speed / $Shape->speed()); return $hr; }