Expand description
CoursePointer is a CLI tool and library for computing Garmin FIT courses and course points from routes and waypoints.
This crate helps waypoints (such as from a GPX file) appear in Up Ahead on compatible devices, like Fenix watches and Edge bicycle computers.
See the repo’s README for details about how this works and the problem it solves.
§Binary
The coursepointer
binary takes as input a GPX file containing a single
route or track, and outputs a Garmin FIT course file in which those of the
GPX’s waypoints that are within a threshold distance of the route/track have
been converted to FIT course points. Also see
README
for more information about using the binary.
§Library
The library crate contains the bulk of the binary’s logic. It builds on top of GeographicLib to compute the interception points and course distances of waypoints near routes or tracks, then encodes this all as a FIT course.
It also provides, in the course
module, lower-lever builders to compose
courses and course points out of routes and waypoints programmatically.
§Feature flags
-
cli
enables the additional dependencies needed by the CLI. This needs to be explicitly enabled if installing the CLI withcargo install
. -
rayon
enables computing course points in parallel using rayon. This improves the binary’s runtime significantly in stress tests, and at least doesn’t hurt in more typical cases, on my machine. Enabled by default. -
full-geolib
causes cxx_build to build all GeographicLib sources instead of a hand-picked subset. This is mainly useful when experimenting with new FFI additions, otherwise it simply slows the build down.
Modules§
- course
- Types for composing courses that contain course points
Structs§
- Conversion
Info - Summarizes the result of converting GPX into a FIT course
- Course
File - A write-only Garmin FIT course file
- Degree
- Angular degree
- FitCourse
Options - Options for writing a FIT course
- GeoPoint
- A point on the surface of the WGS84 ellipsoid
Enums§
- Course
Point Type - Course point types
- Course
Pointer Error - An error in a high-level library operation
- FitEncode
Error - An error when encoding to FIT
- Sport
- Sport types
Constants§
- DEG
- Angular degree
Functions§
- convert_
gpx_ to_ fit - Convert GPX into a FIT course file
- read_
gpx - Read a GPX file into a
CourseSet
- write_
fit_ course - Write a single
Course
into a GPX course file