runalyze/age-grade

Age grading for race results (running) based on tables provided by WMA

2.2.0 2023-09-11 14:29 UTC

This package is auto-updated.

Last update: 2024-12-11 17:14:41 UTC


README

Latest Stable Version Build Status Code Coverage Scrutinizer Code Quality MIT License

Library to provide age grading for race results (running) based on tables provided by Alan Jones using standards by WMA (World Masters Athletics) and USATF (USA Track and Field).

Usage

use Runalyze\AgeGrade\Lookup;
use Runalyze\AgeGrade\Table\MaleTable;

$Lookup = new Lookup(new MaleTable(), 54);
echo $Lookup->getAgeGrade(10.0, 42 * 60 + 25); // output: 0.7329

Internally, getAgeGrade() returns an AgeGrade object that will return the rounded age grade value when transformed to a string. You can fetch more details by respective methods:

$Lookup = new Lookup(new MaleTable(), 54);
$AgeGrade = $Lookup->getAgeGrade(10.0, 42 * 60 + 25);
$AgeGrade->getPerformance(); // returns 0.7329
$AgeGrade->getAgeStandard(); // returns 1865
$AgeGrade->getOpenStandard(); // returns 1603
$AgeGrade->getAgeFactor(); // returns 0.8594

License