Loading ...
Sorry, an error occurred while loading the content.

Course element

Expand Messages
  • cbyh
    I am a bit confused about the use of in GPX files. I am producing a GPS file using the 1.0 schema containing a track - here is a small part of it:
    Message 1 of 10 , May 16, 2012
    • 0 Attachment
      I am a bit confused about the use of <course> in GPX files.

      I am producing a GPS file using the 1.0 schema containing a track - here is a small part of it:

      <trk>
      <trkseg>
      <trkpt lat="10.311063" lon="-84.813530">
      <ele>1401.10</ele>
      <speed>3.33</speed>
      <course>334.3</course>
      <time>2012-05-04T21:00:38Z</time>
      </trkpt>
      <trkpt lat="10.311522" lon="-84.813217">
      <ele>1434.90</ele>
      <speed>8.64</speed>
      <course>46.0</course>
      <time>2012-05-04T21:00:48Z</time>
      </trkpt>

      As recommended I have run it through SaxCount using the command:

      SaxCount.exe -v=always -n -s -f myfile.gpx

      and it gives lots of errors like this:

      Error at file myfile.gpx, line 1653, char 15
      Message: element 'course' is not allowed for content model '(ele?,time?,course
      ?,speed?,magvar?,geoidheight?,name?,cmt?,desc?,src?,url?,urlname?,sym?,type?,fix
      ?,sat?,hdop?,vdop?,pdop?,ageofdgpsdata?,dgpsid?,)'

      which seems to be saying that "course" is not an allowed element. But the schema at http://www.topografix.com/GPX/1/0/gpx.xsd contains:

      <xsd:element name="trkpt" minOccurs="0" maxOccurs="unbounded"><xsd:complexType><xsd:sequence><!-- elements must appear in this order --><!-- Position info --><xsd:element name="ele" type="xsd:decimal" minOccurs="0"/><xsd:element name="time" type="xsd:dateTime" minOccurs="0"/><xsd:element name="course" type="gpx:degreesType" minOccurs="0"/><xsd:element name="speed" type="xsd:decimal" minOccurs="0"/><xsd:element name="magvar" type="gpx:degreesType" minOccurs="0"/><xsd:element name="geoidheight" type="xsd:decimal" minOccurs="0"/>

      which definitely shows that course IS an allowed element.

      I can't imagine that course would be disallowed in a trkpt.

      Does anyone know what is wrong here?
    • Robert Lipe
      ... [ ... ] ... That s not quite what it says. It says it s not allowed where you have it. ... See highlighted bit above. Order counts. ... It s worth
      Message 2 of 10 , May 16, 2012
      • 0 Attachment
        >
        > <trk>
        > <trkseg>
        > <trkpt lat="10.311063" lon="-84.813530">
        > <ele>1401.10</ele>
        > <speed>3.33</speed>
        > <course>334.3</course>
        > <time>2012-05-04T21:00:38Z</time>
        > </trkpt>
        >
        [ ... ]

        > and it gives lots of errors like this:
        >
        > Error at file myfile.gpx, line 1653, char 15
        > Message: element 'course' is not allowed for content model
        > '(ele?,time?,course
        >
        > ?,speed?,magvar?,geoidheight?,name?,cmt?,desc?,src?,url?,urlname?,sym?,type?,fix
        > ?,sat?,hdop?,vdop?,pdop?,ageofdgpsdata?,dgpsid?,)'
        >
        > which seems to be saying that "course" is not an allowed element.


        That's not quite what it says. It says it's not allowed where you have it.


        > But the schema at http://www.topografix.com/GPX/1/0/gpx.xsd contains:
        >
        > <xsd:element name="trkpt" minOccurs="0"
        > maxOccurs="unbounded"><xsd:complexType><xsd:sequence><!-- elements must
        > appear in this order --><!-- Position info --><xsd:element name="ele"
        > type="xsd:decimal" minOccurs="0"/><xsd:element name="time"
        > type="xsd:dateTime" minOccurs="0"/><xsd:element name="course"
        > type="gpx:degreesType" minOccurs="0"/><xsd:element name="speed"
        > type="xsd:decimal" minOccurs="0"/><xsd:element name="magvar"
        > type="gpx:degreesType" minOccurs="0"/><xsd:element name="geoidheight"
        > type="xsd:decimal" minOccurs="0"/>
        >
        > which definitely shows that course IS an allowed element.
        >

        See highlighted bit above. Order counts.


        >
        > I can't imagine that course would be disallowed in a trkpt.


        It's worth mentioning that if you're computing course from successive GPS
        fixes instead of measuring course, it's probably not worth putting in the
        GPX at all and that course is not present in 1.1

        RJL


        [Non-text portions of this message have been removed]
      • Lynn W. Deffenbaugh (Mr)
        Maybe the comment that says elements must appear in this order in conjunction with the fact that is listed before in the schema but the
        Message 3 of 10 , May 16, 2012
        • 0 Attachment
          Maybe the comment that says "elements must appear in this order" in
          conjunction with the fact that <course> is listed before <speed> in the
          schema but the opposite order in your snippet? Just guessing here, but
          that's what my eye caught. If that's the case, then <time> must also be
          before <course>, but you're good with <ele> coming first by my reading.

          Lynn (D) - KJ4ERJ - Author of APRSISCE for Windows Mobile and Win32

          On 5/16/2012 7:42 AM, cbyh wrote:
          > I am a bit confused about the use of<course> in GPX files.
          >
          > I am producing a GPS file using the 1.0 schema containing a track - here is a small part of it:
          >
          > <trk>
          > <trkseg>
          > <trkpt lat="10.311063" lon="-84.813530">
          > <ele>1401.10</ele>
          > <speed>3.33</speed>
          > <course>334.3</course>
          > <time>2012-05-04T21:00:38Z</time>
          > </trkpt>
          > <trkpt lat="10.311522" lon="-84.813217">
          > <ele>1434.90</ele>
          > <speed>8.64</speed>
          > <course>46.0</course>
          > <time>2012-05-04T21:00:48Z</time>
          > </trkpt>
          >
          > As recommended I have run it through SaxCount using the command:
          >
          > SaxCount.exe -v=always -n -s -f myfile.gpx
          >
          > and it gives lots of errors like this:
          >
          > Error at file myfile.gpx, line 1653, char 15
          > Message: element 'course' is not allowed for content model '(ele?,time?,course
          > ?,speed?,magvar?,geoidheight?,name?,cmt?,desc?,src?,url?,urlname?,sym?,type?,fix
          > ?,sat?,hdop?,vdop?,pdop?,ageofdgpsdata?,dgpsid?,)'
          >
          > which seems to be saying that "course" is not an allowed element. But the schema at http://www.topografix.com/GPX/1/0/gpx.xsd contains:
          >
          > <xsd:element name="trkpt" minOccurs="0" maxOccurs="unbounded"><xsd:complexType><xsd:sequence><!-- elements must appear in this order --><!-- Position info --><xsd:element name="ele" type="xsd:decimal" minOccurs="0"/><xsd:element name="time" type="xsd:dateTime" minOccurs="0"/><xsd:element name="course" type="gpx:degreesType" minOccurs="0"/><xsd:element name="speed" type="xsd:decimal" minOccurs="0"/><xsd:element name="magvar" type="gpx:degreesType" minOccurs="0"/><xsd:element name="geoidheight" type="xsd:decimal" minOccurs="0"/>
          >
          > which definitely shows that course IS an allowed element.
          >
          > I can't imagine that course would be disallowed in a trkpt.
          >
          > Does anyone know what is wrong here?
          >
          >
          >
          >
          > ------------------------------------
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
        • cbyh
          Thanks. I should have noticed the . I ll give it another try using the correct order. ... I just checked and you
          Message 4 of 10 , May 16, 2012
          • 0 Attachment
            Thanks. I should have noticed the "<!-- elements must appear in this order -->". I'll give it another try using the correct order.

            > course is not present in 1.1

            I just checked and you are right - course and speed are missing from the 1.1 schema. That seems strange.

            Why have they been taken out?
          • Robert Lipe
            ... They were removed by mistake. By the time it was noticed, GPX was entrenched in so many devices and programs that changing it became problematic.
            Message 5 of 10 , May 16, 2012
            • 0 Attachment
              > > course is not present in 1.1
              >
              > I just checked and you are right - course and speed are missing from the
              > 1.1 schema. That seems strange.
              >
              > Why have they been taken out?


              They were removed by mistake. By the time it was noticed, GPX was
              entrenched in so many devices and programs that changing it became
              problematic. Various proposals for standarized extensions and a GPX 1.2
              haven't really gotten any traction.

              See the previous discussions on this:
              http://tech.groups.yahoo.com/group/gpsxml/message/650
              http://tech.groups.yahoo.com/group/gpsxml/message/746
              http://tech.groups.yahoo.com/group/gpsxml/message/984
              http://tech.groups.yahoo.com/group/gpsxml/message/1139
              http://tech.groups.yahoo.com/group/gpsxml/message/1996

              GPX is a victim of its own success.

              RJL


              [Non-text portions of this message have been removed]
            • cbyh
              ... Wow! Thanks for the links to the other threads. So I guess if I want to use speed and course then I will have to stick with the 1.0 schema. Is there a
              Message 6 of 10 , May 16, 2012
              • 0 Attachment
                > They were removed by mistake.

                Wow! Thanks for the links to the other threads.

                So I guess if I want to use speed and course then I will have to stick with the 1.0 schema.

                Is there a brief description somewhere of the differences and added features of 1.1 compared to 1.0 ?
              • Robert Lipe
                ... If you actually need them (many don t) your options are 1.0 or to create/use an extension as cited. ... There is probably discussion in the archives from
                Message 7 of 10 , May 16, 2012
                • 0 Attachment
                  >
                  > So I guess if I want to use speed and course then I will have to stick
                  > with the 1.0 schema.


                  If you actually need them (many don't) your options are 1.0 or to
                  create/use an extension as cited.


                  > Is there a brief description somewhere of the differences and added
                  > features of 1.1 compared to 1.0 ?


                  There is probably discussion in the archives from when we created 1.1.

                  The schemas are authoritative, but from the top of my head, <metadata>
                  moved, <link> was changed to allow multiple links and introduce an
                  incompatible syntax, and <extension> was added throughout.


                  [Non-text portions of this message have been removed]
                • cbyh
                  Thanks. So for fairly simple use, probably better to stick with 1.0.
                  Message 8 of 10 , May 16, 2012
                  • 0 Attachment
                    Thanks. So for fairly simple use, probably better to stick with 1.0.
                  • phil_hornby
                    ... ... ...
                    Message 9 of 10 , May 16, 2012
                    • 0 Attachment
                      --- In gpsxml@yahoogroups.com, "cbyh" <cbyh@...> wrote:


                      > I am producing a GPS file using the 1.0 schema containing a track -
                      here is a small part of it:
                      >

                      > <trkpt lat="10.311063" lon="-84.813530">
                      > <ele>1401.10</ele>
                      > <speed>3.33</speed>
                      > <course>334.3</course>
                      > <time>2012-05-04T21:00:38Z</time>
                      > </trkpt>
                      ...

                      But the schema at http://www.topografix.com/GPX/1/0/gpx.xsd contains:
                      >
                      <xsd:sequence><!-- elements must appear in this order --><!-- Position
                      info --><xsd:element name="ele" type="xsd:decimal"
                      minOccurs="0"/><xsd:element name="time" type="xsd:dateTime"
                      minOccurs="0"/><xsd:element name="course" type="gpx:degreesType"
                      minOccurs="0"/><xsd:element name="speed" type="xsd:decimal"
                      minOccurs="0"/><xsd:element name="magvar" type="gpx:degreesType"
                      minOccurs="0"/><xsd:element name="geoidheight" type="xsd:decimal"
                      minOccurs="0"/>
                      >


                      You've got <ele><speed><course><time>...

                      when you need <ele><time><course><speed>



                      [Non-text portions of this message have been removed]
                    • Joshua Judson Rosen
                      ... We use GPX 1.1 + Garmin s TrackPointExtensionv2 schema in FoxtrotGPS, which gets us support for speed, course, and a number of other useful parameters too:
                      Message 10 of 10 , May 19, 2012
                      • 0 Attachment
                        "cbyh" <cbyh@...> writes:
                        >
                        > Thanks. So for fairly simple use, probably better to stick with 1.0.

                        We use GPX 1.1 + Garmin's TrackPointExtensionv2 schema in FoxtrotGPS,
                        which gets us support for speed, course, and a number of other useful
                        parameters too:

                        http://www8.garmin.com/xmlschemas/TrackPointExtensionv2.xsd

                        --
                        "Don't be afraid to ask (λf.((λx.xx) (λr.f(rr))))."
                      Your message has been successfully submitted and would be delivered to recipients shortly.