Function convert_gpx_to_fit

Source
pub fn convert_gpx_to_fit<R: BufRead, W: Write>(
    gpx_input: R,
    fit_output: W,
    course_options: CourseSetOptions,
    fit_options: FitCourseOptions,
) -> Result<ConversionInfo>
Expand description

Convert GPX into a FIT course file

The BufRead bound on gpx_input is required by quick_xml, but this doesn’t imply by contrast this function will construct its own BufWrite for the output. fit_output should probably also be given as a buffered Write.

The GPX input is required to contain exactly one route or track, and may contain zero or more waypoints.

The fit_speed parameter sets a speed for placing timestamps along the FIT course. On compatible devices, this will determine the speed of the “virtual partner”.

This combines the behavior of read_gpx and write_fit_course.