This commit is contained in:
vcoppe committed 2026-09-23 19:53:39 +02:00
1 parent a486016d96
commit 497ac120ec
16 files changed
+604 -284

No files matched your search

+7 -1
View File
@@ -1,7 +1,7 @@
use crate::gpx::LngLat;
#[derive(Debug, Default)]
pub struct TrackPoint {
pub struct Trackpoint {
pub coordinates: LngLat,
pub ele: f64,
pub time: Option<i64>,
@@ -11,3 +11,9 @@ pub struct TrackPoint {
pub power: Option<u16>,
// TODO OSM data? or store intervals at a higher level?
}
impl Trackpoint {
pub fn time_diff(&self, other: &Trackpoint) -> Option<i64> {
self.time.zip(other.time).map(|(t1, t2)| t1 - t2)
}
}