Files
gpx.studio/gpx-rs/src/gpx/segment.rs
T

22 lines
382 B
Rust
Raw Normal View History

2026-09-18 09:50:04 +02:00
use std::rc::Rc;
2026-09-18 09:03:51 +02:00
use crate::gpx::TrackPoint;
#[derive(Debug, Default)]
pub struct TrackSegment {
2026-09-18 09:50:04 +02:00
pub chunks: Vec<Rc<TrackPointChunk>>,
2026-09-18 09:03:51 +02:00
}
static MAX_CHUNK_SIZE: usize = 4096;
#[derive(Debug, Default)]
pub struct TrackPointChunk {
pub trkpt: Vec<TrackPoint>,
}
2026-09-18 09:50:04 +02:00
impl TrackPointChunk {
pub fn is_full(&self) -> bool {
self.trkpt.len() == MAX_CHUNK_SIZE
}
}