Beispiel #1
0
     }
     if ($maxCTL != Configuration::Data()->maxCTL()) {
         Configuration::Data()->updateMaxCTL($maxCTL);
     }
 } else {
     $maxATL = Configuration::Data()->maxATL();
     $maxCTL = Configuration::Data()->maxCTL();
 }
 if (!Configuration::Trimp()->showInPercent()) {
     $maxATL = 100;
     $maxCTL = 100;
 }
 for ($d = $LowestIndex; $d <= $HighestIndex; $d++) {
     $index = Plot::dayOfYearToJStime($StartYear, $d - $AddDays + $StartDayInYear + 1);
     $ATLs[$index] = 100 * $TSBModel->fatigueAt($d - 1) / $maxATL;
     $CTLs[$index] = 100 * $TSBModel->fitnessAt($d - 1) / $maxCTL;
     $TRIMPs[$index] = $Trimps_raw[$d];
     if ($maxTrimp < $Trimps_raw[$d]) {
         $maxTrimp = $Trimps_raw[$d];
     }
     $VDOT_slice = array_slice($VDOTs_raw, $d - $VDOTdays, $VDOTdays);
     $Durations_slice = array_slice($Durations_raw, $d - $VDOTdays, $VDOTdays);
     $VDOT_sum = array_sum($VDOT_slice);
     $Durations_sum = array_sum($Durations_slice);
     if (count($VDOT_slice) != 0 && $Durations_sum != 0) {
         $VDOTs[$index] = Configuration::Data()->vdotFactor() * ($VDOT_sum / $Durations_sum);
     }
     if ($VDOTs_raw[$d]) {
         $VDOTsday[$index] = Configuration::Data()->vdotFactor() * ($VDOTs_raw[$d] / $Durations_raw[$d]);
     }
 }
Beispiel #2
0
     if ($perfmodel == 'tsb' && $maxCTL != Configuration::Data()->maxCTL()) {
         Configuration::Data()->updateMaxCTL($maxCTL);
     }
 } else {
     $maxATL = Configuration::Data()->maxATL();
     $maxCTL = Configuration::Data()->maxCTL();
 }
 $showInPercent = Configuration::Trimp()->showInPercent() && $perfmodel != 'banister';
 if (!$showInPercent) {
     $maxATL = 100;
     $maxCTL = 100;
 }
 for ($d = $LowestIndex; $d <= $HighestIndex; $d++) {
     $index = Plot::dayOfYearToJStime($StartYear, $d - $AddDays + $StartDayInYear);
     $ATLs[$index] = 100 * $performanceModel->fatigueAt($d) / $maxATL;
     $CTLs[$index] = 100 * $performanceModel->fitnessAt($d) / $maxCTL;
     $TSBs[$index] = 100 * $performanceModel->performanceAt($d) / $maxCTL;
     $TRIMPs[$index] = $Trimps_raw[$d];
     if ($maxTrimp < $Trimps_raw[$d]) {
         $maxTrimp = $Trimps_raw[$d];
     }
     $VDOT_slice = array_slice($VDOTs_raw, $d - $VDOTdays, $VDOTdays);
     $Durations_slice = array_slice($Durations_raw, $d - $VDOTdays, $VDOTdays);
     $VDOT_sum = array_sum($VDOT_slice);
     $Durations_sum = array_sum($Durations_slice);
     if (count($VDOT_slice) != 0 && $Durations_sum != 0) {
         $VDOTs[$index] = Configuration::Data()->vdotFactor() * ($VDOT_sum / $Durations_sum);
     }
     if ($VDOTs_raw[$d]) {
         $VDOTsday[$index] = Configuration::Data()->vdotFactor() * ($VDOTs_raw[$d] / $Durations_raw[$d]);
     }