Author Topic: GPX tracklog playback tool - comments?  (Read 2808 times)

dbrb2

GPX tracklog playback tool - comments?
« on: 11 August, 2008, 09:09:41 pm »
Hi,

I wonder if anyone can comment on this:

GPX Playback

I wrote this after realising I had a load of GPX files that were records of very active events, but all the ways i had of viewing them were very static. This is my attempt at an interactive playback / analysis tool.

At the moment the GUI isn't that refined, but any feedback would be welcome. It takes a GPX file as input from the above page. The first time a file is uploaded there will be a slight delay while the file is parsed. After that, it can be accessed more quickly from the dropdown menu. Currently there is no login required.

This must contain, at a minimum, a tracklog with lat/longs and times. If it has elevation data, it will use this in a plot. This is then parsed into a JSON text file that is used by javascript to plot the route on a map. It also analyzes the track for useful stats, whichg are displayed. Fianlly it lets you "play" the track back, either at a user defined speed or by dragging a bar backwards/forwards.  Any suggestions or comments welcome :-)

Cheers,

Ben

Chris S

Re: GPX tracklog playback tool - comments?
« Reply #1 on: 11 August, 2008, 09:21:23 pm »
When I playback a ride, I load it into Google Earth (having converted the gpx to kml with GPSBabel).

I must admit I've never thought of playing a ride back on a map - I think I prefer the aerial view you get from GE...

Craig

Re: GPX tracklog playback tool - comments?
« Reply #2 on: 11 August, 2008, 09:53:27 pm »
Looks nice, and from a quick test seems to work fine (though a little slow / jerky in places).
Can I suggest that if you upload a file containing several tracks it splits them up somewhow. Maybe different coloured lines on the map, or some way of just playng back one?
And maybe something to indicate the playback speed - does repeatedly clicking on 'faster' make any difference?
And those graphs should be labelled as to what they are (I'm assuming speed and elevation). Maybe something to filter out velocity spikes.

Just wondering, how is the total ascent / descent calculated? Is it just the height difference between each trackpoint, summed up? Which might include elevation spikes etc.

HTH (not being critical, just a few suggestions or possible improvements).

dbrb2

Re: GPX tracklog playback tool - comments?
« Reply #3 on: 11 August, 2008, 10:03:43 pm »
Thanks for the feedback - much appreciated.  total ascent / descent, as you suspected, is simply gained by looking at the difference between succesive track points. If no elevation is provided in the log, there is nothing to work with, although I've been thinking about trying to get this from the NASA 90m survey.

Splitting by track segment I hadn't though of, but wouldn't be hard to implement.  I only ever tend to have one track per file, although my GPS splits it up into multiple segments by day. - I agree it would be nice to differentiate them.

Quantifying playback speed is a tough one - overheads in the javascript make it hard to give an accurate indication of playback speed. Clicking faster / slower repeatedly should increment / decrement the speed however. Perhaps I should replace those buttons with another slider.

I agree that units would be useful, both on the graphs, and on the stats. I also hope to add a moving marker on both plots to show exact position.

Slow speed - I have increased the default speed significantly. The jerkyness I have not noticed - obviously if you stop for a long time your point will also, and the longer the time between points the glower the playback resolution.


Re: GPX tracklog playback tool - comments?
« Reply #4 on: 12 August, 2008, 08:16:16 am »
Thanks for the feedback - much appreciated.  total ascent / descent, as you suspected, is simply gained by looking at the difference between succesive track points. If no elevation is provided in the log, there is nothing to work with, although I've been thinking about trying to get this from the NASA 90m survey.

Working out climbing from GPX files

There's not much there at the moment, but I've downloaded various DEM files notably the SRTM files that cover the UK. I'll update it soon with the latest work I've done. Even with the elevation data in the GPX file you can get rubbish results.

There's lots of useful stuff )info, links to DEMs, etc) on http://www.landserf.org/ (which is all the work of an Audaxer!).
"Yes please" said Squirrel "biscuits are our favourite things."

dbrb2

Re: GPX tracklog playback tool - comments?
« Reply #5 on: 12 August, 2008, 10:09:50 am »
I have noticed that in FF the site runs quite well, in IE it is significantly slower, and in both it could be quicker for large tracks. Over the w/e, if I have a chance, I will try to implement the following:

Faster loading times by reducing JSON file size
Different colours for different days within  one track

Re: GPX tracklog playback tool - comments?
« Reply #6 on: 12 August, 2008, 10:21:00 am »
Right. Just had a look, here are my comments:-

First off, it looks great! I also threw it a very large GPX file (8000 points) to see how it coped. It coped perfectly.

1) When printing the hours, minutes and seconds of times, make sure they are padded with a leading zero if less than 10, i.e.

 Total time (moving):   1:8:3:47

is much nicer displayed as: 1:08:03:47

2) A couple of times it moves on to areas where it hasn't loaded the maps yet (on default zoom). If I hit pause the missing map segments load almost straight away.

3) Could do with the top (map) section being resizable (so that more map is displayed).

Otherwise it's looking really good!
"Yes please" said Squirrel "biscuits are our favourite things."

Fidgetbuzz

  • L sp MOON. 1st R sp MARS . At X SO sp STARS
Re: GPX tracklog playback tool - comments?
« Reply #7 on: 12 August, 2008, 10:41:10 am »
Running in FF

That was fun - just re rode my Cheddar 300, and showed some of it to my wife !!

Agree with Greenbank - a larger map area would I think be a plus.
I was an accountant until I discovered Audax !!

Re: GPX tracklog playback tool - comments?
« Reply #8 on: 12 August, 2008, 10:50:21 am »
P.S. I'm running in FF (3.0.1) too. Memory usage goes up to about 300MB whilst processing, but drops right down to 40MB once the map, elevation plot and speed plots are displayed.

This is on a 1.6GHz laptop with 2GB RAM and it takes about 30 seconds from clicking OK on the GPX file to it all being loaded and running. 886KB GPX file with 8000 trackpoints.
"Yes please" said Squirrel "biscuits are our favourite things."

dbrb2

Re: GPX tracklog playback tool - comments?
« Reply #9 on: 13 August, 2008, 10:52:08 pm »
On the plus side:

Leading zeroes implemented
Map size increased
Each track segment now a different colour

On the downside:
I've managed to break it in IE...only works in FF at the mo :-)

dbrb2

Re: GPX tracklog playback tool - comments?
« Reply #10 on: 15 August, 2008, 12:35:42 pm »
I notice someone has uploaded a tracklog without timestamps. I wonder how common this is? At the moment it will fail with an error - but I could set the ting so that if there is no timestamp info it simply spaces the points evenly x seconds apart for playback. Should be quite easy to do actually...

Re: GPX tracklog playback tool - comments?
« Reply #11 on: 15 August, 2008, 12:40:59 pm »
I notice someone has uploaded a tracklog without timestamps. I wonder how common this is?

On the older Garmin GPSes (bog standard eTrex, etc) if you saved the active tracklog then it would strip out all of the timestmaps.

No idea why it did this (or why you'd want to do this) since there was no other storage other than the internal storage (i.e. no SD cards) and saving the track didn't free up any space. I only made this mistake once.
"Yes please" said Squirrel "biscuits are our favourite things."

frankly frankie

  • I kid you not
    • Fuchsiaphile
Re: GPX tracklog playback tool - comments?
« Reply #12 on: 15 August, 2008, 07:00:34 pm »
AFAIK all the Etrex (even the latest ones) and 60 and 76 series strip out the timestamps (and altitude) if you 'Save' a track.  Its because the saved tracks are subject to the 500-point limit and most tracks would have more than this number of points and so are downsampled as they are saved. 
You can get round it by always downloading the 'Active Track' - and on the card-carrying models by letting it log the track to the flash card (instead of 'saving' it), then its complete.
when you're dead you're done, so let the good times roll

dbrb2

Re: GPX tracklog playback tool - comments?
« Reply #13 on: 16 August, 2008, 12:00:13 pm »
Fixed in internet explorer!

Still annoyed by the speed of loading (up to a minute for a large track) , but there is quite a lot of data to be loaded for a large track. Unfortunately, because javascript can't do multithreading, while it processes the file it tends to hang the browser...


mattc

  • n.b. have grown beard since photo taken
    • Didcot Audaxes
Re: GPX tracklog playback tool - comments?
« Reply #14 on: 15 July, 2010, 05:57:40 pm »
Hi Ben,
Discovered this in the spring, and used it several times since - very useful!

Seems to have gone backwards this month:
I _thought_ that during playback, your progress was tracked on the elevation and speed graphs. Not any more. Unless I imagined it! (FF 3.6.6)

Anyway, thanks for such a uesful toy.

Matt
Has never ridden RAAM
---------
No.11  Because of the great host of those who dislike the least appearance of "swank " when they travel the roads and lanes. - From Kuklos' 39 Articles