Exemple #1
0
 protected function calculateVerticalRatioArray()
 {
     if (!$this->has(self::VERTICAL_RATIO)) {
         $RatioCalculator = new VerticalRatioCalculator($this);
         $RatioCalculator->calculate();
         $this->set(self::VERTICAL_RATIO, $RatioCalculator->verticalRatioData());
     }
 }
Exemple #2
0
 /**
  * Update vertical ratio
  */
 protected function updateVerticalRatio()
 {
     if ($this->hasChanged(Entity::SPORTID) || $this->hasChanged(Entity::VERTICAL_OSCILLATION) || $this->hasChanged(Entity::STRIDE_LENGTH)) {
         $this->NewObject->set(Entity::VERTICAL_RATIO, VerticalRatioCalculator::forActivity($this->NewObject));
     }
 }
Exemple #3
0
 /**
  * Calculate vertical ratio
  */
 protected function calculateVerticalRatio()
 {
     if ($this->Object->sportid() == Configuration::General()->runningSport()) {
         $this->Object->set(Entity::VERTICAL_RATIO, \Runalyze\Calculation\Activity\VerticalRatioCalculator::forActivity($this->Object));
     }
 }