init gpx library

This commit is contained in:
vcoppe
2024-04-15 14:26:34 +02:00
parent 396aa9a765
commit f724467295
20 changed files with 9266 additions and 0 deletions

60
gpx/src/types.ts Normal file
View File

@@ -0,0 +1,60 @@
export type GPXFile = {
creator: string;
metadata: Metadata;
waypoints: Waypoint[];
tracks: Track[];
};
export type Metadata = {
name?: string;
desc?: string;
author?: Author;
link?: Link;
time?: Date;
};
export type Link = {
href: string;
text?: string;
type?: string;
};
export type Waypoint = {
lat: number;
lon: number;
ele?: number;
time?: Date;
name?: string;
cmt?: string;
desc?: string;
link?: Link;
sym?: string;
type?: string;
};
export type Track = {
name?: string;
cmt?: string;
desc?: string;
src?: string;
link?: Link;
type?: string;
trkseg: TrackSegment[];
};
export type TrackSegment = {
trkpt: TrackPoint[];
};
export type TrackPoint = {
lat: number;
lon: number;
ele?: number;
time?: Date;
};
export type Author = {
name?: string;
email?: string;
link?: Link;
};