Missing speed in gpx file

Started by Michael Niestegge, October 04, 2013, 08:39:06

0 Members and 1 Guest are viewing this topic.

Michael Niestegge

Good morning,

since the last update, my cadence/speed sensor (Garmin) thankfully works again. But now the information about the current speed given by the sensor is missing in the gpx file? The old version of locus exported it in the <speed> tag, which is not standard:


<trkpt lat="52.079580" lon="6.795026">
<ele>89.15</ele>
<time>2013-08-21T17:38:46Z</time>
<pdop>9.00</pdop>
<course>250.900</course>
<speed>4.52</speed>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:cad>12</gpxtpx:cad>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>


The new locus does not have this tag anymore?


<trkpt lat="52.031137" lon="7.838507">
<ele>95.33</ele>
<time>2013-10-03T07:29:35Z</time>
<pdop>5.00</pdop>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:cad>96</gpxtpx:cad>
<gpxtpx:hr>165</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>


How can I get the sensor speed? Because the gps speed is very inaccurate
  •  

Menion

Hello Michael,
  you wrote that speed tag in previous versions was "not standard". This is also a reason why I removed it. But exists and "standard" alternative for this? Because I wasn't able to find any ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Michael Niestegge

#2
Speed was a tag in gpx 1.0 but removed with gpx 1.1. It was removed because you can calculate speed by the given coordinates...I think they missed the usage of accurate speed in cycling for example...
Is it a drawback to keep the speed tag, even being not standard? Another possibility would be using gpx 1.0 instead of 1.1. A solution would be great, because I use your software as cycling computer :-)

Edit: Maybe the <extensions> tag is the way to go? I saw some solutions using it to store nmea informations.
  •  

Menion

I know, <speed> is used if you export GPX in 1.0 from Locus.

If you remember, in previous versions was checkbox "Compatible with Garmin", where I during export, removed some tags, because they caused some problems with Garmin devices and software. So I wanted to keep export to GPX as much standartized as possible ...

anyway you're using some own post processing? If it has sense, if I put speed from sensor to some <locus:senSpeed> tag ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Michael Niestegge

I export the gpx-file to Trainingstagebuch.org directly out of locus. As mentioned in my editing of my previous post: Maybe you could add some kind of tag inside a <extensions> tag? I think this best way to get a valid gpx-1.1 file and include the ant+-speed in it?
  •  

Menion

yes, I can do this like here

<trkpt lat="50.171034" lon="14.651464">
<ele>270.21</ele>
<time>2013-09-07T12:04:21Z</time>
<pdop>5.00</pdop>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:cad>50</gpxtpx:cad>
<gpxtpx:hr>104</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
<locus:TrackPointExtension>
<locus:senSpeed>0.0</locus:senSpeed>
<locus:senStrides>0.0</locus:senStrides>
</locus:TrackPointExtension>
</extensions>
</trkpt>


but will this has some sence if no program will be able to read and display these values?
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Michael Niestegge

#6
I would write an email to the developer of trainingstagbuch.org. In the past he was very friendly an quick in implementing new thins into his import. Maybe he would also add this extension to his code. I will take your example and send it with my mail. I will post his response here.

Edit: Ticket (German): https://trainingdiary.zendesk.com/requests/56991
  •  

jusc

Of course the exported gpx files are readable with other programs, but are they really version GPX 1.1?
If I test them with a GPX validator  from http://www.topografix.com/gpx_validation.asp I get a lot of error messages.
(Sax2Count.exe -v=always -n -s -f my_gpx_file.gpx)

Regards J.
  •  

Menion

hmm and what do your Sax2Count.exe -v=always -n -s -f my_gpx_file.gpx??

Because, yes it throws quite a lot of errors, but also errors like

Error at file e:\_dev_temp\GPXs\xerces-c-3.1.1-x86-windows-vc-10.0\bin/2013-09-0
7_14-02-44.gpx, line 4236, char 28
  Message: attribute 'lon' is not declared for element 'trkpt'


If I run validation by command on link you provided, then result is correct (this just mean that XML file is correctly formated)


- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Michael Niestegge

Got the feedback from Nils, who is the developer of trainingstagebuch.org:

He implemented it the way you showed it in the example, but he, and me also, has no idea, what the <Locus:SenStrides>-Tag is meant for? Furthermore Nils suggests that it would be a great idea to add the distance to the <Extensions>-Tag.
  •  

jusc

#10
Quote from: menion on October 04, 2013, 11:54:35
hmm and what do your Sax2Count.exe -v=always -n -s -f my_gpx_file.gpx??

Because, yes it throws quite a lot of errors, but also errors like

Error at file e:\_dev_temp\GPXs\xerces-c-3.1.1-x86-windows-vc-10.0\bin/2013-09-0
7_14-02-44.gpx, line 4236, char 28
  Message: attribute 'lon' is not declared for element 'trkpt'


If I run validation by command on link you provided, then result is correct (this just mean that XML file is correctly formated)



Maybe there is nothig to do. But I read in the German Naviboard, (http://www.naviboard.de/vb/showthread.php?t=55806) that for using GPX files with Garmin devices, It seems to be neccessary that the order of the elements in this file must be hold, and you can test it with this tool.

Another point is, that I export automatically my tracks to gpx files and where is the speed tag already included:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<gpx version="1.0" creator="Locus Android"
xmlns="http://www.topografix.com/GPX/1/0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:locus="http://www.locusmap.eu"
xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
<trk>
<name><![CDATA[2013-10-03 10:43:30]]></name>
<desc><![CDATA[2h:39m:38s | 39.1 km

Länge - 39.1 km
Punkte (POI) - 1506
Erstellt - 2013-10-03 10:43:42
Max. Geschwindigkeit - 40.8 km/h
Min. Höhe - 60 m
Max. Höhe - 143 m
]]></desc>
<trkseg>
<trkpt lat="52.130589" lon="7.399769">
<ele>71.80</ele>
<time>2013-10-03T08:43:42Z</time>
<pdop>10.00</pdop>
[b]<speed>0.25</speed>[/b]
<course>202.000</course>
</trkpt>
<trkpt lat="52.130636" lon="7.399775">
<ele>66.42</ele>
<time>2013-10-03T08:43:48Z</time>
<pdop>35.00</pdop>
<speed>0.19</speed>
<course>172.000</course>
</trkpt>




So I wonder a bit that that Michael can´t find it....
Regards J.
  •  

Michael Niestegge

Quote
Another point is, that I export automatically my tracks to gpx files and where is the speed tag already included:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<gpx version="1.0" creator="Locus Android"
xmlns="http://www.topografix.com/GPX/1/0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:locus="http://www.locusmap.eu"
xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
<trk>
<name><![CDATA[2013-10-03 10:43:30]]></name>
<desc><![CDATA[2h:39m:38s | 39.1 km

Länge - 39.1 km
Punkte (POI) - 1506
Erstellt - 2013-10-03 10:43:42
Max. Geschwindigkeit - 40.8 km/h
Min. Höhe - 60 m
Max. Höhe - 143 m
]]></desc>
<trkseg>
<trkpt lat="52.130589" lon="7.399769">
<ele>71.80</ele>
<time>2013-10-03T08:43:42Z</time>
<pdop>10.00</pdop>
[b]<speed>0.25</speed>[/b]
<course>202.000</course>
</trkpt>
<trkpt lat="52.130636" lon="7.399775">
<ele>66.42</ele>
<time>2013-10-03T08:43:48Z</time>
<pdop>35.00</pdop>
<speed>0.19</speed>
<course>172.000</course>
</trkpt>




So I wonder a bit that that Michael can´t find it....

Which version of locus pro do you use? Mine is 2.16.0. Older versions had the <speed> and <course> tag, but it is gone in the newest version.
  •  

jusc

I use 2.16.0 too, export format is GPX and not Trainingstagebuch.org
Regards J.
  •  

Menion

it depend on gpx version. speed is in v1.0, but isn't in v1.1
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Michael Niestegge

Quote from: jusc on October 04, 2013, 15:02:49
I use 2.16.0 too, export format is GPX and not Trainingstagebuch.org
Ah ok. As Menion said, it depends on the gpx-Version. I suggest you selected 1.0.

@Menion: Perhaps you didn't read it ;) :

Quote from: Michael Niestegge on October 04, 2013, 13:15:02
Got the feedback from Nils, who is the developer of trainingstagebuch.org:

He implemented it the way you showed it in the example, but he, and me also, has no idea, what the <Locus:SenStrides>-Tag is meant for? Furthermore Nils suggests that it would be a great idea to add the distance to the <Extensions>-Tag.
  •