Preserve FIT records on the equator and prime meridian - #3
Open
bensynapse wants to merge 1 commit into
Open
bensynapse wants to merge 1 commit into
bensynapse wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I run Live Tennis API.
FIT records with zero latitude or zero longitude are currently discarded, so a route crossing the equator or prime meridian loses those points. Accept zero in either known position field, then apply the existing coordinate-pair validation. The invalid sentinel, range checks, and rejection of
(0, 0)are preserved. The parser's signature comparison also uses an equivalent byte string to satisfy strict Clippy.Three regressions cover both axes in both hemispheres, full-file parsing, invalid sentinels, and the existing
(0, 0)policy. All three fail before the fix. Validation on Rust 1.98.1/Linux:cargo test --workspace: 124 tests pass; original suite: 121 pass.cargo fmt --checkandcargo clippy -- -D warnings: pass.wasm-pack build --target weband the JavaScript package'snpm run build: pass.npm test -- --runInBand: 14 tests pass in the browser container with the pinned Chrome 121. Some Node cases use the harness's existing fallback, so I separately called the built ESMprocessGpxFileswith real WebAssembly on three FIT routes. The two zero-axis routes lose their middle point before the fix and retain it afterward; the positive-coordinate control works in both. Garmin's SDK decodes all three fixtures without errors.The existing compiled CommonJS entry point still errors under Node 22 because its directory declares
type: module; the compiled wrapper is byte-identical to upstream. The ESM path is verified. No generated bundles are included in this two-file change.