Beispiel #1
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));
     }
 }
Beispiel #2
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));
     }
 }