trackerproject / trackeR

Infrastructure for Running, Cycling and Swimming Data from GPS-Enabled Tracking Devices
http://cran.r-project.org/package=trackeR
90 stars 7 forks source link

readGPX unable to identify indoor cycling (virtual ride) #17

Closed thethreshold closed 5 years ago

thethreshold commented 5 years ago

I have uploaded GPX file with a virtual ride on zwift. The activity does not identify as cycling or indoor cycling.

R>Test_2 <- readGPX(file = 'Over_unders.gpx', timezone = "GMT") R> trackeRdata(Test_2) Error in trackeRdata(Test_2) : could not identify the sport from the filename or the data

Over_Unders.zip

ikosmidis commented 5 years ago

trackeR tries hard to identify the sport from the contents of the raw data file. However, if it cannot definitively infer the sport it currently throws an error.

In those cases, if the user knows the sport, a simple workaround is to rename the file appending a sport-related keyword, e.g. swim, ride, run.

In your case, rename Over_unders.gpx to Over_unders_ride.gpx. Then

R> Test_2 <- readGPX(file = 'Over_unders_ride.gpx', timezone = "GMT")
R> trackeRdata(Test_2)

should work.