pub struct WaypointPath { /* private fields */ }Expand description
A connected sequence of waypoints for distance, speed, and elevation analysis.
Implementations§
Source§impl WaypointPath
impl WaypointPath
Sourcepub fn from_slice(points: &[Waypoint]) -> Self
pub fn from_slice(points: &[Waypoint]) -> Self
Creates a path from a slice of waypoints.
Sourcepub fn with_options(self, options: AnalysisOptions) -> Self
pub fn with_options(self, options: AnalysisOptions) -> Self
Returns a copy of this path with custom analysis thresholds.
Sourcepub fn from_track(track: &Track) -> Vec<WaypointPath>
pub fn from_track(track: &Track) -> Vec<WaypointPath>
One WaypointPath per track segment, preserving GPX gap semantics.
Sourcepub fn total_distance(&self) -> f64
pub fn total_distance(&self) -> f64
Total horizontal distance along the path, in meters.
Sourcepub fn duration(&self) -> Option<Duration>
pub fn duration(&self) -> Option<Duration>
Elapsed time from the first to the last timestamped point.
Sourcepub fn moving_duration(&self) -> Option<Duration>
pub fn moving_duration(&self) -> Option<Duration>
Time spent moving (legs at or above the moving-speed threshold).
Sourcepub fn average_speed(&self) -> Option<f64>
pub fn average_speed(&self) -> Option<f64>
Average speed over the full duration, in m/s.
Sourcepub fn average_moving_speed(&self) -> Option<f64>
pub fn average_moving_speed(&self) -> Option<f64>
Average speed over moving time only, in m/s.
Sourcepub fn speeds(&self) -> Vec<Option<f64>>
pub fn speeds(&self) -> Vec<Option<f64>>
Instantaneous speed for each leg (length = points - 1), in m/s.
Sourcepub fn speed_profile(&self) -> Vec<SpeedProfilePoint>
pub fn speed_profile(&self) -> Vec<SpeedProfilePoint>
Timestamp versus speed at the start of each timed leg.
Sourcepub fn elevations(&self) -> Vec<Option<f64>>
pub fn elevations(&self) -> Vec<Option<f64>>
Per-point elevation values, when present.
Sourcepub fn average_elevation(&self) -> Option<f64>
pub fn average_elevation(&self) -> Option<f64>
Mean elevation over points that have elevation data.
Sourcepub fn max_elevation(&self) -> Option<f64>
pub fn max_elevation(&self) -> Option<f64>
Highest elevation among points with elevation data.
Sourcepub fn min_elevation(&self) -> Option<f64>
pub fn min_elevation(&self) -> Option<f64>
Lowest elevation among points with elevation data.
Sourcepub fn elevation_difference(&self) -> Option<f64>
pub fn elevation_difference(&self) -> Option<f64>
Elevation range from lowest to highest point with elevation data.
Sourcepub fn diff_elevation(&self) -> Option<f64>
pub fn diff_elevation(&self) -> Option<f64>
Alias for elevation_difference.
Sourcepub fn total_ascent(&self) -> Option<f64>
pub fn total_ascent(&self) -> Option<f64>
Total uphill elevation gain between consecutive points with elevation data.
Sourcepub fn total_descent(&self) -> Option<f64>
pub fn total_descent(&self) -> Option<f64>
Total downhill elevation loss between consecutive points with elevation data.
Sourcepub fn elevation_profile(&self) -> Vec<ProfilePoint>
pub fn elevation_profile(&self) -> Vec<ProfilePoint>
Distance versus elevation for points with elevation data.
Distance is accumulated only between consecutive elevation-known points.
Trait Implementations§
Source§impl Clone for WaypointPath
impl Clone for WaypointPath
Source§fn clone(&self) -> WaypointPath
fn clone(&self) -> WaypointPath
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WaypointPath
impl Debug for WaypointPath
Source§impl From<&Route> for WaypointPath
impl From<&Route> for WaypointPath
Source§impl From<&TrackSegment> for WaypointPath
impl From<&TrackSegment> for WaypointPath
Source§fn from(segment: &TrackSegment) -> Self
fn from(segment: &TrackSegment) -> Self
Source§impl<'a> IntoIterator for &'a WaypointPath
impl<'a> IntoIterator for &'a WaypointPath
Source§impl PartialEq for WaypointPath
impl PartialEq for WaypointPath
Source§fn eq(&self, other: &WaypointPath) -> bool
fn eq(&self, other: &WaypointPath) -> bool
self and other values to be equal, and is used by ==.