4949//!
5050//! # Units of measure
5151//!
52- //! Courses and related types here us zero-cost unit of measure types from
52+ //! Courses and related types here use zero-cost unit of measure types from
5353//! [dimensioned](https://docs.rs/dimensioned/latest/dimensioned/) to avoid type
54- //! confusion of speed and distance quantities, and analogous types implemented
55- //! here for angular degrees.
54+ //! confusion of speed and distance quantities, and analogous types are
55+ //! implemented here for angular degrees.
5656//!
5757//! You can obtain a dimensional quantity by multiplying a constant representing
5858//! the unit of measure, for example:
@@ -157,13 +157,21 @@ impl Default for CourseSetOptions {
157157}
158158
159159impl CourseSetOptions {
160+ /// Sets the threshold distance for course point interception
161+ ///
162+ /// Sets a distance, in meters, below which a waypoint may be considered to
163+ /// "intercept" a route, turning it into a course point.
160164 pub fn with_threshold ( self , threshold : Meter < f64 > ) -> Self {
161165 Self {
162166 threshold,
163167 strategy : self . strategy ,
164168 }
165169 }
166170
171+ /// Set strategy for handling duplicate intercepts
172+ ///
173+ /// Controls how waypoints that intercept the route multiple times (within
174+ /// the threshold) are handled.
167175 pub fn with_strategy ( self , strategy : InterceptStrategy ) -> Self {
168176 Self {
169177 threshold : self . threshold ,
@@ -172,7 +180,7 @@ impl CourseSetOptions {
172180 }
173181}
174182
175- /// A set of [`Course`]s and their associated course points.
183+ /// A collection of [`Course`]s and their associated course points.
176184pub struct CourseSet {
177185 /// Courses with any associated course points.
178186 pub courses : Vec < Course > ,
@@ -664,8 +672,8 @@ impl<'a> SegmentedCourseBuilder<'a> {
664672/// A course record
665673///
666674/// Represents a single point along a course, analogous to a route point or a
667- /// track point. However, a course record additionally contains the points'
668- /// cumulative distances along the course.
675+ /// track point. However, in contrast with a route point, a course record
676+ /// additionally contains the points' cumulative distances along the course.
669677#[ derive( Clone , PartialEq , Debug ) ]
670678pub struct Record {
671679 /// Position including optional elevation
@@ -715,8 +723,8 @@ impl TryFrom<Waypoint<GeoPoint>> for Waypoint<GeoAndXyzPoint> {
715723pub struct CoursePoint {
716724 /// Position of the point's interception with the course
717725 ///
718- /// Note that this is calculated as interception from the waypoint, so the
719- /// course point's position can be different from that of the original
726+ /// Note that this is calculated as the interception from the waypoint, so
727+ /// the course point's position can be different from that of the original
720728 /// waypoint.
721729 pub point : GeoPoint ,
722730
0 commit comments