mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-09-25 17:07:37 +00:00
28 lines
527 B
Rust
28 lines
527 B
Rust
use crate::gpx::{Trackpoint, Waypoint};
|
|
|
|
static MAX_TRKPT_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_TRKPT_CHUNK_SIZE
|
|
}
|
|
}
|
|
|
|
static MAX_WPT_CHUNK_SIZE: usize = 128;
|
|
|
|
#[derive(Debug, Default)]
|
|
pub struct WaypointChunk {
|
|
pub wpt: Vec<Waypoint>,
|
|
}
|
|
|
|
impl WaypointChunk {
|
|
pub fn is_full(&self) -> bool {
|
|
self.wpt.len() == MAX_WPT_CHUNK_SIZE
|
|
}
|
|
}
|