/** * 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\Object $activity */ public function fromActivity(Activity\Object $activity) { if ($activity->vdotByHeartRate() > 0) { $this->Factor = $activity->vdotByTime() / $activity->vdotByHeartRate(); } else { $this->Factor = 1; } }
/** * VDOT by time * @return string */ public function vdotByTime() { return $this->formatVDOT($this->Activity->vdotByTime()); }