Search by

endurance / route-fit

endurance

Streaming FIT Course validation and staged Endurance Route mapping

v0.2.0 2026-11-23 21:01 UTC

This package is auto-updated.

Last update: 2026-11-23 21:03:14 UTC


README

Validate a FIT Course and stage Endurance Route content for PHP 8.5.

composer require endurance/route-fit

Supply a compatible generated FIT Profile and caller-owned input/staging:

use Endurance\RouteFit\{FitCourseReader, FitCourseToRoute};

$items = FitCourseReader::standard($profileSet)->read($input);
foreach ($items as $item) {
    $stage($item);
}
$description = $items->getReturn();
$mapping = new FitCourseToRoute()->write(
    $description, $openPreparedRecords, $openPreparedCoursePoints,
    $revisionId, $reservedWriter, $sourceReference,
);
  • Consume through every CRC and final EOF before mapping. Early yields are provisional. Prepared factories must reopen unchanged verified data; memory stays bounded across multiple passes. The caller publishes/discards the reservation and owns input, spools and cleanup.
  • This Course interpretation requires Course/File Id, Lap, Record and supported timer structure. It performs no Activity repair. Missing positions split parts; partial coverage never implies a bridge or a navigation certificate.
  • Course Points attach only by an unambiguous exact timestamp/coordinate match. No nearest-point heuristic resolves repeated times or loop coordinates.
  • No Profile is bundled or inferred. Incompatible used semantics raise FitCourseProfileUnavailable, separately from InvalidFitCourse. Reports retain fixed diagnostics and the supplied Profile fingerprint.

Types in Internal and elements marked @internal are not public API.

License: MPL-2.0.