Skip navigation.

/ \
Bug Name: invalid gpx
Status: Fixed
Priority: Medium
Date: 25th Sep 2008
Project Link: WhereAmI
Bug Report: WhereAmI v0.11 generates invalid gpx (xml), making it impossible to further process it (in eg. MapSource).

1) <gpx version="1.1" ...> needs a "creator" attribute, ie.

<gpx version="1.1" ... creator="WhereAmI - v0.11 (The Travellers Buddy), www.symbianos.org ...>

2) <trkpt ... <extensions><speed>NaN</speed><angle>NaN</angle></extensions></trkpt> is invalid:

cvc-complex-type.2.4.a: Invalid content was found starting with element 'speed'. One of '{WC[##other:"www.topografix.com}' www.topografix.com] is expected.

according to the gpx developers forum 1, <speed> was accidentally (sic) removed from gpx 1.1 2. this leaves us with the following choices to fix the xml:

a) go back to gpx 1.0. this would require some changes to the gpx, ie.

  • removing <metadata>
  • putting <speed> before <hdop> and <sat> (gpx(1.0).xsd: <!-- elements must appear in this order -->)
  • changing <angle> to <course>, see below, and moving it before <speed>, see above
  • "NaN" is not a valid value for <speed> or <course>
b) put the <speed> into a gpx 1.1 <trkpt><extensions> 3. in contrast to the current implementation (<extensions><speed>0.544277</speed> ...), this needs a reference to another schema that defines <speed>, ie.

<gpx ... xmlns:ext="example.com xmlns:xsi="www.w3.org xsi:schemaLocation="example.com example.com ... <trkpt> ... <extensions><ext:speed>0.077754</ext:speed></extensions></trkpt>

i haven't found such an extension, though (neither among the garmin 4 nor the topografix "extended" schemas 5), so you might have to define it yourself.

c) remove <speed>

3) <angle> is not defined in neither 1.0 nor 1.1. there is <course> in 1.0, guess that's what it is supposed to be. one more reason to go back to 1.0. or b) or c) above.

hope that helps.

ax

1 tech.groups.yahoo.com 2 tech.groups.yahoo.com 3 www.topografix.com 4 developer.garmin.com 5 tech.groups.yahoo.com
Owner:

\ /
 
[ NOTE SymbianOS.org is developed and maintained by a group of independent hackers and is by no means related to or sponsored by Symbian Ltd.   Debian Valid CSS! Valid HTML 4.01! ]