/** * Display with heartrate */ protected function displayWithHeartrate() { $VDOT = new JD\VDOT($this->Context->activity()->vdotByHeartRate(), new JD\VDOTCorrector(Configuration::Data()->vdotFactor())); $vVDOTinPercent = JD\VDOT::percentageAt($this->Context->activity()->hrAvg() / Configuration::Data()->HRmax()); $Fieldset = new FormularFieldset(__('Correction: based on heartrate')); $Fieldset->setHtmlCode(' <p class="info small"> ' . __('Jack Daniels has tables to compare %HRmax and %vVDOT.') . '<br> ' . __('Because of a lot of influencing factors these computations are not always accurate.') . ' </p> <div class="w50"> <label>' . __('Heartrate') . '</label> <span class="as-input">' . $this->Context->dataview()->hrAvg()->inHRmax() . ' %HRmax</span> </div> <div class="w50 double-height-right"> <label>⇒ ' . __('VDOT') . '</label> <span class="as-input">' . $VDOT->uncorrectedValue() . '</span> </div> <div class="w50"> <label>' . __('equals') . '</label> <span class="as-input">' . round(100 * $vVDOTinPercent) . ' %vVDOT</span> </div> '); $Fieldset->display(); }
/** * Constructor * @param \Runalyze\View\Activity\Context $Context */ public function __construct(\Runalyze\View\Activity\Context $Context) { $Pace = clone $Context->dataview()->pace(); if (Configuration::General()->distanceUnitSystem()->isImperial()) { $Pace->setUnit(new PaceUnit\MinPerMile()); } else { $Pace->setUnit(new PaceUnit\MinPerKilometer()); } parent::__construct($Pace->value(), $Pace->appendix(), 'ø ' . __('Pace')); }
/** * Display rounds */ protected function displayTable() { $this->DemandedPace->setUnit($this->Context->sport()->paceUnit()); $Table = new Table($this->Laps, $this->DemandedTime, $this->DemandedPace, $this->Context->sport()->id() == Configuration::General()->runningSport()); if ($this->LapDistance > 0) { $Table->setAverage($this->Context->dataview()->pace(), new Duration($this->Context->trackdata()->totalTime() / $this->Context->trackdata()->totalDistance() * $this->LapDistance)); } else { $Table->setAverage($this->Context->dataview()->pace()); } $Table->display(); }
/** * Display header */ protected function displayHeader() { echo '<div class="panel-heading">'; if (!Request::isOnSharedPage()) { $this->displayHeaderMenu(); } else { $this->displaySharedMenu(); } echo '<h1>' . $this->Context->dataview()->titleWithComment() . '</h1>'; if (!Request::isOnSharedPage()) { $this->displayReloadLink(); } echo '</div>'; }
/** * Display standard values */ protected function displayStandardValues() { if ($this->manualElevation != $this->calculatedElevation) { $Linker = new Runalyze\View\Activity\Linker($this->Context->activity()); $useCalculatedValueLink = Ajax::window('<a class="small as-input" href="' . $Linker->urlToElevationInfo('use-calculated-value=true') . '">» ' . __('apply data') . '</a>', 'small'); } else { $useCalculatedValueLink = ''; } $Fieldset = new FormularFieldset(__('General data')); $Fieldset->setHtmlCode(' <div class="w50"> <label>' . Ajax::tooltip(__('manual value'), __('If you did not insert a value by hand, this value has been calculated.')) . '</label> <span class="as-input">' . $this->manualElevation . ' m</span> </div> <div class="w50"> <label>' . __('Lowest point') . '</label> <span class="as-input">' . $this->lowestPoint . ' m</span> </div> <div class="w50"> <label>' . Ajax::tooltip(__('calculated value'), __('This value is calculated with your current configuration. The saved value may be outdated.')) . '</label> <span class="as-input">' . $this->calculatedElevation . ' m</span> ' . $useCalculatedValueLink . ' </div> <div class="w50"> <label>' . __('Highest point') . '</label> <span class="as-input">' . $this->highestPoint . ' m</span> </div> <div class="w50"> <label>ø ' . __('Gradient') . '</label> <span class="as-input">' . $this->Context->dataview()->gradientInPercent() . '</span> </div> <div class="w50"> <label>' . __('Up/Down') . '</label> <span class="as-input">+' . $this->Context->route()->elevationUp() . 'm / -' . $this->Context->route()->elevationDown() . 'm</span> </div> '); $Fieldset->display(); }
/** * Constructor * @param \Runalyze\View\Activity\Context $Context */ public function __construct(\Runalyze\View\Activity\Context $Context) { $WindChillFactor = $Context->dataview()->windChillFactor(); parent::__construct(round($WindChillFactor->valueInPreferredUnit()), $WindChillFactor->unit(), $WindChillFactor->label()); }
/** * Constructor * @param \Runalyze\View\Activity\Context $Context */ public function __construct(\Runalyze\View\Activity\Context $Context) { $StrideLength = $Context->dataview()->strideLength(); parent::__construct(\Helper::Unknown($StrideLength->valueInPreferredUnit(), '-'), $StrideLength->unit(), $StrideLength->label()); }
/** * Constructor * @param \Runalyze\View\Activity\Context $Context */ public function __construct(\Runalyze\View\Activity\Context $Context) { $Elevation = $Context->dataview()->elevation(); parent::__construct(\Helper::Unknown($Elevation->valueInPreferredUnit(), '-'), $Elevation->unit(), $Elevation->label()); }
/** * Constructor * @param \Runalyze\View\Activity\Context $Context */ public function __construct(\Runalyze\View\Activity\Context $Context) { parent::__construct(\Helper::Unknown(substr($Context->dataview()->gradientInPercent(), 0, -11), '-'), '%', __('ø Gradient')); }
/** * Constructor * @param \Runalyze\View\Activity\Context $Context */ public function __construct(\Runalyze\View\Activity\Context $Context) { $Pace = $Context->dataview()->pace(); parent::__construct($Pace->value(), $Pace->appendix(), 'ø ' . ($Pace->unit()->isTimeFormat() ? __('Pace') : __('Speed'))); }