importGPX: Import GPX tracks

View source: R/importGPX.R

importGPXR Documentation

Import GPX tracks

Description

Import GPX tracks from commercial GPS equipment as a data.table ready for velocity function estimation. Note that the output coordinates must still be converted to a conformal projection in meters if they are to be used in functions other than getVelocity, dtVelocity, or downsampleXYZ.

Usage

importGPX(track)

Arguments

track

A character string the filepaths pointing to the location of the GPX file

Value

A data.table with five or six columns:

(1) $TrackID The name of the input GPX track

(2) $PID The order that point appeared in the GPX file

(3) $t The time stamp, with a starting date of January 1st, 1900 if no day is listed

(4) $long The longitude in decimal degrees

(5) $lat The latitude in decimal degrees

(6) $z The elevation (if present)

Examples

# Get a list of GPX tracks in a directory
gpx <-  list.files(pattern = ".gpx$")

## Convert the first file to data.table (not run)
# gpx <- importGPX(gpx[1])
# Convert all the files to data.tables
gpx <- lapply(gpx, importGPX)

andresgmejiar/lbmech documentation built on Feb. 2, 2025, 12:37 a.m.