コード例 #1
0
ファイル: class.VDOTinfo.php プロジェクト: n0rthface/Runalyze
    /**
     * 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 &#37;HRmax and &#37;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() . ' &#37;HRmax</span>
			</div>
			<div class="w50 double-height-right">
				<label>&rArr; ' . __('VDOT') . '</label>
				<span class="as-input">' . $VDOT->uncorrectedValue() . '</span>
			</div>
			<div class="w50">
				<label>' . __('equals') . '</label>
				<span class="as-input">' . round(100 * $vVDOTinPercent) . ' &#37;vVDOT</span>
			</div>
		');
        $Fieldset->display();
    }
コード例 #2
0
ファイル: PaceAlternative.php プロジェクト: guancio/Runalyze
 /**
  * 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(), '&oslash; ' . __('Pace'));
 }
コード例 #3
0
ファイル: Window.php プロジェクト: guancio/Runalyze
 /**
  * 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();
 }
コード例 #4
0
 /**
  * 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>';
 }
コード例 #5
0
    /**
     * 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') . '">&raquo; ' . __('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 . '&nbsp;m</span>
			</div>
			<div class="w50">
				<label>' . __('Lowest point') . '</label>
				<span class="as-input">' . $this->lowestPoint . '&nbsp;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 . '&nbsp;m</span> ' . $useCalculatedValueLink . '
			</div>
			<div class="w50">
				<label>' . __('Highest point') . '</label>
				<span class="as-input">' . $this->highestPoint . '&nbsp;m</span>
			</div>
			<div class="w50">
				<label>&oslash; ' . __('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();
    }
コード例 #6
0
 /**
  * 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());
 }
コード例 #7
0
ファイル: StrideLength.php プロジェクト: 9x/Runalyze
 /**
  * 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());
 }
コード例 #8
0
ファイル: Elevation.php プロジェクト: guancio/Runalyze
 /**
  * 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());
 }
コード例 #9
0
ファイル: Gradient.php プロジェクト: guancio/Runalyze
 /**
  * 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), '-'), '&#37;', __('&oslash; Gradient'));
 }
コード例 #10
0
ファイル: Pace.php プロジェクト: guancio/Runalyze
 /**
  * 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(), '&oslash; ' . ($Pace->unit()->isTimeFormat() ? __('Pace') : __('Speed')));
 }