endurance / route-fit
Streaming FIT Course validation and staged Endurance Route mapping
v0.2.0
2026-11-23 21:01 UTC
Requires
- php: ^8.5
- endurance/fit: ^0.2.0
- endurance/foundation: ^0.2.0
- endurance/geo: ^0.2.0
- endurance/route: ^0.2.0
Requires (Dev)
- phpunit/phpunit: ^12.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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 fromInvalidFitCourse. Reports retain fixed diagnostics and the supplied Profile fingerprint.
Types in Internal and elements marked @internal are not public API.
License: MPL-2.0.