/** * Set running dynamics from array */ private function setRunningDynamicsFromArray() { $groundContact = $this->TrainingObject->getArrayGroundContact(); $oscillation = $this->TrainingObject->getArrayVerticalOscillation(); $verticalRatio = $this->TrainingObject->getArrayVerticalRatio(); $groundContactBalance = $this->TrainingObject->getArrayGroundContactBalance(); if (!empty($groundContact) && max($groundContact) > 30) { $groundContact = array_filter($groundContact, 'ParserAbstract__ArrayFilterForLowEntries'); $this->TrainingObject->setGroundContactTime(round(array_sum($groundContact) / count($groundContact))); } if (!empty($oscillation) && max($oscillation) > 30) { $oscillation = array_filter($oscillation); $this->TrainingObject->setVerticalOscillation(round(array_sum($oscillation) / count($oscillation))); } if (!empty($verticalRatio) && max($verticalRatio) > 30) { $verticalRatio = array_filter($verticalRatio, 'ParserAbstract__ArrayFilterForLowEntries'); $this->TrainingObject->setVerticalRatio(round(array_sum($verticalRatio) / count($verticalRatio))); } if (!empty($groundContactBalance) && max($groundContactBalance) > 30) { $groundContactBalance = array_filter($groundContactBalance, 'ParserAbstract__ArrayFilterForLowEntries'); $this->TrainingObject->setGroundContactBalance(round(array_sum($groundContactBalance) / count($groundContactBalance))); } }