Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#5 closed task (fixed)

Upload workout tracking files

Reported by: borja Owned by: borja
Priority: major Milestone: OpenWorkouts 0.1
Component: tracking Keywords:
Cc:

Description

Once we have the workouts storage ready (#4), we will need a way to upload gps tracking information to the system, either to an existing workout or (used more often) to create a new workout based on that gps tracking information.

First we have to define which kind of files we will allow (gpx, tcx, fit, etc) and then decide how we will store them: save the files "as is", parse them and save the parsed data into the db (maybe keeping the original file around).

This is directly related to the way we will show data on a map (what kind of files do we need for that, for example, if we are going to use a static file to provide the info when rendering the map).

Once some tracking information has been uploaded, some of that information should be "modifiable" using the workouts editing UI (#4) (we still have to define which info exactly).

Open question: How should we deal with incorrect file uploading? That is, I decide to upload a gps tracking file to a workout, but then I realize that I had chosen the wrong file. How could I fix it?

  1. Remove workout, re-upload file and create new workout
  1. Upload new file on the existing workout, overwriting existing data
  1. (put more options here and let's discuss about it)

Change History (5)

comment:1 Changed 9 years ago by betabug

File formats: The most important ones are FIT (for gps devices like garmins) and GPX (what most phone apps seem to export). For FIT there is the python library "fitparse". I've seen some js code that gets the duration and distance out of GPX, since GPX is XML, it shouldn't be so difficult.

I would store uploaded gps tracks in a blob file. That way it is kept around, but it doesn't bloat the ZODB.

In e... all the info is editable, which makes sense. When your phone ran out of battery after 30km, but you know you did 40km, you can add that.

For replacing, the easiest way for a start is to let the user deal with it: delete the workout, upload again. If we then feel like we need more, we can add that feature.

comment:2 Changed 9 years ago by borja

  • Owner set to borja
  • Status changed from new to accepted

comment:3 Changed 8 years ago by borja

  • Resolution set to fixed
  • Status changed from accepted to closed

Our current code support GPX (1.0, 1.1 with extensions). A user can create a workout by uploading a gpx file, then the user can update the workout uploading a new gpx file to it, or he can edit by hand the values recorded (careful, this does not change the attached gpx file, as only basic data can be changed - title, descr, distance, time...)

There is still room for improvement in the gpx loading code (like the hack using minidom we added to retrieve gpx 1.1 extensions data - [102/OpenWorkouts] / [103/OpenWorkouts]) and we still have to add support for other file formats (fit and tcx to begin with). But those can be handled in separate tickets.

comment:4 Changed 8 years ago by borja

  • Milestone changed from milestone1 to milestone 0.1

Milestone renamed

comment:5 Changed 8 years ago by borja

  • Milestone changed from milestone 0.1 to OpenWorkouts 0.1

Milestone renamed

Note: See TracTickets for help on using tickets.