示例#1
0
文件: Intensity.php 项目: 9x/Runalyze
 /**
  * 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;
 }