Files
gpx.studio/gpx-rs/src/gpx/segment.rs
T
2026-09-18 09:50:04 +02:00

22 lines
382 B
Rust

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