1

Sometimes the .gpx file that you obtain from your GPS-Device does not deliver the speed. The file looks like this:

[...]
<trkpt lat="59.4179482758" lon="3.6870684847">
    <ele>518.38</ele>
    <time>2016-07-17T08:27:18Z</time>
</trkpt>
[...]

The speed is missing. How is it possible to obtain the speed?

coding_bird
  • 899
  • 2
  • 9
  • 21
  • 1
    Please [edit] your question to include some examples, and more information about what you're asking. Could it be that the recorded points were stationery and so there is no speed associated to it? – Midavalo Jul 17 '16 at 18:21
  • Thanks for your feedback. I edited the question and the answer again. Would be nice to get some thumbs up again, since this should be a relevant question. – coding_bird Jul 18 '16 at 08:52

1 Answers1

8

Download GPSBabel - for Ubuntu just use:

sudo apt-get install gpsbabel 

With this command you will get a .gpx file of all track points with the speed (meter/second):

gpsbabel -t -i gpx -f input.gpx -x track,speed -o gpx -F output.gpx

EDIT: please see comment by drnextgis - the command requres the addition of ',gpxver=1.0' and should therefore be as below:

 gpsbabel -t -i gpx -f input.gpx -x track,speed -o gpx,gpxver=1.0 -F output.gpx

The .gpx will look like this then:

[...]
<trkpt lat="59.414788801" lon="2.694040049">
    <ele>624.630000</ele>
    <time>2016-07-17T08:30:28Z</time>
    <speed>2.338139</speed>
</trkpt>
[...]

It is also possible to obtain other output formats like .csv:

gpsbabel -t -i gpx -f input.gpx -x track,speed -o unicsv -F output.csv

The result will look like this then:

No,Latitude,Longitude,Altitude,Speed,Date,Time
1,59.414697,3.693597,521.3,0.00,2016/07/17,10:30:14
2,59.414704,3.693641,521.3,3.28,2016/07/17,10:30:15
3,59.414789,3.694040,524.6,2.34,2016/07/17,10:30:28
[...]
Rostranimin
  • 2,980
  • 2
  • 26
  • 38
coding_bird
  • 899
  • 2
  • 9
  • 21
  • 2
    The speed element was removed from gpx version 1.1. For extracting speed you have to use "-o gpx,gpxver=1.0" option. – drnextgis Nov 24 '16 at 00:14
  • This gives me an output - but the speed doesn't appear to be in metres per second. I get radically different values for speed from the use of this site (which provides sensible values): http://www.javawa.nl/analyser_en.html – Rostranimin Feb 02 '17 at 17:50