mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-09-24 08:27:37 +00:00
22 lines
382 B
Rust
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
|
|
}
|
|
}
|