mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-10-27 10:37:17 +00:00
progress
This commit is contained in:
1 parent
a486016d96
commit
497ac120ec
16 files changed
+604
-284
No files matched your search
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user