Example #1
0
 /**
  * VDOT by time
  * @return string
  */
 public function vdotByTime()
 {
     return $this->formatVDOT($this->Activity->vdotByTime());
 }
Example #2
0
 /**
  * Calculate factor from activity
  * 
  * Simply calculates the ratio of vdot by time and by heart rate.
  * This method does not regard any other correction (e.g. elevation, ...).
  * 
  * @param \Runalyze\Model\Activity\Entity $activity
  */
 public function fromActivity(Activity\Entity $activity)
 {
     if ($activity->vdotByHeartRate() > 0) {
         $this->Factor = $activity->vdotByTime() / $activity->vdotByHeartRate();
     } else {
         $this->Factor = 1;
     }
 }