mbof / hxsync

MIT License
4 stars 0 forks source link

GPS log download creates invalid GPX file #22

Closed johannessen closed 6 months ago

johannessen commented 6 months ago

Downloading a GPS log from my HX870 resulted in a GPX file looking similar to the following (whitespace added here for clarity):

<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="Nghx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns="http://www.topografix.com/GPX/1/1"
 xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
<trk>
  <trkseg>
    <trkpt lat="59.59691390991211" lon="4.788832187652588">
      <ele>0</ele>
      <time>1592832147</time>
      <fix>2</fix>
      <spd>1</spd>
      <trk>273</trk>
    </trkpt>
  </trkseg>
</trk>
</gpx>

This XML doesn’t pass schema validation, which causes interoperability problems with some software such as QGIS.

See https://www.topografix.com/gpx.asp for further information. Perhaps the speed etc. could be added as a GPX comment in a <cmt> element.

mbof commented 6 months ago

Thanks for reporting! I think this is fixed.

Please give it a try at https://mbof.github.io/hx/ if you get a chance.

johannessen commented 6 months ago

Confirm fixed.

That was quick work! 😀